{"maintainers":[{"email":"storybookbot@gmail.com","name":"anonymous"},{"email":"dom@hichroma.com","name":"anonymous"},{"email":"kasperpeulen@gmail.com","name":"anonymous"},{"email":"dev@valentinpalkovic.dev","name":"anonymous"},{"email":"jeppe@reinhold.is","name":"anonymous"},{"email":"kyle.gach@gmail.com","name":"anonymous"},{"email":"ndelangen@me.com","name":"anonymous"},{"email":"shilman@gmail.com","name":"anonymous"},{"email":"tom@thesnail.org","name":"anonymous"},{"email":"gert@chromatic.com","name":"anonymous"},{"email":"varunvachhar@gmail.com","name":"anonymous"},{"email":"yannbf@gmail.com","name":"anonymous"}],"keywords":["storybook"],"dist-tags":{"debug":"6.0.28-alpha.3","future":"7.0.0-alpha.34","next":"7.0.0-alpha.43","latest":"6.5.16","prerelease":"6.5.17-alpha.0"},"description":"Core Storybook UI","readme":"","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"users":{"sternelee":true,"flumpus-dev":true},"bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"license":"MIT","versions":{"3.0.0-alpha.0":{"name":"@storybook/ui","version":"3.0.0-alpha.0","license":"MIT","_id":"@storybook/ui@3.0.0-alpha.0","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"01b29670f9bb4ced0bb6f5dafbdf74fd613e1a27","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.0-alpha.0.tgz","integrity":"sha512-NRcxSyyICQ3xCllwBMmUKaQzJ1MWx+kthOc0qnkBnToR1fr8ti7raaCXU/Xa7eqdV90l0Ve66ki0XvdxoH3Y0A==","signatures":[{"sig":"MEYCIQCiY6oMZyH5dxBhsBlpoX7oX3sUA06HkU2kJC1giZYObQIhAJeQgSXpjh+zM+ZwFmAQfcGLoswhoaBaOmr2n9/u+lAM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"01b29670f9bb4ced0bb6f5dafbdf74fd613e1a27","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"ndelangen@me.com"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.6.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.0-alpha.0.tgz_1495051124817_0.3689992574509233","host":"packages-18-east.internal.npmjs.com"}},"3.0.0-rc.0":{"name":"@storybook/ui","version":"3.0.0-rc.0","license":"MIT","_id":"@storybook/ui@3.0.0-rc.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3be3ab83d90ded5852be29ac95bc772d712819a7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.0-rc.0.tgz","integrity":"sha512-+8Ath5Ia4qxA8K/8cYPVC+ABiRXCtMcwBhW/pCg7Am3oaik/+1oKqA64/e1sJJJ68DxhwBLX1VZH/ekJl98WRw==","signatures":[{"sig":"MEYCIQDj9V+61ncRx+iy5kri7chMN693RNRGtCaO5QE4Yu+9jwIhAJZKdlvV3jzBS3iPcg5kej7CmlF+FM0n0YOq3Awe3EI5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"3be3ab83d90ded5852be29ac95bc772d712819a7","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"ndelangen@me.com"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.6.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.9.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.0-rc.0.tgz_1495729723757_0.40718310442753136","host":"s3://npm-registry-packages"}},"3.0.0-rc.2":{"name":"@storybook/ui","version":"3.0.0-rc.2","license":"MIT","_id":"@storybook/ui@3.0.0-rc.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9ffe689c1cf6e9043f0a48e837ec0022b8af3c4d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.0-rc.2.tgz","integrity":"sha512-upSx265Fy9TwID9itzRG2EgOsKSm6RJTJw6cNZnjjqUYUT14SwVI3n/fmtp4XGxmShPvILhxQlKctStyOC2oXg==","signatures":[{"sig":"MEUCIHzzhebpKbtqInr0GFX89t5XkRF/DlNWQxVqaBaU/RkfAiEAim620NP2GR3twSdMuy11rHezZLOtXCGdOyDbxatmjSc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"9ffe689c1cf6e9043f0a48e837ec0022b8af3c4d","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"ndelangen@me.com"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.6.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.9.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.0-rc.2.tgz_1495885656682_0.6230245542246848","host":"s3://npm-registry-packages"}},"3.0.0-rc.3":{"name":"@storybook/ui","version":"3.0.0-rc.3","license":"MIT","_id":"@storybook/ui@3.0.0-rc.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8e87894e7020f8bb29ab26042123c0be58843172","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.0-rc.3.tgz","integrity":"sha512-ejczklRvgjEJSVPSmHFmR/ex3Mfgb3aQKwKkC2qtiq+vEhAOeqzdpfYyNFMybtIoB436AR46DkBh//O904PbDQ==","signatures":[{"sig":"MEYCIQCX1qBVW/EZamyorG/e5enzrpd87J1/feFoKDUk0RNPrQIhALuvUO35va1CSdQ8UfHosLS7iMQ9Z67xFL6spscM6cCj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"8e87894e7020f8bb29ab26042123c0be58843172","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.0-rc.3.tgz_1496134035659_0.8205819330178201","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@storybook/ui","version":"3.0.0","license":"MIT","_id":"@storybook/ui@3.0.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"64d83dd7529ebe0ffe7622d90e08bf00cd362508","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.0.tgz","integrity":"sha512-DmHe5BUYv7IRarPogGbt+ap1MHDJfuAvNdJCthmHLL6tDDjeggTLyayLBc6L8mQ4ba+doTpmJc5cvi2VapBVyQ==","signatures":[{"sig":"MEYCIQCfWZGuzvgi8k8v7g4N5cKZ6OHQWE/8+G1P7i/ZajOCmwIhAJMk0/XCcz59u9oBhklAk0kDryjRTqfxQ1PBiC32h6UL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"64d83dd7529ebe0ffe7622d90e08bf00cd362508","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.0.tgz_1496151628909_0.7358874110504985","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@storybook/ui","version":"3.0.1","license":"MIT","_id":"@storybook/ui@3.0.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fbb2dca43bb35ec7d0efd68fb8336478e5e25585","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.0.1.tgz","integrity":"sha512-PrHcIVYGu0sBVybprMUcifWYncZEkeqU+SOtzEcmw2FC8ghlQgFKaHpSYnrJwa2nzTv2XTpxhIdCFa6NeDQ2nw==","signatures":[{"sig":"MEUCIQC9Y6fNRqvlj4M5jqtWy0VR6WZvp+He43QyW7j7uFyUlQIgFWsMHtRPsBY450ez4kXmRJzQLHeOFSDvFl/echg7EKw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"fbb2dca43bb35ec7d0efd68fb8336478e5e25585","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.0.1.tgz_1496667568212_0.5771037968806922","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@storybook/ui","version":"3.1.0","license":"MIT","_id":"@storybook/ui@3.1.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0dc76aadc1d6d85c05a4fa7b9adca320be6a66d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.0.tgz","integrity":"sha512-euFTXfzLyrakqRrq8/mC1NqLnM74DdvaPnpZC8gJxQoes8pJXRp3nsTp9GzxZo8zmSYA5JiWI9xjAkcGDXyurA==","signatures":[{"sig":"MEQCIHS51wQINnCavDr4UQ++GKM+QYB7TesJz2Q1Cgzwh7F0AiASbKyRcPHtedLjNOPkB+Vba0S7hj9k7R7v5UQX83IruA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"0dc76aadc1d6d85c05a4fa7b9adca320be6a66d4","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.0.tgz_1497005618270_0.3101582950912416","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"@storybook/ui","version":"3.1.1","license":"MIT","_id":"@storybook/ui@3.1.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6fc88281130c01ba10580b6597105761d07b3b22","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.1.tgz","integrity":"sha512-vbWYz/WP9fqvcuQHdVz5W5vg8CLkQaKr0Td2A+ZA3a2vwkxWcGhX0smM1moowI6mRUduiO/SL7EMap8wO+sa8w==","signatures":[{"sig":"MEUCIDsrlHCQxE9kjen7J6DdWevfd+ToR5Atf3iTdZ4Tdk2eAiEAudJ5dAmcxgF/1E0zVvYpYnau7JSaaIY+6Xo4ywoDpvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"6fc88281130c01ba10580b6597105761d07b3b22","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.1.tgz_1497008009445_0.3676192327402532","host":"s3://npm-registry-packages"}},"3.1.2":{"name":"@storybook/ui","version":"3.1.2","license":"MIT","_id":"@storybook/ui@3.1.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2b9c79c526e07e6915f9ba6c0396c1caea3b0409","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.2.tgz","integrity":"sha512-SbBhhhhR/q7VajevHaEGAx6W8u7n3Sc11xJFyWcBXR6dloMI708JHjtSb2lM0+muT52gI0RXag0uAknMmQiEpQ==","signatures":[{"sig":"MEYCIQCzDz+VuFMVWY/lH00tryAC40LBxYaaJrY4CBc+b3JBOAIhAOzKmJN2BPW4alnlC0k6x/n7hwq2WXDY0xjQP8Pn/yCu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"2b9c79c526e07e6915f9ba6c0396c1caea3b0409","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.2.tgz_1497009258430_0.7684487700462341","host":"s3://npm-registry-packages"}},"3.1.3":{"name":"@storybook/ui","version":"3.1.3","license":"MIT","_id":"@storybook/ui@3.1.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"806c6bc4474b1437edf305c50b88662869ad5c31","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.3.tgz","integrity":"sha512-g2LBuLy1s11aRuGA6drLSi3BBu+qgVrbgoreVZYxpjb3R1qowOyOhPWsMT3jen1shaezUESMLTfhWzg2yW9yFA==","signatures":[{"sig":"MEUCIH7IqMCklOc0Iuqff4sCiH1xsg++huyh1+q1IqPv8SAUAiEArQc23MszrosylyszISKkWPGqaKgRx9BXsEj0EMhHFhE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.2","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.0.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.3.tgz_1497095271074_0.1576069868169725","host":"s3://npm-registry-packages"}},"3.1.5":{"name":"@storybook/ui","version":"3.1.5","license":"MIT","_id":"@storybook/ui@3.1.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e7bb1afa214e95e75621c17d879237252fea52d8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.5.tgz","integrity":"sha512-U9LrMGXgI1OHK1hctT4XPCRbzJ4bN4B5iSVz3InE719Xw8FQ1XUbvBEvBWs+bpXIbtmKT3M8db8F0OaYdjkRWA==","signatures":[{"sig":"MEUCIBRUbHQ74ZP8tpMVHecA755GpiQcrc1cFF/Hix1urHPlAiEAq4zh0ZmaqHt2DAb5slb2uTb9YO6/pveY/m12DuG8ZCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.3","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.0.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.5.tgz_1498113436589_0.22786140139214694","host":"s3://npm-registry-packages"}},"3.1.6":{"name":"@storybook/ui","version":"3.1.6","license":"MIT","_id":"@storybook/ui@3.1.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5d47c6003a2d78c06ede43861089747d986d918e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.6.tgz","integrity":"sha512-lsDkJ5inw9ji+vufZ0XIsrFINoGU+RARVuYENT1i7rCwyQnJIw9/ycXZnjPx/xY7i67gtg+Szd3jCy5RxjC57w==","signatures":[{"sig":"MEYCIQCOxLERz402L4fNEB6HbtDPJDyBm1kscahKcq9XFfp5MQIhALzQ/fgSv+0p9ZcFBv2Z3vqsPIdyEHBBpRU++4RrznJx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.3","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.0.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.6.tgz_1498458802848_0.11417530383914709","host":"s3://npm-registry-packages"}},"3.2.0-alpha.5":{"name":"@storybook/ui","version":"3.2.0-alpha.5","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"43d3739dbccd3e72a3e7b45de33db0fb0a1328e8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.5.tgz","integrity":"sha512-GXUDhKV8h1hH+EUUefUxZWhhTbzPOnQnGuLgmsdLcFnSNxxL4bdOp6nMNj2zHPShamAQlTLv5560+PFfQ8pqzQ==","signatures":[{"sig":"MEUCIAuZQEg7boOA+cVewdSi40bF8nty7cy3/S+mEPE0dYoaAiEAlSU+T9Obo/R1O4dOBwrskgqvxiiu04Ai65z1gkTVbdc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.3","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0","storybook-react-treebeard":"^1.1.6"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.5.tgz_1499016241364_0.45748867257498205","host":"s3://npm-registry-packages"}},"3.2.0-alpha.7":{"name":"@storybook/ui","version":"3.2.0-alpha.7","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6c0b4adfff15530deecb257736a2d6dc2caab95e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.7.tgz","integrity":"sha512-fdv7Lv7pEbWwu+wjvSau2NVBmJtjNVEY5M/UwJlOyxr7jTtUuqxXufziE+CRBa9XazjnPnyARHBPZTQRMkkzPw==","signatures":[{"sig":"MEQCIFfD6eOoZdiOkYuH4cZylXi7cP2vUTmfIn1eM4e3XBLNAiB+1i3abWyXk1gJqyPMO6TLo4HwOfltqs9tgOy7MAOjYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"6c0b4adfff15530deecb257736a2d6dc2caab95e","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"3.10.10","description":"Core Storybook UI","directories":{},"_nodeVersion":"6.10.2","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0","storybook-react-treebeard":"^1.1.6"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.7.tgz_1499330416097_0.9018417028710246","host":"s3://npm-registry-packages"}},"3.1.9":{"name":"@storybook/ui","version":"3.1.9","license":"MIT","_id":"@storybook/ui@3.1.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"38e9a0aaf21e49f7d20f9b393449a89fec715759","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.1.9.tgz","integrity":"sha512-MeOqnYO1Xp/g8P9/8lATiNmPTMrcwjnxSpP4NsL96MBGZf2hy5/o7o4UkOjCtf+xU6wlB1x5VF4ezMe95TMwCA==","signatures":[{"sig":"MEUCIQD2LvCapQsop3AkEMtX1Zwjb7SUPvx0uHIfCvz7yWLJAAIgQMq/FK27Y88UmihWt1iegf99yTXWw04xnwgN56Dnvtw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"38e9a0aaf21e49f7d20f9b393449a89fec715759","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.8","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-modal":"^1.7.6","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.0.0","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.1.9.tgz_1500238247547_0.9437473022844642","host":"s3://npm-registry-packages"}},"3.2.0-alpha.8":{"name":"@storybook/ui","version":"3.2.0-alpha.8","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"bbcf627a8f0d5b2cfaf2bec81844974034b6a031","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.8.tgz","integrity":"sha512-a6PANu8GEhv0twx7KxJeYzI/du4HtWe1XzDT96In+dqN9lso2wLnEH2YLy08M1TzjHz7ERVY36YbgCMTJQBriw==","signatures":[{"sig":"MEYCIQCINZmjLovKrRAcvJJaNI2DUStuVtcJhlfji1U5vQoddwIhAJhOWPyk6azX1g/n41STJZePKvDwDu2ZddtgzBtdv1q+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"bbcf627a8f0d5b2cfaf2bec81844974034b6a031","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.63","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.8.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.8.tgz_1500582611611_0.6692950932774693","host":"s3://npm-registry-packages"}},"3.2.0-alpha.10":{"name":"@storybook/ui","version":"3.2.0-alpha.10","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"42ed1b81407bae707f0eebd2142e4ebc3421f099","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.10.tgz","integrity":"sha512-p8CKBWz79XAyY3e9QnKETCr2zH3f0UHthCW7prZibYtXMVI6ggIqPXR0yJehvihKUiWCPPAUAlPx9apr0Ezn0A==","signatures":[{"sig":"MEYCIQCbP2ArfhIrrRYaPcOMQmuuX47xoAmBkQHiivy5YMAngQIhAJDMQtmH6Mh4dX3jgDSumfmP9sLA56I4fHmIHZQVnzBK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"42ed1b81407bae707f0eebd2142e4ebc3421f099","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.10.tgz_1501142850920_0.6131814843975008","host":"s3://npm-registry-packages"}},"3.2.0-alpha.11":{"name":"@storybook/ui","version":"3.2.0-alpha.11","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b868f05169609c3c7cca2db2b56eb818e4203d38","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.11.tgz","integrity":"sha512-zZxMAbVxWj4/MP9EhzvFolYr09QZQC34z/ytSOzPHRT+SaA2lsxM1flhPfE7EpGpWRuDn7UFUCYs82ZF5BPgmg==","signatures":[{"sig":"MEUCIQCB7CmvkfW58qofsMs2zMZkqcpYA/Q4gapGN/nmE1VhJwIgKoL3gales1+NMu96H0jQR+btdPLfMq/Eoae5L025Fq8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"b868f05169609c3c7cca2db2b56eb818e4203d38","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.11.tgz_1501167253644_0.6041387622244656","host":"s3://npm-registry-packages"}},"3.2.0-alpha.12":{"name":"@storybook/ui","version":"3.2.0-alpha.12","license":"MIT","_id":"@storybook/ui@3.2.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"03b6cc05dbbe69f99dd968a980a150bbb1c2fccb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0-alpha.12.tgz","integrity":"sha512-04bsh0ImVoaWH1Af46WXLavuqA95KqPF4wjeQNHHX7LZNRzBdL6beyRcr5EBN+YL9o+sbrOZ+VsdPwGLfR7T0A==","signatures":[{"sig":"MEYCIQDimMbzgZgCIVCNmFF+Np5Szatby0KIaJthmelKtir0rQIhAPq6jyH+i7P76leEvoosaCOr0y+oavCwjzPzEdgD1USi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"03b6cc05dbbe69f99dd968a980a150bbb1c2fccb","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0-alpha.12.tgz_1501457790102_0.46871228446252644","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"@storybook/ui","version":"3.2.0","license":"MIT","_id":"@storybook/ui@3.2.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ce60155412bfd700d6f8bac2bae40efca4f6d768","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.0.tgz","integrity":"sha512-FRTGOCmWsJRDWdbkHbpXp9wV1B9AtbMB56YaQcTd7z8eb7ApoYskq6CVysIZHn/u5uZ4Rv8e//mQ/y7foLwRiw==","signatures":[{"sig":"MEYCIQCdT3dMtOJPlJwQXd1QoQvJDhPNbK/WxZhX+KdUdcIFHQIhAPTQjuCFGk4XHMUYXo7HdgI6/kKCKfJ+EoInLleti+cI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"ce60155412bfd700d6f8bac2bae40efca4f6d768","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.0.tgz_1501510382207_0.48434112849645317","host":"s3://npm-registry-packages"}},"3.2.3-alpha.0":{"name":"@storybook/ui","version":"3.2.3-alpha.0","license":"MIT","_id":"@storybook/ui@3.2.3-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"18c79ccdb2569a54d119b06af51859b8cd4a0303","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.3-alpha.0.tgz","integrity":"sha512-JwR2SmhrCl8FpHBiAQWbiRiHmyWEBo+0itSTGUaoLG/FOrNo7wACL8k45xh620z6gzsxTudf6GworUA8ZCS86g==","signatures":[{"sig":"MEUCIERH9cRrr76gNdz2CfeelvBrFFElQkHqCIt9XfNIH2drAiEAhX1LaPdJGtesKU6rNHIfOh1wMgFNFdUL5niCD4JxuAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"18c79ccdb2569a54d119b06af51859b8cd4a0303","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.3-alpha.0.tgz_1501618442271_0.6382995850872248","host":"s3://npm-registry-packages"}},"3.2.3":{"name":"@storybook/ui","version":"3.2.3","license":"MIT","_id":"@storybook/ui@3.2.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9579c191a1695d3d5aaabcef93a7a5456d8f19af","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.3.tgz","integrity":"sha512-ZCta7UaE2WwkVtRipnR4n61RXx9dKoh6Elsl20eI9kQuBhTSa9U0zMz6oYFxrL8JS7rXF5mNQ+bd0qubo++HmA==","signatures":[{"sig":"MEQCIFf5e3BIOJsHeugqIOyicrF2H7SGpBrA9NoljkcHkMM1AiBjhpaNOML8aMrnW3QBUzdKuHzAu35lnjuEykaetUd1Vg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"9579c191a1695d3d5aaabcef93a7a5456d8f19af","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.3.tgz_1501619922614_0.9127524346113205","host":"s3://npm-registry-packages"}},"3.2.4":{"name":"@storybook/ui","version":"3.2.4","license":"MIT","_id":"@storybook/ui@3.2.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a52b10a5f9daaf22570af457ec7c79210b0abcc3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.4.tgz","integrity":"sha512-V37P3+GclIpaQs4JG+TW9lKP9KRSb9NLCpFLuyN6H5MhWr06gIczSqHpqEetsRlSWJL/zCdSQJkE2ll4YjWiCw==","signatures":[{"sig":"MEUCIGjfLeFC9NIpjTJFQTESQ4bARNLkDtVSmuR+NRsuAchuAiEAsFT4UEYWqIYY6LyWmmhb1c/p9ZJ0qZ4pPR8O2RZaKco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"a52b10a5f9daaf22570af457ec7c79210b0abcc3","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^1.7.7","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.4.tgz_1502582393098_0.33696324029006064","host":"s3://npm-registry-packages"}},"3.2.5":{"name":"@storybook/ui","version":"3.2.5","license":"MIT","_id":"@storybook/ui@3.2.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9e8cfe14dd49d3bb42f4ea1a3be90411a47c14fc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.5.tgz","integrity":"sha512-vldxzkVCagZncnwWYHuQIgSvflvUUnPFpzMkpinjx1ggb0hT48WZiNrH+Y3oK03s0UNmS7vDk28odRTtrwn/Cg==","signatures":[{"sig":"MEQCIDG0vq4dJoJz2iZZpm7XOLyMTTAmopYSSlE0RwBl0iWdAiBQ7bAknPZrvZjMv3BQYfNDCyokGPLS3fH0PSwBv9Negg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"9e8cfe14dd49d3bb42f4ea1a3be90411a47c14fc","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","fuzzysearch":"^1.0.3","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","json-stringify-safe":"^5.0.1","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.5.tgz_1502945488528_0.8507042368873954","host":"s3://npm-registry-packages"}},"3.2.6-alpha.0":{"name":"@storybook/ui","version":"3.2.6-alpha.0","license":"MIT","_id":"@storybook/ui@3.2.6-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"535debb179f269716075e8ff5269f5f959aa3f0a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.6-alpha.0.tgz","integrity":"sha512-xm/JlWzMewUCR/84CfIm261JDyoGaC4CEgOupaskx88k9Vlx2Xxg94I75IaorKdnt1DyGOS1TQmGqCXSReP9zQ==","signatures":[{"sig":"MEQCIBkFKrll0cX94VdeHgWQLgiInv7alH38VUXOTnK3eDhCAiAwlWRbhRa910+YYX/QxShOAUnzcgTdvx5YTQSZ+EGR8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.3","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.6-alpha.0","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.6-alpha.0.tgz_1503387224190_0.07976602134294808","host":"s3://npm-registry-packages"}},"3.2.6":{"name":"@storybook/ui","version":"3.2.6","license":"MIT","_id":"@storybook/ui@3.2.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b6116a96f7f92f64a069a2196b4502e21a241e2d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.6.tgz","integrity":"sha512-b2PoarW+kfxBbjZP/vU62Ptb23ziLNku8CTcY/QvTpDNtqhge3NvmYbfAEEsxqM0EKBsO5M5IYc7ch0fDkwQtw==","signatures":[{"sig":"MEQCIH9IRTlyh/m+eWwE9pob47QBa+RvY3JDsd9w50i2/I9yAiB+pYnHCB/20XdE049w/xEBRsyIEOIqnqZw2+4yHqZKYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.0.3","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.6","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.6.tgz_1503425043851_0.6162548330612481","host":"s3://npm-registry-packages"}},"3.2.7":{"name":"@storybook/ui","version":"3.2.7","license":"MIT","_id":"@storybook/ui@3.2.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c07dd5523e2c83d9f8ac5a7982c305cc59f34e78","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.7.tgz","integrity":"sha512-Hz2WUXzkdGIcJXJnhnaZUhkr44RlaTpPyuevrZmL3VLYbbQOYohXH1c3/xTISeLaxMNEDW5PQsovUHlqq7AupA==","signatures":[{"sig":"MEQCIAMxj9uyJGkit+pGcrIpZzdPfbemwqeafecBwLQAVx1HAiA/eeTPuYoS9CdBNEMP9ptkTJWWeSqbO+Eb420wdq+ZIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"c07dd5523e2c83d9f8ac5a7982c305cc59f34e78","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.7","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.7.tgz_1503505468158_0.5429147707764059","host":"s3://npm-registry-packages"}},"3.3.0-alpha.0":{"name":"@storybook/ui","version":"3.3.0-alpha.0","license":"MIT","_id":"@storybook/ui@3.3.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"cc9519dd6dd074741b06523de8ee7cbb8a6d2a3e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-alpha.0.tgz","integrity":"sha512-aOZpX4Loq+2Tgq4+zjP8OAxJptTVMnGUCBlZZycEVd9Hsa299KBBBnrbbsCSWjCdI/7gDF96zCLe6h5LqJPpZQ==","signatures":[{"sig":"MEUCIBBh5DyIRkj7YJB4krpwZ0IsD1IFMn1MT1cliIrs0vmvAiEA+HjiafsY0nwJC2lVGkWOERT/zf2jaPLdKZoUSbIlyXQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","_shasum":"cc9519dd6dd074741b06523de8ee7cbb8a6d2a3e","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"4.2.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"7.10.0","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-fuzzy":"^0.4.1","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-alpha.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-alpha.0.tgz_1504730889162_0.9196041529066861","host":"s3://npm-registry-packages"}},"3.2.10":{"name":"@storybook/ui","version":"3.2.10","license":"MIT","_id":"@storybook/ui@3.2.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0d0ab523392718b166d2a5ae7ae6d9cabbd9e759","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.10.tgz","integrity":"sha512-aV1CE9Sx0OuoWfbGrJHBTez0KFSJJorjoeMctncpkV8pAl7V0cSWyLkE6UQeWEXjw2SW2dk5Zhg1EHYKA8lv1A==","signatures":[{"sig":"MEUCIHc3zxWOgSbWGl85KvOqYSi47Z5fcKodA3KyTG4EZQsqAiEAhziNu3VdX5mvb3aaw3xFnDDA62EFs9q0XLb/w5Iy18I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.4.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.10","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.10.tgz_1506116655658_0.9651232620235533","host":"s3://npm-registry-packages"}},"3.2.11":{"name":"@storybook/ui","version":"3.2.11","license":"MIT","_id":"@storybook/ui@3.2.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ae177e5c940bfbc48aa42b1903c08ee1dbbf001e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.11.tgz","integrity":"sha512-bxVmLCq++c77OkZMOnPuSSZUHd/sXkw6hBgwqAeuiFnsRnjgddBOMLOLxHAWGeE9I7WQ0Xll31E57vjdGIusNA==","signatures":[{"sig":"MEYCIQC0yxT8jcW4Qq2MMI4wyVFd/9i7mJgEnztc+S6E3Xg4YQIhAMaA+ayC4W7Jj89vje0XHp+jkduiDDoOiDSOFpzmBot/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"storybook":"start-storybook -p 9010","prepublish":"node ../../scripts/prepublish.js","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.4.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.4.0","podda":"^1.2.2","redux":"^3.6.0","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.5.10","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.2.4","babel-runtime":"^6.23.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.1.6","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.10","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^2.9.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.11.tgz_1506466452560_0.22676047054119408","host":"s3://npm-registry-packages"}},"3.2.12":{"name":"@storybook/ui","version":"3.2.12","license":"MIT","_id":"@storybook/ui@3.2.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"cdb8365fd33d0bae71d7bb0d3f1f9baac2e3f3e3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.12.tgz","integrity":"sha512-g7O+YO92qJiWqgSp1U1q4sSgiobNxRBSWCrlYmRfHAUzEzD4cgYDnlldFWWUvR4zCEOCIG/MbJKtqG4727srNg==","signatures":[{"sig":"MEUCIQC/sAZjog5KHt7NGk2pKzTXpp3xn8kOiC/zM27Z0l7EvQIgTB8qwt2akiQqGev80cF1CZOf/i3elWH4++ypp71/lRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.4.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.5","react-modal":"^2.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.0","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.12","@storybook/react-fuzzy":"^0.4.0"},"devDependencies":{"enzyme":"^3.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.12.tgz_1506983558041_0.7541842334903777","host":"s3://npm-registry-packages"}},"3.3.0-alpha.2":{"name":"@storybook/ui","version":"3.3.0-alpha.2","license":"MIT","_id":"@storybook/ui@3.3.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1fae89fbe57e13ad819a9192c8710ee0bee51651","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-alpha.2.tgz","integrity":"sha512-I5z5aiLpar6r16ory5feLItmWfgbtVYzA04EP2ZkQc2BCMXuBziaQlr1tmWKF4NjLYGlJIBeqlQAnXA1fM7HMQ==","signatures":[{"sig":"MEUCIASf0OSC34Zhf7iIq3aks798ufWq1+sIc/+GsyeDUF3NAiEAhR1HSxMmBSrGYRL1AO1qAKP+syCKjeBD6NQkyTPDeq0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-fuzzy":"^0.4.1","react-icons":"^2.2.5","react-modal":"^2.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.0","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-alpha.2"},"devDependencies":{"enzyme":"^3.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-alpha.2.tgz_1507061602893_0.8269994277507067","host":"s3://npm-registry-packages"}},"3.2.13":{"name":"@storybook/ui","version":"3.2.13","license":"MIT","_id":"@storybook/ui@3.2.13","maintainers":[{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c50150a793802e1f4f344fe3ee7af3998d7c5196","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.13.tgz","integrity":"sha512-1gPgkLBcj6AFb1jhQ8qKqBajR2erlFKkztoLBw1UfCbyudPhgz7Mi26nSKO3pTAd0dHWLu6aKobqEu0ZLvLQ7w==","signatures":[{"sig":"MEYCIQDbcem+2pDJvZfRvYF4lDCca0WBc/1QXZiffYpOKPfUqAIhAIwvie/VHGMTsBuXmyRBnlUS1ZLUn5VsYF7kYEhTcXCx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.4.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.7","react-modal":"^2.4.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.0","react-treebeard":"^2.0.3","react-split-pane":"^0.1.65","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.13","@storybook/react-fuzzy":"^0.4.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.13.tgz_1508528794897_0.08821783657185733","host":"s3://npm-registry-packages"}},"3.2.14":{"name":"@storybook/ui","version":"3.2.14","license":"MIT","_id":"@storybook/ui@3.2.14","maintainers":[{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3a2fbd770340829d018750ceab75bf85708b9467","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.14.tgz","integrity":"sha512-0OErMwjq7EtDlTeBRisNcgzmUYHPi7JLW90s2M/i+cYUHRZMvz4JmYH9HwxG8U32QrekJ7l0Ki8eWWzJu6deug==","signatures":[{"sig":"MEUCIBadpZnBotoXOjECrHNkF1SjQ3+RsuU8xIYgpe4b/qX5AiEA26MycSXU4JUUebD5yqIruYoPdR76doKjcj8O5tpTtSY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.4.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.1.3","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.7","react-modal":"^2.4.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.68","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.14","@storybook/react-fuzzy":"^0.4.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.14.tgz_1509520977783_0.010072367265820503","host":"s3://npm-registry-packages"}},"3.3.0-alpha.3":{"name":"@storybook/ui","version":"3.3.0-alpha.3","license":"MIT","_id":"@storybook/ui@3.3.0-alpha.3","maintainers":[{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8feebbf8af1eb1d9f2d25e8568849965c5603494","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-alpha.3.tgz","integrity":"sha512-+j+C+W0Kw8vilfyw2rDlUJy9qd3CTLP+lV/9o1uBWQ772Jj9L4pHZIpojWquALi9w1kfUNvOEUvUdKLsscEgMQ==","signatures":[{"sig":"MEYCIQCxriFcQx2TLIRZAj5SeUyuzObhDZlnS5B/UAZtKsqCBQIhAN1uLPLYkLzDJ4PhghBhABIXUFeydISvc1On2seTg2go","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^2.4.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.68","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-alpha.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-alpha.3.tgz_1510027118602_0.08419862925074995","host":"s3://npm-registry-packages"}},"3.2.15":{"name":"@storybook/ui","version":"3.2.15","license":"MIT","_id":"@storybook/ui@3.2.15","maintainers":[{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a73d24aa67877df4f69f497a0d7a67cfb34f3f39","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.15.tgz","integrity":"sha512-TeEInIbO80psTpy9WMkkkUo814b7RnVM+fGu7igEiqJjcmnwt4gUrOJ9bzSBMJcNZSnE1hu5i5MSwLWyDjJakQ==","signatures":[{"sig":"MEQCIFyss0QEaIlneLO4ivDdlv3BWkRgrlV2i0O/zMeuYyfGAiAdytZFpTpIsbcHE2aC3K/gfMjz/cifB5Zhhg+6haFgQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.5.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","mantra-core":"^1.7.0","react-icons":"^2.2.7","react-modal":"^3.1.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-komposer":"^2.0.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.68","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.15","@storybook/react-fuzzy":"^0.4.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.15.tgz_1510281749289_0.09809716790914536","host":"s3://npm-registry-packages"}},"3.2.16":{"name":"@storybook/ui","version":"3.2.16","license":"MIT","_id":"@storybook/ui@3.2.16","maintainers":[{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b7df979c2f5770e54cf84300cc09b7072c2fef16","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.16.tgz","integrity":"sha512-K6DwvT2Oo4GrJkT0ij8EW1GsjX7Sw9U6hDp2II5tnKsV7egnIKgJ6y5xGOZLHNvDDkeo5KS+Ii3GjrUbnZ1QzQ==","signatures":[{"sig":"MEYCIQDE31QBVlyGOSnXwqnn1HVjnzGF882njLbJg1bJsBcYegIhAIx2dyiDs9+5N7ULVpUXkk4MiL8+05ixB+hMnFTKJymL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.5.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-icons":"^2.2.7","react-modal":"^3.1.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.71","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.16","@storybook/mantra-core":"^1.7.0","@storybook/react-fuzzy":"^0.4.3","@storybook/react-komposer":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.16.tgz_1510797885161_0.24535246985033154","host":"s3://npm-registry-packages"}},"3.3.0-alpha.4":{"name":"@storybook/ui","version":"3.3.0-alpha.4","license":"MIT","_id":"@storybook/ui@3.3.0-alpha.4","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a293ee3dabcda7569e04d1ad0a30782242636cc1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-alpha.4.tgz","integrity":"sha512-K5wfEUcwj5G36xNaeiMZz2siwxq79b3ypkfBDRmRPZJII75HZBp97V7RZ+uWoSpfyM8ufJjqlw/2Fv1oQz2vzg==","signatures":[{"sig":"MEQCIDBd7c0wqvpYRo79apPhn+t5s7chR4yIYPNxoDJ2kifaAiAmFCjMi9Z50mpU/SxVKKMGi1t0aWe3y8fzmJOZXBfj4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.71","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-alpha.4","@storybook/mantra-core":"^1.7.0","@storybook/react-komposer":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-alpha.4.tgz_1511349431689_0.07949376129545271","host":"s3://npm-registry-packages"}},"3.2.17":{"name":"@storybook/ui","version":"3.2.17","license":"MIT","_id":"@storybook/ui@3.2.17","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8838fc5bbe21cedfafc65ee90fe525499370118a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.17.tgz","integrity":"sha512-At0oWWTALJrJhtdnP+0AMANBC5omIBnEg3Pin3M0+yzUy6Poelcvt8+81dQEKLBP6LiyFOVpiDjfqpiHR5l0ow==","signatures":[{"sig":"MEUCIQDIz6fKHCgUHhYecoy3yBWYEdrcj9hUH4bBHsdAnDJRjAIgG8pt9f7sqfhcBpmi2M6EGVAJ794ezIKHPAhUt0UmsT4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.5.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-icons":"^2.2.7","react-modal":"^3.1.4","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.1","react-treebeard":"^2.0.3","react-split-pane":"^0.1.71","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.17","@storybook/mantra-core":"^1.7.0","@storybook/react-fuzzy":"^0.4.3","@storybook/react-komposer":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.17.tgz_1512331225017_0.8858357581775635","host":"s3://npm-registry-packages"}},"3.2.18":{"name":"@storybook/ui","version":"3.2.18","license":"MIT","_id":"@storybook/ui@3.2.18","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4d19f8daff7ec37cebe4d2b5d20e81e3676d8938","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.18.tgz","integrity":"sha512-n3j//YF5gbTRZHrdIREGK8C+weaCF/pu4iWKu4Pty8rbMjrghkgrhENga2XaFvEOfTsBUc2ldXCCjNw0tJOGWg==","signatures":[{"sig":"MEYCIQCUa0FbW2ebWCidp7hKDwwOkry967mZbF8V4/5EaQpyLwIhAN1e05DjNCh0vrMmOxijb9xzpUOMR9Qcr8PLilWxmDfM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.5.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.8","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-icons":"^2.2.7","react-modal":"^3.1.8","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.0.3","react-split-pane":"^0.1.71","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.18","@storybook/mantra-core":"^1.7.0","@storybook/react-fuzzy":"^0.4.3","@storybook/react-komposer":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.18.tgz_1513634419920_0.0927196389529854","host":"s3://npm-registry-packages"}},"3.3.0-alpha.6":{"name":"@storybook/ui","version":"3.3.0-alpha.6","license":"MIT","_id":"@storybook/ui@3.3.0-alpha.6","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"bdedcdab0a6306a6384fec7b0db302ba5aeb564c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-alpha.6.tgz","integrity":"sha512-5SY5hXGCdz6Zbk7pJnu54d1VSlOTofV1IIQufselDptwekZQXN4P3GiMBsgGTXP8AixaIW8QP9sip5pnlITQiA==","signatures":[{"sig":"MEYCIQDGL3hYTa78NHpd7zE3wXjVtN8irLBESKxnBkHTwYulEAIhAOWYli1d2hz1ojX209YwEF8WB3+u2Ft68azwnOy+32Ik","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-alpha.6","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.0-alpha.6","@storybook/addon-actions":"^3.3.0-alpha.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-alpha.6.tgz_1514050064258_0.8103835848160088","host":"s3://npm-registry-packages"}},"3.2.19":{"name":"@storybook/ui","version":"3.2.19","license":"MIT","_id":"@storybook/ui@3.2.19","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8e3aac28379d9cdcb6c7ef6b256e9c45d993b4a2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.2.19.tgz","integrity":"sha512-cVMuwcn6tEi3g8FJwc2cRG36AMtGaMNVEUl1rB8dvGTxhz1MpoXGvftm8bJk5zQBEhaOitivJW3K/D3WdAjLqA==","signatures":[{"sig":"MEYCIQDDtoWv07upX4TCC4n3hq5J2mffFsGREmWXWuO3RJeHLwIhAOt3a2On9Boumg0WPh0eveOA8DB8nGwWY4zHmWlGGty/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.5.1","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","@hypnosphi/fuse.js":"^3.0.9","json-stringify-safe":"^5.0.1","@storybook/components":"^3.2.19","@storybook/mantra-core":"^1.7.2","@storybook/react-fuzzy":"^0.4.3","@storybook/react-komposer":"^2.0.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.2.19.tgz_1514052015345_0.22748740785755217","host":"s3://npm-registry-packages"}},"3.3.0-rc.0":{"name":"@storybook/ui","version":"3.3.0-rc.0","license":"MIT","_id":"@storybook/ui@3.3.0-rc.0","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8f65717dc969ae78a7512feedde9e73bfcbd2db7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-rc.0.tgz","integrity":"sha512-exmRKvx88TKXGSjhX0y+awetlCxuMVok0k2PwfH1gJHw11qvcvGFNVcOcXenFkJAXKLtCmFqJBEpmN82RSvOvg==","signatures":[{"sig":"MEQCIGMBTUEQqUamGpfVUML16a9nGSb+sYQil0gnxrTfPC2eAiAlki7qlmus2omNE07ZA3EhgZkV1178zOTMLf1QnEZJpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-rc.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.0-rc.0","@storybook/addon-actions":"^3.3.0-rc.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-rc.0.tgz_1514089353625_0.13068094197660685","host":"s3://npm-registry-packages"}},"3.3.0-rc.1":{"name":"@storybook/ui","version":"3.3.0-rc.1","license":"MIT","_id":"@storybook/ui@3.3.0-rc.1","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f5f2564f2283cd1fee41d6b9d676de5f7c756708","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0-rc.1.tgz","integrity":"sha512-NVSA22AkysNrhvpejb6Yf99Ga6Q2HP41RjwMHXv20waP4w5qc2+LG2fSNbLWCaixzS3EQ05SoEFtW/bOn28A8Q==","signatures":[{"sig":"MEYCIQD7XmaQQ6nF6xHJTI6Zzl3kZbeKnP93qKdT4dyHuig4qAIhAIdTcj2jXP785xHyZPJNxVKeowv7KtNy42R+0bTCAtmw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","lodash-es":"^4.17.4","deep-equal":"^1.0.1","prop-types":"^15.6.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0-rc.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.0-rc.1","@storybook/addon-actions":"^3.3.0-rc.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0-rc.1.tgz_1514310660842_0.9807808389887214","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@storybook/ui","version":"3.3.0","license":"MIT","_id":"@storybook/ui@3.3.0","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9704100102f456436b419d032086126ac7bc3b67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.0.tgz","integrity":"sha512-TAQpHbmbqdL0+bwvu7cUQDvOmPbOKKnazE7EqoqunB6/nkjQAytXOquMjRBXCMbwvxWUIUq9EW0Q3PF3NUyXaw==","signatures":[{"sig":"MEQCIAGxW1C1SIBqxAPFlA9y3pyKMphpykzuhjPDHeesfq7nAiBzZXj/9o601zGRWZs8KI+42WZNrcGpFfc7G461WHkJVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","lodash-es":"^4.17.4","deep-equal":"^1.0.1","prop-types":"^15.6.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.0","@storybook/addon-actions":"^3.3.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.0.tgz_1514332793033_0.17532935761846602","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"@storybook/ui","version":"3.3.1","license":"MIT","_id":"@storybook/ui@3.3.1","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"15fdaf4b316e6a906854115d878549cf5924957d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.1.tgz","integrity":"sha512-34i0ODM30QWoZ+mGI6sR/8HvcaH5BryB4Q330oo8+pPgcombebRq245f6didmSoxQH8SHjJkHvlmpBOmSMxovg==","signatures":[{"sig":"MEYCIQCI+JGzm8x0ER8Zl+tESYgZIGMCoKb/di4K5uKdlSO0OwIhAI1uijzAqghwZmi5N2SOeJbXrQ8qFl5MwoDnF9+oZqep","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","lodash-es":"^4.17.4","deep-equal":"^1.0.1","prop-types":"^15.6.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.1","@storybook/addon-actions":"^3.3.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.1.tgz_1514345547058_0.16411403962410986","host":"s3://npm-registry-packages"}},"3.3.2":{"name":"@storybook/ui","version":"3.3.2","license":"MIT","_id":"@storybook/ui@3.3.2","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"83d8e0ae791841f4811106965b587e341883ec5d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.2.tgz","integrity":"sha512-wp8WLyt8AgjpyHlClFJ2OZIAAaE3ZbI7RsbF2//8NoxUmXaRJ0Z13V5nrdddudnd+IDLJU2HF2jneBcTVZ2raw==","signatures":[{"sig":"MEYCIQD9lBhnk0DhB5kd5x6+RDvUB8obk6JQnTBcvwgUJT+1ngIhAOQuSU6C8dBAJPNbmFWTda2NhG76XC+hJX/Q00O8ZmSF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","lodash-es":"^4.17.4","deep-equal":"^1.0.1","prop-types":"^15.6.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.2","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.2","@storybook/addon-actions":"^3.3.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.2.tgz_1514430778831_0.25292906700633466","host":"s3://npm-registry-packages"}},"3.3.3":{"name":"@storybook/ui","version":"3.3.3","license":"MIT","_id":"@storybook/ui@3.3.3","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c8eb95a1734c654e082d3909f665ae00ad472d94","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.3.tgz","integrity":"sha512-EwuMeIAh/R88ZGCIwCVBS2MYYCCyPxhjJ8FJo29YtaXhFXosnXsyG0Ws8cR8RJ6IbNDFO4OjKtrmWKWoUa/BYQ==","signatures":[{"sig":"MEQCIG2gcJGIQFTg7EiFJlQT5NEBuOHWKRHKKPj/QAbJgl/XAiBWr2NSsVSAXQZzXwcAPjnftmDkxt3n9J1opIoCZhJj4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.3","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.3","@storybook/addon-actions":"^3.3.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.3.tgz_1514481003517_0.34343529492616653","host":"s3://npm-registry-packages"}},"3.3.4":{"name":"@storybook/ui","version":"3.3.4","license":"MIT","_id":"@storybook/ui@3.3.4","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d6e116a951be248f4e379ec7db1611ab96da840e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.4.tgz","integrity":"sha512-EAyeuV5yhKFqYHRLkKODnOCcgdY6sTnzBSdlFdsGXcpPVDXnp/g+oxEnZ/XEKD7HUzSUsjd8N3QwY9Hx7jA+aw==","signatures":[{"sig":"MEQCIA0MPR+FBBmisq2XrY1Sh9jlrGQADHmWm6xJ/5HqqIcBAiBTaxoNo6JI915bwjSvwhALjoFFxRisuTSKIspA/yfCtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.4","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.4","@storybook/addon-actions":"^3.3.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.4.tgz_1515330112367_0.12693686573766172","host":"s3://npm-registry-packages"}},"3.4.0-alpha.0":{"name":"@storybook/ui","version":"3.4.0-alpha.0","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.0","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"03928a82e69a96696572673f63854ac44b775f71","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.0.tgz","integrity":"sha512-7Wk45OImZJYON8UbALbuLW81Ns9fzGIvX4tw9zxJ817+Te3VYBYv1OQ+Qdm/9+7eTore6hlJ3xY75j85VTqcAA==","signatures":[{"sig":"MEUCIEBEYXpFmB9RuOpozK3piyR7SFJsmpWWdYjQGgDfN5nKAiEAw6LSXEV2rcZH9GZvXHVaGFLAYAKN1RSnNunDenmXw54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.0","@storybook/addon-actions":"^3.4.0-alpha.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.0.tgz_1515341266662_0.8692254885099828","host":"s3://npm-registry-packages"}},"3.3.5":{"name":"@storybook/ui","version":"3.3.5","license":"MIT","_id":"@storybook/ui@3.3.5","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5fec4ee9a761f75bf47def9e37412341bf5be128","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.5.tgz","integrity":"sha512-tIHsafxJC2bfkQJRKkjTZtZJrG1Xl2TxJxll+xvu+gmw2PPKC9GqzWR7GAxEcHXgyaHTk8dOkNPIIH0UU5zL8A==","signatures":[{"sig":"MEUCIBcW2fWAZZ2lC6RSFT62LqpQ7+FeA3T74w+a4el2Xg8oAiEAoeqvpyCcH3tTObQKqBjrWdZzJ0kx4GLV7Sn9hMzhxgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.5","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.5","@storybook/addon-actions":"^3.3.5"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.5.tgz_1515383164162_0.5095243817195296","host":"s3://npm-registry-packages"}},"3.3.6":{"name":"@storybook/ui","version":"3.3.6","license":"MIT","_id":"@storybook/ui@3.3.6","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"97d04c513e4a22838c68e6dc915183b2e7a7bce5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.6.tgz","integrity":"sha512-h8oTPgEeGZFNjS74W3iah476N+sJDqKZq+AdReHp9Va/5gLioFDmNp4YeiZtU5C+Jfy7bNTHozARlsl31we3XQ==","signatures":[{"sig":"MEUCIAbWm7HvPgM2HwdFzcKflrrvNmk9LHL9jO5FB53RU44jAiEA173TPKCbczXGh2CYMqYKkMd835oYBBpIdqBRzbpJjxI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.6","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.6","@storybook/addon-actions":"^3.3.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.6.tgz_1515408331950_0.4839742425829172","host":"s3://npm-registry-packages"}},"3.3.7":{"name":"@storybook/ui","version":"3.3.7","license":"MIT","_id":"@storybook/ui@3.3.7","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6d58b65955e47ac65588b7244c587fe28df3a1f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.7.tgz","integrity":"sha512-pLfGh9tq+qUuSsdBtaqiP9ExXJ4YmmnKINOa3tnO/sLr1yCnvZCfVQIvPFBDb14q+jHn/sO2u/8Xh0wNSusdSw==","signatures":[{"sig":"MEYCIQD6qrpoxPZjhYtfXp1DlzDtHjc5OfPloecR/yS7FnXwBgIhAOOhOa0FKPxZoRRGvpfIJJuQKLx+fn5ZCTYX3DrkxoPh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.7","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.7","@storybook/addon-actions":"^3.3.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.7.tgz_1515566298000_0.6515159886330366","host":"s3://npm-registry-packages"}},"3.4.0-alpha.1":{"name":"@storybook/ui","version":"3.4.0-alpha.1","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.1","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"61ef3f44597c97aa56a26b59f3054f27a5aa247e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.1.tgz","integrity":"sha512-52Iizct9B7MfktBL3BOPec2WxbKVQh/Iga42WdmqNx/x4pDURnsYsDUr2UlN7D54U+u0zYT5IsZizO+u1AcAfA==","signatures":[{"sig":"MEYCIQDWcXBEdAax4bNLqc/l2Q8v9V9Lol7mfPuDPhizyadRWgIhAKOFf79kLRp53omgh/aX7KwZGvx01moDa0IRleaJWk8N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.1","@storybook/addon-actions":"^3.4.0-alpha.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.1.tgz_1515568278546_0.7357867618557066","host":"s3://npm-registry-packages"}},"3.3.8":{"name":"@storybook/ui","version":"3.3.8","license":"MIT","_id":"@storybook/ui@3.3.8","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fc9e9f3da3d988da8b6e07f78e1f6db0a5c6e1dd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.8.tgz","integrity":"sha512-KfIino7yBwGeqWm+LFbJoMaWb81XLyR4+i2gpwaou+xRGNpsr2bE5PhFaH6AXORYp2/q5BPRHL3uFmxDeV8WZQ==","signatures":[{"sig":"MEUCIQDOPflhTZ+4XOP680OFnKZYBIzGmMCYe2oZs0dD8gizMgIgW68rQ4Aw4OYgqegw3Rtf/0gEyWh5Heo0Lnu1rZDEy6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.8","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.8","@storybook/addon-actions":"^3.3.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.8.tgz_1515673441818_0.8175090586300939","host":"s3://npm-registry-packages"}},"3.4.0-alpha.2":{"name":"@storybook/ui","version":"3.4.0-alpha.2","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.2","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"97ec37dbc174f7efc1282013d0b350c3c606db85","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.2.tgz","integrity":"sha512-o5n7GMDEUoimUmDRd/yVaJ9p+Pxy6tIrj+Te4259a/E27R7m2xvyKasNAMyDocKnefxk4sZ8HV3bLRF8t/Nk2w==","signatures":[{"sig":"MEUCIQDYSQjJRXWH/JF1hrmW60utDtlM+0eJEO7yHTDCV8ltbwIgHED7SyKrh8+/lU2/s41Mnbh/oxxU9/XR5Y22ZgZvp6g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.2","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.2","@storybook/addon-actions":"^3.4.0-alpha.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.2.tgz_1515675100717_0.2391325170174241","host":"s3://npm-registry-packages"}},"3.3.9":{"name":"@storybook/ui","version":"3.3.9","license":"MIT","_id":"@storybook/ui@3.3.9","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"abb1df557131b174bf3c0879863a309ee85de8e3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.9.tgz","integrity":"sha512-ZOrIuvYTvSufPE/ZuQ9HoRr8S6rO1BhdVgikTgLmHPzhSStUpd70eBLXuayxK58VbQBGXMlGHWZGWo36jvkf7Q==","signatures":[{"sig":"MEUCIBycorPSFIrIeHyPPexnQaT8bPKG8Q9ILMzwI0uBIrf8AiEAm4ZVPO0/2YUxOp1jfnfT3sHTQzs7TCdyy5IcNl5L++Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.9","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.9","@storybook/addon-actions":"^3.3.9"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.9.tgz_1515829371877_0.6941988845355809","host":"s3://npm-registry-packages"}},"3.4.0-alpha.3":{"name":"@storybook/ui","version":"3.4.0-alpha.3","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.3","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"15ca30490d7ae657a432df272ca56b8f8df9528d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.3.tgz","integrity":"sha512-UVKfRFFbgicF4UsvBDj5w4MTghLTf3ExyCIOacscHMN0l2RkMhDktZX4XpLapRsaCzmAakSph3eZsuv2PBBJwQ==","signatures":[{"sig":"MEUCIQDLI5nfb5wVH9yYrPvvMNCN9ov/8qnYzkMHJbex/9kdwQIgCR50I23voaPEfrI3szVpaBK3SVYz2sdw0Thy8C3Wx0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.3","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.3","@storybook/addon-actions":"^3.4.0-alpha.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.3.tgz_1515847644014_0.5626466649118811","host":"s3://npm-registry-packages"}},"3.4.0-alpha.4":{"name":"@storybook/ui","version":"3.4.0-alpha.4","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.4","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"35fcf441af16e9e382036e366b0eb636e17c8469","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.4.tgz","integrity":"sha512-96XrSWDsWwJWRXcKP9cRtY9ZhW92g85xq65VDdWl+tO8lxelW6Z+lhdyC8judvnZ+DenVokONbxxomUzMJWekw==","signatures":[{"sig":"MEUCIFqQEb2mlJRiOl+Rxt+44KyM6YHVQiO8s3eCepZBGUgCAiEAhXUtBn54W0bqLiNQDsr63wzSXwNrqFEhami3q2z2U2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.4","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.4","@storybook/addon-actions":"^3.4.0-alpha.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.4.tgz_1515848981982_0.9842594175133854","host":"s3://npm-registry-packages"}},"3.3.10":{"name":"@storybook/ui","version":"3.3.10","license":"MIT","_id":"@storybook/ui@3.3.10","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"99a83b988b01cde1df61b87a58227a50ed196dd1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.10.tgz","integrity":"sha512-MiosMkpozvFdn3f13qtNJ04y7tw7yHwumYae2P8Mb1z93tiXLWY2lSRPiAsifpOfn4cmCNgLHcKbcXr9G3d9CA==","signatures":[{"sig":"MEUCICj5O8ETx3y6HXynH8K6/ex+q1/ky7sM5820ic1LRR+cAiEA4uOMRfJUVl4097CJl5/o65Zpj7X++oABb0h8h8jF4V0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.10","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.10","@storybook/addon-actions":"^3.3.10"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.10.tgz_1516361464240_0.22811960708349943","host":"s3://npm-registry-packages"}},"3.4.0-alpha.5":{"name":"@storybook/ui","version":"3.4.0-alpha.5","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.5","maintainers":[{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"de931bf1f7ce05024e9d50ecdfbe38345a7f45f9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.5.tgz","integrity":"sha512-G0IDpwQh63AdnHZmW1bjR9D1d3MDlWQmBdEZUasyUHv67hOzwzr+xPQepdv7Fj+pNpZsLxAT1uWgyV7iUD7ZCg==","signatures":[{"sig":"MEQCIFgiXq2GCRl8dyUWlUC3C7J072BCmdReWJ191VyfYiNcAiBh6dCGV8WPvP4ImGHRE7Xry1kdhWzjoDVNrsHPvgCyxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.11","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.5","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.5","@storybook/addon-actions":"^3.4.0-alpha.5"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.5.tgz_1516366491871_0.6121809328906238","host":"s3://npm-registry-packages"}},"3.3.11":{"name":"@storybook/ui","version":"3.3.11","license":"MIT","_id":"@storybook/ui@3.3.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"df500b97739da484d51d6a1bcb52ce3866ad2148","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.11.tgz","integrity":"sha512-Ovnt9AkR1jM1wdXjgN4B1PUobITybmbKqXSCQ7MDH2qvSfX5xfsfjDCVucSXxko3tA/OLshU2dIwgFL+L6EyRw==","signatures":[{"sig":"MEUCIQCa3RoXuWmHyClNe/wX/VBqOVeMuLETQPeLr8owiJAHQwIgBUD1dzAuj22V0DsklnXl12fXGsqGY/1Bz2heqQd2C0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.11","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.11","@storybook/addon-actions":"^3.3.11"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.11.tgz_1517035358940_0.8199352754745632","host":"s3://npm-registry-packages"}},"3.4.0-alpha.6":{"name":"@storybook/ui","version":"3.4.0-alpha.6","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"80b0354b125f664e68532a310b4b0cc6606b3919","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.6.tgz","integrity":"sha512-qLbLMH9Yfzv/LTEdzmSQbjsUJW6MRYgqH94mQ2Ogywqtbl6MY0ccGqmhBIjlsXM62hOOhHVcgwI2D79BdocTlA==","signatures":[{"sig":"MEUCIQD7M6qe1TPs/WTdxISt4r+0+dcf1zXWpgGuL7YFLILQfgIgAn05lhAL25wmKkNJR93LIlitUCLL9RZQVYrNZM0UKk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.11","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.6","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.6","@storybook/addon-actions":"^3.4.0-alpha.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.6.tgz_1517037492893_0.8478797704447061","host":"s3://npm-registry-packages"}},"3.3.12":{"name":"@storybook/ui","version":"3.3.12","license":"MIT","_id":"@storybook/ui@3.3.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b0a9cd83423c4d6cded0a0340fc4f48d5bdf3bc0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.12.tgz","integrity":"sha512-OoUBSuIfQXWuN31upTf+uLlpaiNE/kT753bh56z1WBngjft02mWw/xVcawBKFoTzqPZkD2IUmd0PYMM/ntmAow==","signatures":[{"sig":"MEQCIFW3qeUUszHaC0wWvbDyePegg3bh30LYaTQZDE+9WDc9AiAeXJtzEEcOnnsWwMts+Mir7G5mg8pHoDJU38oZxnE+4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.12","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.3.12","@storybook/addon-actions":"^3.3.12"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.3.12.tgz_1517624721755_0.5368514128495008","host":"s3://npm-registry-packages"}},"3.4.0-alpha.7":{"name":"@storybook/ui","version":"3.4.0-alpha.7","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1b5fcc6c25073085dcda292424805aac804c54c9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.7.tgz","integrity":"sha512-r7sDtnyT5X9o208BuVXTO/d1yLdgV3rQxLgVpsWdSqT232NmimFL7IWIIYPbiL2W/e9uUEJMK6RrXDt6fFwmLg==","signatures":[{"sig":"MEQCIGVgY6CxTV6dphCVOn8BZM533bSOGvnt+qtrufnBqb6GAiBbYEA2ZrpFUm9cCrtguMSwTr4M0yOD6o/hkc35B5z7Qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.11","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.75","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.7","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"devDependencies":{"@storybook/react":"^3.4.0-alpha.7","@storybook/addon-actions":"^3.4.0-alpha.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui-3.4.0-alpha.7.tgz_1517626618119_0.718788308557123","host":"s3://npm-registry-packages"}},"3.3.13":{"name":"@storybook/ui","version":"3.3.13","license":"MIT","_id":"@storybook/ui@3.3.13","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"97656822a6503bf07b66a0288c757768f5451805","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.13.tgz","fileCount":144,"integrity":"sha512-ecmu9l0Pr2PyZ6gWcK+AW0ZHNCQ1t1FkYm7JIYXWpAP0cBQ6EtvEoQLowzJ9GXw5s/s4hwdHmoxJ8j2SRuUulw==","signatures":[{"sig":"MEUCIQCv0FeCSRsHsswAaZzTin2OBzuW04E9XtCq1xL6FpcpfwIgDpytc7HrJObQIrjOc57vxpYC2Rp9gJ1UhY4Usx3QZos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":858145},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.13","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"^3.3.13","@storybook/addon-actions":"^3.3.13"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.3.13_1518329660328_0.36688956905713677","host":"s3://npm-registry-packages"}},"3.4.0-alpha.8":{"name":"@storybook/ui","version":"3.4.0-alpha.8","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.8","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"437e6835e6ca5dfd21e67baa7b853b80437ba6a7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.8.tgz","fileCount":147,"integrity":"sha512-zua5VsnAYxgDOwRsjYCUSlNdmxERc7rESOuLzGWidADBEOM6dAJoxKweriToyYgBUsazgcvkr1jBwTWjn26GyQ==","signatures":[{"sig":"MEQCIHb8JUqd9nXEVVou94jurpUimdUp5SOL4WaeVzrML7gzAiA+M9Xkv2EI6DuRkrqaPNcyG1SIQ/B833C2HCOyghS3qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873073},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","podda":"^1.2.2","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.13","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","react-split-pane":"^0.1.75","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.8","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"^3.4.0-alpha.8","@storybook/addon-actions":"^3.4.0-alpha.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-alpha.8_1518332354526_0.9101924303050533","host":"s3://npm-registry-packages"}},"3.3.14":{"name":"@storybook/ui","version":"3.3.14","license":"MIT","_id":"@storybook/ui@3.3.14","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"85fdbb08d77edf79e8d4a3dee42673157e4b132d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.14.tgz","fileCount":144,"integrity":"sha512-aL5mqZ8WNW+bRGVaLuvCfxiLtKvorL9poXosgyc1jZurwi3Z05k7injkg16LuA1dE0wSib/mgHXjgzKXHN+Fhg==","signatures":[{"sig":"MEQCIH+8JhulnZrdAy9LFo8BELEyHo5Ir/dcM1iEFH71dAefAiBbmJr2dBgaAPSmBVYs4Od40Wtk3fRiE00UrERCHUIIZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":858189},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.14","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"^3.3.14","@storybook/addon-actions":"^3.3.14"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.3.14_1519202451922_0.4141177998517742","host":"s3://npm-registry-packages"}},"3.4.0-alpha.9":{"name":"@storybook/ui","version":"3.4.0-alpha.9","license":"MIT","_id":"@storybook/ui@3.4.0-alpha.9","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0d507003c95eb7e3db5d6725c98bc9c9db445728","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-alpha.9.tgz","fileCount":147,"integrity":"sha512-KHCPujC2MtgqpJHXxHMLHRXUAGmnQQj6k8/cYyNFX1U90K8XfHjmNrsVySaj/7Cpi2GfK7KABmU6vgDBMdacEg==","signatures":[{"sig":"MEUCIFB62+3pAw8iJvbU3hYnw4igz8h5+yLo1uSHOW0SRsibAiEA/TDIDdG7wFQGp3wzPsjPlGkhInWVQAzboNJNpL5pkIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872987},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","json-stringify-safe":"^5.0.1","@storybook/components":"^3.4.0-alpha.9","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"^3.4.0-alpha.9","@storybook/addon-actions":"^3.4.0-alpha.9"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-alpha.9_1519289234711_0.8197288250795165","host":"s3://npm-registry-packages"}},"3.3.15":{"name":"@storybook/ui","version":"3.3.15","license":"MIT","_id":"@storybook/ui@3.3.15","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6430c18990461e5c9f4db08ec497b5fb9541a654","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.3.15.tgz","fileCount":144,"integrity":"sha512-p9r7BzmHg9Rmy6zXAsHiUXFYiLot+3MblTfcuU1F7Rc7l3zoZmA6RjIH2TO8DpqYLZiMB+hSFBcLSXfSYKjpdg==","signatures":[{"sig":"MEUCIAddMUEm9smo+MmTLgausuEc/09nPUlZYx2DyqYLktCnAiEAnqiEO/pSADcWj5YLXI8Qr3NSeznU/5r50tpJ9LipPrk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":858189},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","redux":"^3.7.2","events":"^1.1.1","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.0","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.1","react-icons":"^2.2.7","react-modal":"^3.1.10","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-inspector":"^2.2.2","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.74","json-stringify-safe":"^5.0.1","@storybook/components":"^3.3.15","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"^3.3.15","@storybook/addon-actions":"^3.3.15"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.3.15_1520416895091_0.7922233992688148","host":"s3://npm-registry-packages"}},"3.4.0-rc.0":{"name":"@storybook/ui","version":"3.4.0-rc.0","license":"MIT","_id":"@storybook/ui@3.4.0-rc.0","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f26da58c42e049c8231ab6705061bf9a7d055fe0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-rc.0.tgz","fileCount":147,"integrity":"sha512-7EQU6kd/Z8qg/n93RxyDMNRrEvrVe3vqAQmNVayybvMrPwws8zME+qQtQn2Wt+LH0fbRcUZnCN6jhDw5RlptXw==","signatures":[{"sig":"MEQCIHKuKiZ8SC6rmINPfj87wAXA6c1imSVdfIO4Ebu8MkZuAiAVgX81A5/ODwRknKhjyPZoEkV30/E/y9itVvpAqCmcOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872882},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"^3.4.0-rc.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"^3.4.0-rc.0","@storybook/addon-actions":"^3.4.0-rc.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-rc.0_1520478457975_0.3230837429675999","host":"s3://npm-registry-packages"}},"3.4.0-rc.1":{"name":"@storybook/ui","version":"3.4.0-rc.1","license":"MIT","_id":"@storybook/ui@3.4.0-rc.1","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ea12003fb0caf51cfca377d846cd2422d4e1005d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-rc.1.tgz","fileCount":147,"integrity":"sha512-iTOkQs5OD08B6TQh0HmTFSjTZwH+N0tX1E7GFrowsfi2m45jDZ8adh7KA0XLhOwAUgoShnJySgxpQLWVp5j/Uw==","signatures":[{"sig":"MEUCIQCdhwk/DefJj8OMV5FUPvw9ZC9d5qNysnCVdFn6P/ZR0AIgQjxD8V0KHKGLU3xrRvAc2GOwgd1qNjJA9WNpOM7BxO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873908},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"^3.4.0-rc.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"^3.4.0-rc.1","@storybook/addon-actions":"^3.4.0-rc.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-rc.1_1520937510122_0.8482456895535804","host":"s3://npm-registry-packages"}},"3.4.0-rc.2":{"name":"@storybook/ui","version":"3.4.0-rc.2","license":"MIT","_id":"@storybook/ui@3.4.0-rc.2","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a2f178dc43a3ad1dbbc386f2291409ee06fa41df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-rc.2.tgz","fileCount":147,"integrity":"sha512-NmzilOi+BsP1/DnDrJmc5WworHq/87QB7lhEcx3ktd8YFe9I6aUoU1Y2opSakldngOU8WQjs31VE4MQDMqziCQ==","signatures":[{"sig":"MEYCIQC04k+LobPTU/+KLC1jAHK+4IX171MXClpgyoVZDOgjTQIhAKpUdD6MRqjs4vKOgeOJ062rYjRiEpMJ+LCkT8BlOacE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873905},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.0-rc.2","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"3.4.0-rc.2","@storybook/addon-actions":"3.4.0-rc.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-rc.2_1520939218930_0.19821906220813568","host":"s3://npm-registry-packages"}},"3.4.0-rc.3":{"name":"@storybook/ui","version":"3.4.0-rc.3","license":"MIT","_id":"@storybook/ui@3.4.0-rc.3","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3f0e8ea3cf5ad154c3dac5c15e54f8027297ce0e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-rc.3.tgz","fileCount":147,"integrity":"sha512-zn+IAuwOkdCvs1A7zyIawKNhLQtpwB0Z4nGOvP0FSq6ygwR6H0jE18AsRKSUrGLe6RSo6jg0Rm+LB8uEZCtq+Q==","signatures":[{"sig":"MEUCIFBFPqXabMOsISviKnfIWVUG8aW0D1rXTK5lBDhRr3gSAiEAqbmzhlWm0GGugl4BtwJNvCjEOvjHy2+6NlQ481xp78s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873905},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.0-rc.3","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"3.4.0-rc.3","@storybook/addon-actions":"3.4.0-rc.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-rc.3_1521500730488_0.7238933806596264","host":"s3://npm-registry-packages"}},"3.4.0-rc.4":{"name":"@storybook/ui","version":"3.4.0-rc.4","license":"MIT","_id":"@storybook/ui@3.4.0-rc.4","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a60035d03547f44c69209a24f76221cf617c95da","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0-rc.4.tgz","fileCount":147,"integrity":"sha512-3RIgIg+QHPkwWa3Vf7vGi/wZU5GHPEp4x737lyyER4is9pQ8uVwktwLRvkWEMJDtFHbaaz5TifctLE92IyfAYA==","signatures":[{"sig":"MEUCIQD9Pb6NHckgZHchmzICF4JjI/+CPhFct7NUwErVUOfLcgIgasnrMvjKlarfH6QEawFIl+ed/hSEHNWo7ON4UCSo+3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873905},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.0-rc.4","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"3.4.0-rc.4","@storybook/addon-actions":"3.4.0-rc.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0-rc.4_1522297632290_0.5175046564094965","host":"s3://npm-registry-packages"}},"4.0.0-alpha.0":{"name":"@storybook/ui","version":"4.0.0-alpha.0","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.0","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c7964be7812ecdeb165bbb5d15b3b1fda5b66bf5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.0.tgz","fileCount":147,"integrity":"sha512-GJoW2WnqtLFXH4RmuGYP3L6k4NFiKucUWGZFQVEJVTmDYiUqASEYalPXg3kw4axJTbbcFL3tGwDFe60m153RUg==","signatures":[{"sig":"MEQCICRixdJdnYynzgvpI4yF4WYKfjrdUOjIO8TdMOOdwGTmAiB5raJviSnCOyA1NwJhXRkBqDyIyU5XrWF3hs3lJOcB6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":875901},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.0","@storybook/addon-actions":"4.0.0-alpha.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.0_1522301720849_0.7722664580833198","host":"s3://npm-registry-packages"}},"4.0.0-alpha.1":{"name":"@storybook/ui","version":"4.0.0-alpha.1","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.1","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9d67fa28f0f02ecc2dac34e9ff60b1c4d9328696","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.1.tgz","fileCount":147,"integrity":"sha512-7JWsHoJBK2EHOktsdmqN+wlNedX8qFNTEyix2rAZ4j9VfHYKkR7M5ffnT56Fzi0HJTXhmeiw3/vFgZwYbqCVnA==","signatures":[{"sig":"MEQCH0Lecuo8HPgXbe41yLZXwj7CAW4iLlEnTe4U2E8waSMCIQDkqKfDOO1nOnL49VHRvaGUHhIKjk7bdteNqW9tjHgZBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":875901},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.1","@storybook/addon-actions":"4.0.0-alpha.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.1_1522337402312_0.7519617958313463","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"@storybook/ui","version":"3.4.0","license":"MIT","_id":"@storybook/ui@3.4.0","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4826b7e5b67c0c6d0515c0aedf8df48f8c2ea3da","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.0.tgz","fileCount":147,"integrity":"sha512-fqVCno/Uo6yaohpDfjCx/Q+KjC93jy8+i+6ZSwEjJIDK+1HW1lrhqycv/vV4+OkXRwsG+y2GOw3MVPdXX3f1yA==","signatures":[{"sig":"MEYCIQCKzWXH9i4/N5Sm1yv5EE4b/LQBfVM+Mbvk68DSojyO4gIhAPpHtG+M+m3fA9kvtNn8bLWA9Njb8HWMkVPVXA0IMWfN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873885},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.0","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.0","@storybook/addon-actions":"3.4.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.0_1522453543954_0.6549426149634368","host":"s3://npm-registry-packages"}},"3.4.1":{"name":"@storybook/ui","version":"3.4.1","license":"MIT","_id":"@storybook/ui@3.4.1","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2f0109d806d7922e45b7f4dea67584d61536df46","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.1.tgz","fileCount":147,"integrity":"sha512-OX/mnl3jQwZwt1wltFcmO+8yPJlZgeQ4sksKy/jmMqfnk4GFP+UVmg2KIDYhh6Xl2/H1xi14iAdH9Z36losrpw==","signatures":[{"sig":"MEUCIEfGhYP70HlsZcD7dXQyOT+406NrhDxcXnq7qrMbV8x5AiEA0Ve9n0Qo2gCMQs88ReTdA2Bbli/ofYm/QIrmkchh0bc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.1","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.1","@storybook/addon-actions":"3.4.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.1_1523399719022_0.6533374183377441","host":"s3://npm-registry-packages"}},"4.0.0-alpha.2":{"name":"@storybook/ui","version":"4.0.0-alpha.2","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.2","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ccb13a15377a08c07b40582cecdac36241e9a392","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.2.tgz","fileCount":147,"integrity":"sha512-VE91PfP+9vsBvoeOY3k7XtimLelKmqVHIckIzibB3nCk2YCrEGp8iWCFnw9mZLggoaXAEaxJJ9gIUyarMMq6Hg==","signatures":[{"sig":"MEUCICBRhHlxssEPW6gs1SPkZtfifF6sV4WdyXgCxl7xLdRKAiEA6aUdJ22oRuKiiRTrkCY7xcoRH+rAzhUn9WIX3jczp9c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877098},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.0","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.2","@storybook/addon-actions":"4.0.0-alpha.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.2_1523407274015_0.27479418815043877","host":"s3://npm-registry-packages"}},"3.4.2":{"name":"@storybook/ui","version":"3.4.2","license":"MIT","_id":"@storybook/ui@3.4.2","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8e6bcb6ebdf88e7d7bb3d7dfaf4151620daca0ad","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.2.tgz","fileCount":147,"integrity":"sha512-0gyJ3ofyejxgtars0erO2UpQ3gxzzgddaFrWLnJ9gKhwkjXIgx4+zwkMlkqoLGfQVb07oS6PIOUyOe38eLeJNg==","signatures":[{"sig":"MEUCIQC79egVhRxKj+h0wy0tJGGsl79kAuvTNcsDkvt+VHVGDgIgKrz1DD+fIIdiKPeCqqmYenurcwe5fCswlw16u0GQcbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1oAjCRA9TVsSAnZWagAAQ60P/jUz2JMS1pCFgxmcbv/O\n1g+NBmUhujStO5WsbmKF4NRvfaPWFOeEAC5YoKdL6Hl7PTxGzLhDeGjw6oPV\nfi27RPTIy9k/j4NGfyOfxMOkI6hxqqtTT1Z+pQFdqdQxzHHYE2bnxp8tl/cr\nV6HbW4/Gl0wOUm0PGAqn/0gbfWyZRVU3VWJlNHZRvE2WYH5Wy+OJfC4qjbeO\nYeMCh6aDuDKJ0a8NfxH4BP1zcG3CJqnpOJGpMKOp09E8pWq4IhXvypcoJQbi\nDH89gBWi1MZC9mf7q7NikNiEElcbLy6hOkN5lI5kj05HWapibYpYMWGsVuJu\nIWhc2uIQa1Xo23k95P4qxVRWdF2Kqg14USRlHeH81mYQazjpp/GB67Lr3J6K\nX8sDFDQLLnvptiO8jDkenMYe/sZ8/MOmJMGlx8wc8nIkHLBjjCN8+z4DcaWq\nJPK1nIliRqiRFaHzwwfXi55KAS94zUQgCbhPLGOAOgBzZLGqNRLIdCnTsvtb\nkewPTd4wYc14kjKSnEYh+kVhxKlpHk2QPe54yHFSHkjL5UDoY/8uD4hUKyqp\nZli9cchZcdcNKWXCTbaM3EpGvIpy34wJK/PYlf9wceyWMwnUGUwPM/eNCD5u\nvHnvKZOViqU4UkYy9K6bv/+gUqI9IXINrjs0IsP7l57sY4DbJ5dYelfheprx\n5wUZ\r\n=VmwD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.2","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.2","@storybook/addon-actions":"3.4.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.2_1524006945846_0.834482586745344","host":"s3://npm-registry-packages"}},"4.0.0-alpha.3":{"name":"@storybook/ui","version":"4.0.0-alpha.3","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.3","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1127338d2875b5d53e0a0b76bb9c6b15ad177add","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.3.tgz","fileCount":153,"integrity":"sha512-WGIjaNMYDb57NgT2MnnucSaaBt0mlb5e/NcONbDc+e2b8YlrqDNh57PiSzKTlvscmu+Po8jZjDTaH4JDMNm5uw==","signatures":[{"sig":"MEUCIGHNLtq93KJ2ho7CJTxSOHDfKrMSnM99xpMO1LCFj3DtAiEAiqyX1FfDOdv893O1nuiNO6UROvgW+ddNv1+eTcUkWK8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":888242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1oitCRA9TVsSAnZWagAA2o0P/1Ryaz/02A4XgwGCsFBL\n7xcbR4jNweTH1eDX1faRZBewPo2vdStf+n+lUwQseyMNVm5BFWgWrCC4kWIu\nn8Inga6oXECQ9hsi5fK9nzpNB9Gpk+i94K972l7pfMnh8UVge0hfC34ZHCUH\ndQOPckYhvutu4AkCZPDBEcuG/K177A+AiVp2DIZPnRlZHfdm/5SYKCgOJB9b\n9w9I2aLUPKdKhJXqX1S0/z0tLWZ7EwKmkOVV2QASRZD6+hArpspSxPeGsa9Y\num0LnDCG/Kn4mQH3+tmz5hYSSmy86Essk1wyWjqzSLwRKqQdDRtCPaPy3S9D\nDcMp4LBiVVr4LpbvHagR4lB05hAgvX6LrB1hY+Og4oRL6MtXlOLHcMw7DxjL\nUPzod7MGTfHJKO7ABpjXzNQqZ889pss+kKCWjpfQ921vEKNtL3lwkBfkd8JI\nKO6FRXSO+cEShcJirk4PaGMfClRaXwIJOWECob2Df+vhHzZONYaGQk6Cxsbb\nB91rMcJuPzWLaYMZr+PFNIJ1P64bjG0BNAgxV0NRMUhu5rL2A6COxGq/wCst\nmOJX9wRiziibP75Ugqpi/tV0b5h67Ecnc4pmeXWfaSOEt48wzclI/9TuOal5\ncvwCAbIqNBNhL2LB/V28vuqp8qUqXm3gb/NHZz2JHIjnKpIAV7RWQDYMf7FR\nkUsm\r\n=CqYS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.2","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.3","@storybook/addon-actions":"4.0.0-alpha.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.3_1524009132687_0.8418535296441643","host":"s3://npm-registry-packages"}},"3.4.3":{"name":"@storybook/ui","version":"3.4.3","license":"MIT","_id":"@storybook/ui@3.4.3","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8f3f43da32290abab2e4293d2567316b2d2ce91a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.3.tgz","fileCount":147,"integrity":"sha512-AZBsdw2rlm68X24jVmsTSlwOnqvYlTld+jeFKVpUTW6LdaTTF6xlqhYMiqBb3ykYeLP7/tyIcJkZJvZIGAoBZQ==","signatures":[{"sig":"MEUCIHrH4E6CpyITW1/csEOwqaHG1X7k7RJiLmGY9PXXX4DcAiEA4oajHHs98JtYVsWDPKGCpi34RX06TIkztxywSESeBFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa43XUCRA9TVsSAnZWagAApIAP/RcDqRHbny5BbAXeK0Q0\n2A3i0csjGFNRoYfIerrfSDFd1EGGGjvYT1E/jQU/qTsUZc0TqbYV0iXZ37Ed\njdsR9tKyXfv3B7B1smuAuccPPFAFMvzToVlO7YKggjnhyK1lt6HhcDxmgxHQ\nuehl2EPSOtqedCyTssbIWsZf5BaVfYkIVxDGrvCzwbkMfG03EFevRUBB0Jkw\nDxg5Xz+O0+qv99wjZGua8WRCwU188ZeLJy+NcrnnxAK6xXlfkXzz1KYrIMYP\nCegQwheTIBnmGQybU/F1mmD4x/0JkYcZtlIkemV1g84XgkkkTQl356VZHfZF\nMM6NTKa9eJ55z60TS+tRwDV2fjkq/9B2xXJSAs3IgormOjiPK2GqEXqq4OBs\n55u5A3EM1NVWiFxBfFRGarkBL6u6hbebuN9CpNlopeT7xTpXBUienoWwzIR3\nKKPGuIXaFYcgcWzP3mJKpIG1MntUgrUMQjxRNSGq4fB57KvnL9sLQORYFYIR\nEtdT/0cZvFiLR+vC7jKaDpl9k1bhAB8qT7WEdKPjLm1tHEL8KtJo6KjJ9cy4\njRcS2o0LaVAAqrqJr+fLMhDB+v4DE+jfXVanBecJoMXm3HVioXR6PmWZUa5i\n7A9zpogY4R2blSDFnz0/49FMWjeN27rL00IgcW63gE+ki0X9gk9CkNcBJOGA\nETcf\r\n=q7WL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.3","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.3","@storybook/addon-actions":"3.4.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.3_1524856275343_0.28652864352929597","host":"s3://npm-registry-packages"}},"4.0.0-alpha.4":{"name":"@storybook/ui","version":"4.0.0-alpha.4","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.4","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a6344ba2924c662576343f99f4299c86a419ecb4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.4.tgz","fileCount":153,"integrity":"sha512-C4bUzcZz8PiDAlfKS56++/UC3ZodOe3uNR6dcQfyWa7z2oiv6KvJbuIoL23encFfX6TkTyuG931GOHrtb0Q6zg==","signatures":[{"sig":"MEUCIQDM91U8ORAgAcSog+2lxH3nZ9ItWJ21G/XdMDeBJ8hoGwIgdGsJg7FxVoOFjibrNKV8MMoMe7dvQWHyK1ksV3ZxCdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":888206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa433/CRA9TVsSAnZWagAAj8MP/2ix4/RDGgRta113nBSQ\nhC/Dz2uK5+PTf1VKxIS4Zs/a/oaS2i3RPq1YlBDM2OTqPiMypslFpaLBSKTc\nzZWjAsLPb57i5GQZ+PcvTUQ2T68JMrX0LZVJAth1HIAEsdo73qe7eAmBKT7O\nFZBoLqMElD1seYr/lds4XFWP6pwxyei/roexPo4JlxDWZMxe/pHdprEYIU7L\n/79Hmj5A5tHBOcFWeNH9h42I0CbZUPlV2cwsiYjmowHbIR+ULcSRO6oyaqxv\nWNgCPy/wyrFiDKbq09KBQCyNEQu7Llqd0qphjDyZVhEYQs8HXsCGzYyPqKgn\nxpT0I2X14bwo1xirJXx5dRiSUc7adFd1UrFd8I/j7wu0GNxL8O1TthqQtqDD\nlkEsjUvA+o6hI7D1i9XIPERWFaK6H1ND9FLaiYJmGspuh2ZJ8ynyoP6JgEAd\nsvTx+9148MUdz5s8nwai+ybzpVDTgpD/OtVssM8qtYdqjAa/4xgXSrtanwal\nKpwaTOfO5tV6RcVG30Ht4m4nmV2V88DXJwJbYSNcq3mEB1DFIugkuNVFuPhk\nRB+XNqJMTbl92Dup5jc8sQalunwY/qfZsztwjwP5rZUXVco/sB99nLY8ZbF5\ndNUbl0e+mlNldCsXYdnZITYKVnVaGBpLbovaGseeat+qCWckhkxxMhF+JFDN\nq3bb\r\n=Sy18\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.2","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.4","@storybook/addon-actions":"4.0.0-alpha.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.4_1524858367011_0.3146964630159701","host":"s3://npm-registry-packages"}},"3.4.4":{"name":"@storybook/ui","version":"3.4.4","license":"MIT","_id":"@storybook/ui@3.4.4","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2bb8ba4cdb7711695e018c2cc2db0a7e1c48a09a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.4.tgz","fileCount":147,"integrity":"sha512-9VaDeyMBsB4dThaSEovK8EyBc6MwHvH9H8jtV04iJIPA4yV7u980qKCHhUPE/IeJtpwJOGlqduammJmYGCuP9A==","signatures":[{"sig":"MEYCIQD+HwbrbffpuNbdchudvKOxriJ7kYQzL6tqVkIazLTMxgIhAPRi6NUErp7RRXsO8TgRTyVo+CbHlNCchIJ23ek3QNaB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa90VpCRA9TVsSAnZWagAAco0QAIyeL9D2ZCLRGoc2vmfk\nYiDSX2IEjzN1ptgKweY1xXPINMgfMQ/auJ8c0U3Utrfk9aFo3u5ezq5LGnQO\nFYrwLRKT+1hviVjlZA7QadLBP/psw81ndnH9+OESSvJnxy+F3FmGXYiYDgzZ\nnurBGPKoy3yrSovJkcRh0kog2uoH6A1sbq505AY0OEB2BNs8q46GrW2tV/2+\nIhRVOmJOmH9JUcyHEgcXNO//oCZ/XAxl6wpIb9IF+xbCcKV2cjOpn3Ci9g6O\nAvcLTtbaza44dLkDVPRW9VzeQRUK+paOw7bFdDzaBxfkyCeLPLe69wEQLpyH\nSesuEnn6GeJfGKGmNCznFXxBjI7D7OnLF3WsM0Wm2oOSO430igoWAeD+xBCe\nYNqrM4EI8VwYPpB1Y/KgX+k7MDXcsofhhRzVbrP3OwudQEeBFRB9lILKay8G\nyLaJymIhWkvcrPzXTUB2C7+YO8VoNVyFuYcM9n+M2yLW58B7bhwZN7ZHRanl\nN+Rm+KRMjSwzuFkqTMm0JnA1srbuDZKz2fLP9KJcfxJO/7Tc0rXNAK7mgvD7\n/pqppDx8dkLp1tAwtn2gb6SWPcWo+gsMquJfKY0EK07TxFPtx1Lqe3z46lXi\n2aHi2FM2p0za4Zo+AwCb3JTVSnLz3mZirgCUKpb6+G5syxUUrnxXjSUCeCay\n0igU\r\n=ix6f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.4","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.4","@storybook/addon-actions":"3.4.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.4_1526154599861_0.5174709510241093","host":"s3://npm-registry-packages"}},"4.0.0-alpha.6":{"name":"@storybook/ui","version":"4.0.0-alpha.6","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.6","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ad936bd2a2910562c26ac9d6affd68789b4b8407","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.6.tgz","fileCount":153,"integrity":"sha512-mrXtdMbreMwA/NRcOPrEwaqgcrywUjAMsZUjDUuSTord8akKVeANPK+vUE74PavHBjep/FDchlJPlEKIcWY/Zg==","signatures":[{"sig":"MEUCIQDxfZEQgN/vjTLB1S/TjW8KE7fl05ijfbhdr3kK7ov0wgIgLi1jJ5kQ68jqfx/3s/IyIO6R3THPG1Xe2lnAvLMqobc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":888435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa90/KCRA9TVsSAnZWagAAyj0QAIj4MZRm/nRY1hqq5vNA\nbzhzROaSZhCzHydcPlLxT/S5g7dAfVguOlpCGXCg6JncxyI26ew3wYljoHWH\nxKeg+OOBQYF/t0zVxJ+FGjgc23/yjPWAwJxY4URW4x0qq23iPsR9JYLWfRby\n17blgHHth3sYb+Dq0vDZu/O7d9p0IDZYC+ucw5OVTTSOz8D/lgZO/uSYeIg8\nOZVJcbosFiOIe5YnmNQzcM7Jgq+WyYim2PgaL44GYFdaYZ20PT1B8dgj1PGz\nh9MfCSFGNBRF/LAsweEKLbRy0lCgTXNJuOZfR+gy57Z7XTwu00TDX2C4ns1R\n/XYe9UEdKLWk1gxXtRYbYAF6um3Egcb1iqJV9zuQ5UguQ3mmgvOVQU/oLVku\nfuLGUhLY5C7qUX9U/M4tATPs9S9gY1UD7Ick/MaZfL+4hxfbSh4iqo+LNr27\nR63i6/L064dcWtByDEgl0bteYUuDMK9mzaVuDsr1ulwUAAkuyw5lM7pvHusY\n8lqbYhUsAs9fNa7N/rjlGcaLfBJTIzWZd6DtwEjum+pbsQjlkKitll9gaYdm\nzVgNvaXqy+jiW/Bndk0cEx6t7TgkvM4OI74kKQVVH8noqmk/Ie+kWXOlur0C\noeeQO9vmXU2yArg3b7jkX1o+CamdRQ0P29BRlkzbKNyu4FTJcuXbl/fxCNOs\nkO6p\r\n=kiuU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.2","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.4","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.6","@storybook/core-events":"4.0.0-alpha.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.2","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.6","@storybook/addon-actions":"4.0.0-alpha.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.6_1526157257751_0.20305318461120492","host":"s3://npm-registry-packages"}},"3.4.5":{"name":"@storybook/ui","version":"3.4.5","license":"MIT","_id":"@storybook/ui@3.4.5","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b11e97590b5e09b2d1452c0a4b84567780ec3390","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.5.tgz","fileCount":147,"integrity":"sha512-UxHsfp80M8nCmBMA9b37ZjZEqsReTFGXzeerNK2p+Y+eA7tivYh2X4V2P/Ldq/2ErgCLvHlszNmGzcC3KNeiuw==","signatures":[{"sig":"MEUCIGNHutJesismLwLdk5zRVKECVSx8FcI57skpzUNFg4GmAiEAu4n0y9j7WYFD9WVJqSHOq074G146SUSQ5S/WS5LmzS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/f6+CRA9TVsSAnZWagAA+H4QAI8Y4rAMhqRIXMZtp5wb\n1ClcMEjSVIKDkwqNCCyjtaaF9h+fNdHjUcwhjdnZzEW9QbmNKpeVrwiGMRqW\ncghSteNH6DRecTGdv0MDhDn/gi2erltwKhJKf+Pr6ru1hGjrLiwLMy1+GjqR\n76Qp+o47vRgFR+F3tw8ZKCHizJCwOAexO7E9UkejN4X9SaqT8qAjZjS8tFP0\nt11g0knpfy/oQ9FiGpTj+FSAwzuNQTKd4nJDfQvzmrMZB0wXvCnxfTqU+Axc\nzdsFhNT+s3eLQ2BAjUZe9K9K3ZssV8pgcLol9kWZIQT+KJdL7rLxc1ULtzD3\nNcLwn+kQCd/AMWPbUE18Ii5WHvtCxw9WVsYJkziUqchLZMFlOKA5ruIQMLw9\nrEerYKOohmQxMR2xs0/o2Vmk0W0UX4FVTx+QqCdYLfLy8Fny7R9IxFqZDb1q\noorUMkHAaH/56uh/Y6yUyTllflKoE6VHRVGur+5aZFC7dKn/quL0aDO0zWpH\na893/tSyMs6mv1Tf8yviu4nur1ux00cL7+yjxFIttHu5jdT13zYjIOKcgid3\nwzCWGU8t3g+OciW4cFRD7qtAEPlP3wW/mCUK5MNrDMo8XkfFv1xwVf6ULjx1\n6PzvX0592vU1QOqh4j2eP5SyXdCztdFv46MtBPbA94hNzegnPjLv8LAUF5vS\nAebE\r\n=CW1v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.5","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.5","@storybook/addon-actions":"3.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.5_1526595260982_0.859322993588256","host":"s3://npm-registry-packages"}},"4.0.0-alpha.7":{"name":"@storybook/ui","version":"4.0.0-alpha.7","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.7","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"34f574e82558a4d4ffb992bedb91b2db25f667cc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.7.tgz","fileCount":153,"integrity":"sha512-LVVntjKFcu7CGowT1JYmSZj0T/5ewrxrS3AY7+Raf0h25PNsTHk3kQgOdHfEgocb5lPZ0so/6CHcagdB9fUTbw==","signatures":[{"sig":"MEQCIE2yW8DA2Hnirn++Wqw9sYryNEOQkpRIzq2UbjajxIZWAiBeSPEFQjs0k2pPX+09i14h/qbcxtBEGV1HU6ZdFwthvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":888435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/gp9CRA9TVsSAnZWagAA/RsP+QB/8kRxCS3Gr2NCFzM8\n98B+0PXhL8e3jAnXSrJFHH0jeI3GQWmOQJBdAeZwNssGG8zyqboTmLNh6kwE\numbegwJH2oXrR6zJ8oVGGGinEhWqDhSP28nCNAPxN96mAsuaTRwcgORZKwHR\nBN8Khkla+q9vH8HbNeT4whPo0VODJT5R8q2n/gSmLolIjCwe7RxhMXFdIJLJ\n6BaCyL0afE9nf1yBNtM1p/dSI1jRchDd+chHfeMaRdn8f1QKWKOxQ4gyE1+w\nGdmQviQ0H1/MtJizpckDFh9IQfZMnWd1QjXZaVlCtqtJzrxkN+awXVe5LDYf\n6tzAnIZ97NWtrSMWcsNQHIyyKA/Ytz+wmARBRq4M+iH/hAWtkhpNRUo40UI3\neMkW/e7Lc/LVDa5mGbqMtgKtlCn8Q7qg53K3vtYgxPy2LEl8Xq+k6lEsPqRV\nIdFN8Fi2M7/0YoAKyAuH/78epQ/hsAQqif1QeWeCTYB/j0mFwCLmEGCY3dI7\n8ybrXPIKgQ2iP7nfohJl6Y6ZAA2f1hoLUejjdOC27wR+wkGlji8agq71fR58\nWhbjbOPVfCG1CDIlUPcm0OoND3L6GFzao9/04amZyzpr5RO7C8QiDC7HCpcV\n91KnLcqrmE2kb1bo6cZrwhpKbQ4bDJQF+8qZJgMyy8RzM8gi9EYryFGaFgsO\naf7x\r\n=jrLq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.2","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.4","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"4.0.0-alpha.7","@storybook/core-events":"4.0.0-alpha.7","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.2","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.7","@storybook/addon-actions":"4.0.0-alpha.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.7_1526598269463_0.8914083122940129","host":"s3://npm-registry-packages"}},"3.4.6":{"name":"@storybook/ui","version":"3.4.6","license":"MIT","_id":"@storybook/ui@3.4.6","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c25c93d0843c4250b77b2a3614533a7d5790893d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.6.tgz","fileCount":147,"integrity":"sha512-jK0xxYqlffnUKgf3pnIzmNke/TpvaIAU3RbiUxDbvHO1+cgSjiZ0SZaOAEkpsx1sAmaV8PBtPxIjBBjj6UIRiw==","signatures":[{"sig":"MEYCIQDCsCWWjPXVPdwFrkSG9b1Nfa6+HnwzWiGHC3ns8qnZ0gIhAPgdNx3/uCpmYgY0WTWlgaUIfNM5gyAqdcVPGO/xWJbS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCf6lCRA9TVsSAnZWagAAS5IP/j5sUcpNMSwrYt7F3YcX\nBMJuGqTz6aKDd4EXTSE3SGFnh9k/D0ZdpHODG3WuLmBzs9HkpRqeS4rukbTd\nSgZyO9AKtHOca0F882fydt7TNYc2BFlySoMhMrlA1/RXZIflO8UcPeLEpkiX\njQLrt3e7+afPVe17aVSfM7lbExtDhyiQX6S07NjHCSSxmwtR7eEDVf4XXBGI\nTd71IzIl14VEfQ9hUaO0voajegmp2RRa6PSeFSnk5YnunymWKVIHt7Af7hRt\nePd9HnjXgcXUH64R2a+5mvW3YBltCVHbWvFNEFiN1zo/XT5CpKJV9bz40CQE\nqpkp87flQ/Bqe6ScwAAxcq50B3lvu+kIi8pDisiG7tXEqMrhtW0ZONfb/9wB\nULwg0b1FIQePzkRotQeqfLQlLGhu0RWoQw/JQ1YcYKcdb8r81bX1tU5+ZmCy\nd7bBgohsKWfq+RVJ/x7mg623t/6maSK979XShpZ6bEVFEprCtu4dRAR52EbD\nuV188kklpN8uTpniqw63JlZkY25ZoLRCfeFoV/a9QU0OSwyUiMx6MJ1bCSxI\niIMExthG4084uheqTOa1wGEdB7QlRySVMzTDFQi08kvBihyPM127DUeIWwFs\ndb/bh2qannlrM56jlnVLsyGwLm1fbGoW2J9bxTTMrSxX31OrIiMoRKLtdaAK\n3vOM\r\n=JFdE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.6","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.6","@storybook/addon-actions":"3.4.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.6_1527381668288_0.7979969513514165","host":"s3://npm-registry-packages"}},"4.0.0-alpha.8":{"name":"@storybook/ui","version":"4.0.0-alpha.8","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.8","maintainers":[{"name":"anonymous","email":"aaron@aaronmcadam.com"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"mlthutrix@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ef82a5ea6535bfdbd1ad94a62f8dc7831c4ae649","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.8.tgz","fileCount":134,"integrity":"sha512-RK1gVE0yVn11ttgH0uARPCMvuINTt8I1z6qt9YVBtbeFuuKyGlcwHdBkpJXWAza4j/nJGTubi+U+fKigCK/8cQ==","signatures":[{"sig":"MEUCIQDFF7AVSkzTs6L7jsOA7w2C50YDXP4v9UEoCj+xiGNcAAIgWzckrE+QdCKELUiehLDiByKCpxC+UNQ5gnQyqPP6a7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":812229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCg6ICRA9TVsSAnZWagAAtAwP/2tjHe0k99U1jrqYi6UN\ncQ4xt0qKBeTpWQvPptE8LGeb9HoZsE9NhZmDJt8/rlUF5Ql9iBwtt+9OTMYB\nFSQetbxt/cg/E/0awZQT7eeMWURY3ZqNKSh8DxQOpXULwTTfhtpDLjk8nZ1n\nVgEzj/dohGLkyzCZiQdLnNsgm8EGwMVphT1hCKy7KGlCUsoa8gHv+tB0yIjC\nOnskSngN9wItXP7TR5FIC0kI/OKJc7W1ZXn9wdCfHM0s3pUGGF79krLVsE9s\nA/BzmhBk2li7ohTftOaBQBBUtfA7LzwfXPvPsKJXJlu4WN5fPocJCRGa38/m\nXFh6+ROO2VL0zt9ieoNtwsdaDiKqLbm/ZPznEn1S641DMuWEflN2e0AUDuIh\nw9Cjyja+9joOQcHIfwvPG9MuNuo7buPZAZBcRX869BCQcWClzB8USe7Zs2ZJ\nr374TOHYRAVK6HnbWmRndYerMHihs6ZS8qa57nVG9H2xNfRa5s3KcZeDXQy2\nMINUa7smi9vkOWA31OHNrVcTRafxZ/xgNolX41cBMC5F3O3fozy/ggPG0s/1\nek2XAccE3DrlkQ/X6u5tKgk+X+qLwvwfKKmjdwqPXAHLq9eBQML8fi3+E2Nf\n+VQcTGuBVJ5eMocO6Z2lssb4G5FwdLhg/4YI/05pYSm9A20RCbvR+SFiEfAq\nN4VQ\r\n=iKLy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.2","events":"^2.0.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.4","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.8","@storybook/core-events":"4.0.0-alpha.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.8","@storybook/addon-actions":"4.0.0-alpha.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.8_1527385735964_0.400958542569684","host":"s3://npm-registry-packages"}},"3.4.7":{"name":"@storybook/ui","version":"3.4.7","license":"MIT","_id":"@storybook/ui@3.4.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"59a8c0c56e1e467e0cfcce238d1424d338561311","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.7.tgz","fileCount":147,"integrity":"sha512-GMloQZpsbNI5fBJZemwsmLjkso+ccPtxa0rdpt1gkwpPcB8uoTQglK2Pbg+ojHR5y46K/Alu9bmQ1IZRfTcVzQ==","signatures":[{"sig":"MEYCIQDiNiCVX+xEDUEpO4HFBPT1TKcIHF72iXgKp1iQvISxjwIhAOVwdzM6QED/Ev52ZFhGpKiGOVVI2az/wrSexV4oYRdp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHKmiCRA9TVsSAnZWagAAPzAP/1BE9csHhcgqU14PKD2g\nA2RU02CfeXYDe5Er0UYd6Qusx5+8DbK1dl5Mq4+9VOVqtMgHBOkTwUieUI9Q\nuo8bU4k+DSUykrrlP/2Ns6wteutuuUclVOEwOMk6BjgQPzLXlRAZps9E/5zv\nJdmyGbsmGQqFkg32pJziZm0CuO+w5kS2tNKprBTJA1NtvudmX1bxHHEZEHGS\nGytScKWbJWuV5mB5RmejmCNaSMP59wrzMRqBHfXaOXNpypIYDTRFTJxW88db\nbhUHbJbMVmSCm6MI4D5Qc43YJgPYtJEeEwCLkj/WEaTKx0M76DaSuB++/JI9\nxWmo8jy+xXbGVbTtpp6xB6zGclC/r8r+l26bWCvvhGjZVeD3WDBz8kpRZA5+\nwu86junjy1BjejDz776CVYoMCP1tEMDM/OOaa14I219X0xddfsl63oTggLSS\nZW+/dUubUyqv/k2oeuCYdogkcru8uOc49vyqyZ4ohnq2v6Y4lMgLAIykusts\nKaDONM5ye4QHQXukDWpkmzfzUiZTNxiXMh0DqMrPH3kK3AbQns1JnYEMgfjS\n+uybe7W3RerIZ36/82+JQd1WRNM/a4V970ZV/uqPw9WLq1y+4W7FBYvMBn/E\nK0hw2qo3vGfQBp05E0JpeXBeA93Yvw+carty0Ox3jB0nJkGk/dUjo92iJ/yK\n1G4h\r\n=Tx9f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.7","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.7","@storybook/addon-actions":"3.4.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.7_1528605088692_0.5547146136446086","host":"s3://npm-registry-packages"}},"4.0.0-alpha.9":{"name":"@storybook/ui","version":"4.0.0-alpha.9","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2fe3c74172c80ea66caa9709a8cc3846e02992d9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.9.tgz","fileCount":134,"integrity":"sha512-sVfYb0F6YDOcLzbIYj5lAf946exEm49yxFfvUlG9mr4IYESw6tmGLrURyzqFcmPJWgqF+4byS0d5nXp0cSUf0A==","signatures":[{"sig":"MEYCIQCFxatJAbfRAceKUEb6O7rywfri2wUp6IA7pjbEE6w1mwIhAPbOUkfpzijEDxc05oHTIj5SG7Vt1V0qu50FGnUCJHd0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":812229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHNauCRA9TVsSAnZWagAA7yEP/0ZMqQXKFBxY5ZkKDeP+\nXxmhj69Z4P1M/8QkM4zPhjp48Z7wwGhsGaSiEnQVLzlhTl8+HTJpR8V0Go6q\nYflNZ80u0XUPkFlC0y9eH8M9k4/rplmywAWpZzHJk7++qToPbpOQc17FugJH\nDoWNO8ND7xOYW3qDUobDiCYf2OsYvT4nidfuf2urhbsmWPXfTfXYoKUiJf0r\nhN4qYsy42XRiTg+bykwA/HIM+XS+pX0+c12nSSt1QkyWJf7zSjAZu6SoYXYk\nRkrGHtQVJs3yyh3JrMoVtNz0xDNafR/ROiTHNbOvtiakBmJdLD8vJ+uOV6e7\nPTRnvrnpKHnRwEshFGZaq+xFN5sgD2mh9AFZVf7MbREXpvipbCBUM9JGDR/U\ntH2+x5hmbdLy2d3uw+P1QjvzYBRgGTDoco8lCKEw6CmKk/V53rWlH8rNm6Y8\ndg/HtjGO/NJf/kbzQjWubv56eClVMGHrPEgNLVeiCg17Tj12w0WKPdNqSKkR\nDbn5lBmdRGnsSte51sCbOUAqFFA94Nqn9gkZTSep1jKpiOS6CT9hWsbqyeAS\nTlzQwnJ2B9GU6kdcI2xItaShYp+/6nk5ssXrFwutoHso0Ya18EvYN/MazSJF\nA4q27fruJIBb8aD5VVdB3mVx8zNmlqiLeKqwmxIUNTwJ/VTbGcIxDGRwQWqB\npT84\r\n=10Gt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.9.0","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.9","@storybook/core-events":"4.0.0-alpha.9","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.9","@storybook/addon-actions":"4.0.0-alpha.9"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.9_1528616621988_0.7079485550684592","host":"s3://npm-registry-packages"}},"3.4.8":{"name":"@storybook/ui","version":"3.4.8","license":"MIT","_id":"@storybook/ui@3.4.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"73245f02a714cc3de0bb1b62261ec64b6d0d65ae","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.8.tgz","fileCount":147,"integrity":"sha512-BLa1eEZ3MHmJ0P9LT+tVJ9MK7Gcec+rFtUw4fDfBqCJ8NYNZz93qkc5CL9ebeqS8C2UgOz+glM8Mi3kTIq/dQg==","signatures":[{"sig":"MEUCIQCVJRBVjzNobH3HmVLfnKKYjLUUqKwUkWq7QBjwjK+ObwIgY+I9V3dlEVPOyluWSFpdOBcmevFvSvz3/dAiyyYET/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK6LVCRA9TVsSAnZWagAAKIwP/jRGievoUWNgiTij28V/\n9lEgRqSHRTOknvVBKSybwreF+et0wNFi52HKQ1V/JfeElOOOWVJJ+wJqRy40\nJhZ4vVZZRhELGLO+ZHGKcLxicsez1rYu1C5k64OaMYFzNObLOxKcPWhYs/kD\nDLcn86WnXy2kOWuetWMW+JE+kEzrn9PNjHLCGh6G0GTmlSUOj0WQwTobiobX\n7TQL/ro+dgUL7z9iTQ541AmWVRGkxGloWvl968ZdnH527am24cmZgsH9U2Br\nZ3/q22gzVCuReufuMKobvD4o3xpsfSx7WAhMC4BZxDaFDU5frFSUMdj4IrqD\nM9lYc31ht0qEPg8XZuIrRcJpmHnvTdUVYaVKNPcuUUhSafaSxh9i3chCWlPp\nCsquo4a/e9wbA+zrNFqLVdoEzZ654Bu8q/DIMCXSPN5mMXcF4QzwkE5ij41f\nUJCJrWtE7kRwu+iKtCLKpQ2xxVeTjw5fRjGuw4KmuRhVa51H1t2L1XBElnF0\nJwhhRK2AoXcagHygxNX4PDqnf5zEQIlp4BEouCWvzgGiYP8IkXXkSvJDZEDo\nZbSE7kq/S19I8DOgHG1gVHyH2a/lcqpuIS7EJi1GVGa6tl7TePDZ56rRg5gc\nd8ynLjg5HFHlecJYH2tvOJJO4+G0rGfYj1jTnXbAJ46rOJsHu5Csej+sg52A\nXloy\r\n=dGGs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.8","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.8","@storybook/addon-actions":"3.4.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.8_1529586389517_0.557686886828533","host":"s3://npm-registry-packages"}},"4.0.0-alpha.10":{"name":"@storybook/ui","version":"4.0.0-alpha.10","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c8a45adf7a6ed1e26369df17d33f2cff131fcbe2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.10.tgz","fileCount":134,"integrity":"sha512-J/xsagvoUGwFqRTZcyLMd7Mn3kf7PSqhC5qbLbRGCx19iq9G9ZTmPQXRD2KWowww0Ps/OodDlV8IQSqBNQwXvQ==","signatures":[{"sig":"MEYCIQDG5Avemw9iP/TwTnCFdJYXKb3QgdiSkmuuSVdrGNGkwgIhAMXP38xpjvXVaEpaANoUdepEl2x3nYFT7zBqlhT9/YmO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":812234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK605CRA9TVsSAnZWagAAfX4P/26I4kaDoel7qFGOPlun\nfXQKQp1Y234lMzakRaRT7jg4jcZwZg5U2yHcTMgCGbVqoLuw92VMEL1K8PqB\n6eWLvI33/d8XYHoxN7w/GEOXIx7MMAcR4YJXq9P4qpn/G245JAXAjoaxpEfn\nvM8OGw7sAlNTcWv+OPCWdJHoaUNTmKtH4JYFh2vvSFG0/glU8prga3NxOhfS\n51+lH3qHKG3c9Ril2HUDqRstKwGgBsBWtp0WwIuBXqgbFod1efscA2VagREu\n8ruyB4MDJHhQ65l4/Le5FQnMrI9AxJ0m8WzX8zKuxbjGmpX3jPTQszpDnJxy\nBqVr3Kiws8Jt22Ta3DBDdzLo21zbM6PrkWJxWrHGhX6KYKUZprtdmRT7I+Dl\nndFNMRMbAlVLzc/3Ut9SrnxFz6nfEjszZsjFFmlPcH0vR4Ye+9pXwROPWgFv\nSjkA+jRk8w/ZMLmUD8FIvjCITu8raJeLpIDuL71Toud36EcE5s3Drdh2wS3f\nc4MqSDsOOhtXN/L9Fg9yDLnYV6QDzcbNzVdwm9Z05j+rhPJ3DlRg0EdN5Rrx\n1qj6oj660wmZuj92dUJODKPHsopW0zOpSzPQ2ucsmLURG07g/oJzTsNd/Mcn\n5V8M3dADwFL+4cIMoEUtH8TJm/SBCSXfypXRk73AXVT1Cx3xv+0FK+Y0VdNs\n8/Dn\r\n=VX0R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.10","@storybook/core-events":"4.0.0-alpha.10","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.10","@storybook/addon-actions":"4.0.0-alpha.10"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.10_1529589049478_0.07113357955541","host":"s3://npm-registry-packages"}},"4.0.0-alpha.11":{"name":"@storybook/ui","version":"4.0.0-alpha.11","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"254871d7dc01d8ce13d884e891f114c2fb5b9ec6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.11.tgz","fileCount":134,"integrity":"sha512-+7q1mbOlHemwBiz86jxsFlw3LxIrL3Y9ZlC33SR+7RN69jWZm/0iCIoyLVgUAtMXT/nhEondbYTw3qyt3Pv9WQ==","signatures":[{"sig":"MEUCIF/dwNQ3rDfjoGlxuCpcQy0NWHobYJFDU+MjJKhdHZimAiEA7BXOonvCA7n3+mOms6pi1hB1UkgEHIvXx0JsH9ZPUVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":810477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOmvACRA9TVsSAnZWagAA0XQP/A+56CZfZxfeMZjDGT17\nvrmBKpHlfL6qQrVPvF3dEnky5IIPECuJLT3p2foLd7iGpC/TxAX4F1ix9pfU\n+8wkdNf85chTY9lKBGQEdGhVHWQNIcE9oBIUIZ+5d/NV6TmyUITeEzSil6Ar\nsk8rf/SMsrHm9i6TrH1VNmjd4WgBF4fA2iLBed5nbSP/iBxtaC1tpYwf0NLk\ng7DyW8GPeXciBoXHGHp7gIoTdhWTkuUVt5eeISBKd/8cCDcaHTs1cq36ni5J\nqs+JHvAdWRqMT1ANgSBTtawXLEW0xBl83oeGVE4jNe/8LKFRluiw9/L93ebV\nF6xBO6pf3pZPRFBna20TgVgBp6A63ofShhVdiRBCLX8fBaR6LoQlU10fWJ+6\ndvETppUT7ojoaP0J68khd+VhUbXYkIyNIcvl0UmbwpwN3NcAhO76qCla3VXE\nvUfjhskEiBDuSzNgeH4h4DHgMukXRDK9U/jaEAkVNI7ZFlBUT1avABzK0zop\npNFuVGf/yDHPDckvuoU4YXXR0ZM7ArrysJgVC7E2lxCYCS8iZlaFitCkD5PZ\nG6An5/BDBLIHqUYVGmWTeeDnAC+YANwgPV0nMUL3D9YbmAZz44bO2EoE3/bl\nc93Lr4i3BG8ElhMbfL3n9pzNXHsCZ34O18BnB0vL+k28YQEexoociyOm63IQ\n35fF\r\n=ggGM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","emotion-theming":"^9.1.2","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.11","@storybook/core-events":"4.0.0-alpha.11","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.0-alpha.11","@storybook/addon-actions":"4.0.0-alpha.11"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.11_1530555328290_0.7260206477220872","host":"s3://npm-registry-packages"}},"4.0.0-alpha.12":{"name":"@storybook/ui","version":"4.0.0-alpha.12","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8c987281fd8a986bdec79fda651793acbb0b6914","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.12.tgz","fileCount":134,"integrity":"sha512-EffKziT9h9mt4qtIFDQMIXlzX65i478iTeTMxRAaWFpvIdfChrFeq1HvOgTY5YkLs9+SljpGNBrTNb5YTVXK/g==","signatures":[{"sig":"MEYCIQDXlg1d4TJlkUe4IXdlIdnrYlCfqlhKAyfwuj0g9x+TcwIhALDXBwIFySUMWcGZYjKuq8fTZkeoIhd9fyY7KJiKHUs1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbO//sCRA9TVsSAnZWagAAlEYQAInojJT+kkcv90bwGkN2\nDFPRkysqjPJIIFRHZvmpft3EqXK+3DLSKJljpgqiJIGuZG6uUDxeKqyTQluU\ndptEZ3aJBwuXUsgCvaVnYu4SMMi/xUZfojaO8mXjkNvZYMqZiCGsv4FK801z\nCUa6JJQaZABl2MhMLVqwZAZReQywBeee3oEhnPf3typmVTMehy2KSC8NtWpx\nvdXqyz/44ds1rzFq9NHWq3HXcKXZT7UUMMDy6unzgX/snnkvgYWg9N44lbXT\niwezRqO6hiLHyCzPC/eCS1zaP8vH+97A/lBaKQESX9bNw4mDp8sP3lIDcG1/\nQdvw90d5/3j+5whmCGQq7u0bztT/gwR/FDNd42sWTH1yM2z2Pwr+12HFUtXV\ni9Y0OBx7XUTn9gH/+lxBousmKoLkeenJfBlpBRaXhcj1MHtnUCWwCl1Y96R5\nzQAcxfNZxgW3xK/9tPIga3yaLhz1ndXUpK8GSFEfolatbzwx8eM2DWEVFZvC\nJ7spqEfpDJbB/YnEujoE6BcNIA3uqQ9UI0htQ1guPn7C0XoEnBcyrCdHe/Xs\nqDpwdQLbZ+/bdsA24ikC5y3xKbwpzt8HIBvZlKnVKIN6MpqWOdeTUQ35+Qr9\nRhagsyTCCsrSFBA+fXKCt1M2bT91KhDNQ8GuV+cTQAPl01BmDOBiFh7EdlaW\nuHcc\r\n=5lql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","emotion-theming":"^9.1.2","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.12","@storybook/core-events":"4.0.0-alpha.12","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.12","@storybook/addon-actions":"4.0.0-alpha.12"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.12_1530658796718_0.6526196433269007","host":"s3://npm-registry-packages"}},"4.0.0-alpha.13":{"name":"@storybook/ui","version":"4.0.0-alpha.13","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8803461efc33e22da4f6260c15d5a777b34f3187","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.13.tgz","fileCount":134,"integrity":"sha512-oNzqQ6CQ6UE4mXuywVVTc7AWiDVFd12/ke18/sVFOBZLyQ+8yjygv1BUWq9hPx8sNM3isFwEg8Iwm4qhEvS0dw==","signatures":[{"sig":"MEUCIAueecrJObi69NfTLTjWEvYXHxEi7kevOTsSKNlRP+ElAiEAxTqZdMxuufURP7a0R+RClfIS8m46ej3LQoWc3VAW93s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRDcmCRA9TVsSAnZWagAAouoP/R3mTCDoEI01uC9VsQ88\nfh7GI0SjDy7UD6kaaO4F1g/F/MH7fRThB1jaMBRTOUJnYiEhcs9yFDPXGZtV\n7wBjPLr7cycb7IJFrgyXrBZ979wb4THIZbUVSTvODMqgRjZKfyyPrvGaxWwe\ngP88PB160ufmM4TbdArN4KBKpWy/m/AJs8DOiEwDyxGU/VvlBfDCIv8ZhYB/\nmx7pG+oWwSzoIYbj0tjdj9eINn8gGk30oaRusFRHppBqqCSrNgpHwTyjm9KG\nm8PJuqnLqTQjJJr+eLbz/5wNuEe9ajapvLgmQi0PWCrQwZNVKYWc7r5I2uyN\nvOsFFdsRP9s3MR3LOJkYZHe0/0p1SkXDeNlqeegAY8JHdjwgeNy6QyrSCbpL\ncrsv3EoP+IDTnCGVf9fRTBRy3Dn4KFN5cc+xIl3jMrvnXJDoMsblmc50BhoN\ntKRxp3GuJC1laK8JOZD3a6M3Op0+UxQjqKXsJgj6D3uP364wpBvEDE8RXdYp\nRUsyibkIwcjWXvbPikbKAp7mGW8kvdt34SfthEI61h+evdn0hGGE0ER2fgQ4\nxHQG5DrFTuyH+kpLr97QWQN4j9okABNp9zm26cM18zoaeanfNXCtJebgDZH6\n75vYAVw9i6gsv5nSWr9xfmBNVThPQARV1XXraWPFuaM7DUTrKu3KlZS6Uamo\n7ZCJ\r\n=9iMY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","emotion-theming":"^9.1.2","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.13","@storybook/core-events":"4.0.0-alpha.13","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.13","@storybook/addon-actions":"4.0.0-alpha.13"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.13_1531197222759_0.26647481985072785","host":"s3://npm-registry-packages"}},"4.0.0-alpha.14":{"name":"@storybook/ui","version":"4.0.0-alpha.14","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2be547200c1105110968c38c770b37b330f81dd0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.14.tgz","fileCount":134,"integrity":"sha512-9cmSk339BLnLVLR/nWi5FPbQmYRxZzQ+bBOZCq9IIAcFeeFBrCDT6n6zZxl9K33o3FyA9w/DOxuZCKFxJvyfEA==","signatures":[{"sig":"MEQCIFUehW3cfIjk3R0DdRdqrQQ4ZucU8BvapsFoKJbniKpzAiB8mWmmPOSLnN+jp5PlcigTFMtlIzE8H6PJxE/WtE8L1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRp2oCRA9TVsSAnZWagAA+cQQAIcofSoiEWPKB4+l4aDL\nIBaqC+aR8dMEqt9vkG74FR3lrdeGT8qaYxBvCXfUUv8HhqzJ/JuPRpRn3o/Y\n1e+QKMyJwHoCxALOHi5qUtFGP+xbsl9wlGm6QgHfQPfr1JF2ov35pLY5S9EA\nCAKyvhRHqot3zSBiZ4H/e8PVrykERuIcIhxtSb2q5n3crBSUDO5Pzm+9IEYW\n4vPnqKya1Cdep3gWaMW5nr5myx9uA8NYAOI69CysGJOCVDdod5f4paqdpAOC\nUw/DFXVhnOcx6lRpXkcZBIEPsF3NBYNzu2oo6U3bMJHIe5oKKCHgqhpcyYvX\nzuoEcOlexALkNLrLv/YrGn04e8Cf4q6kRdubhWAMtBKHJreo6IBL9tLjZys4\n56UPmf3kzfQAz+cOdENYr2JcC8Xhfxm0t3/w5LMn0beCzFM77AL/cVzvGwz4\nUgSKhmCZBWq3phVjtSnWMgsE8mvxzdNO2jLo22t5iVPOBLb6V+Rd/iKwZEN5\nngm0VsiqsOfFxohoRb1oNavHD4p64JPZTJdJTz9L+pUuLEs2Bd0m29KpNvNT\nTNWQMyCrm3D/fKMkpZgCDLfTh9nDS/i+tFQHUcrk0wAF6u4hQSYyGeq3qCYW\nEn6gLZjzzk97INBJgRGhtTNSLi2ThLLsUcoimTLER0Vj+6HdehwLdrWLI2QI\n3Jzn\r\n=NpW5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\n[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)\n[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)\n[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)\n[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)\n[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)\n[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)\n\n* * *\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","emotion-theming":"^9.1.2","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.14","@storybook/core-events":"4.0.0-alpha.14","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.14","@storybook/addon-actions":"4.0.0-alpha.14"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.14_1531354536051_0.4449877489021239","host":"s3://npm-registry-packages"}},"3.4.10":{"name":"@storybook/ui","version":"3.4.10","license":"MIT","_id":"@storybook/ui@3.4.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"aeb36f60f4297a7065aa64ba770df681d6aac793","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.10.tgz","fileCount":147,"integrity":"sha512-bmSBEiN4tI5WO7inhzM8P74ogftXayhTQnZrPGTxpvTRvWUZU0Ctmcm//GYLCcG5WcBn90SpqpcKXBdkvIaxLw==","signatures":[{"sig":"MEYCIQDJOaLOd4S5fXqJPxJVytJYEo+3SO6tMm5OILK0FnR0dwIhAJ3TmVOUrztwPoFOeGz1/734Z5dkYkkpFH6VNr2e35qQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZCBjCRA9TVsSAnZWagAAHGIP/18L3Uqmyu7ovIyjfO90\nNUAcbYm1moru0zG3yqmBGuQVcpz4IiQW3KiTN1MyOv3s9FaOq0CrZSSx/5rf\nkIdmVyQQeCJk56DCI/IbE6WuwokYLTQG7y/sd3oL2AclSBAAwUgdbxWcgkAw\nfmOx+NwcJwr6pIr1H6KeA0/vcNNo++GMMOh3BNCWMjjbM8N59T2zLqvvDByr\nJjtPTBJDVC53ZhJaUjnn6l4FW5AxxK7yY49jAI/AJLxBr45NimBAiI1fgQcB\nDXJAlgrvR3VHrJhjIcjABCRoiuw/liKU6eho8kiH1ZlepLP5/dJ+L+2CyBe/\nHog7USFTABdkfl/s9Qq6pvYhnRhfLgM8b9PzSKqYsidCtvGKftmicVFzneUv\ncDMQE6Sq6FZqt24xOBGzPb2t7kOYbM8l884lrpX26hVbnTsqgtblNXSpPUZQ\nYsKgZmlZVbLtGpJnWpOGowUJafDoAptgUP61bgp3SNYED1JfkeprQzywxj3O\nzIZGyBcqGaa0pmZfzJccL/6jbjUvfSDbNxdxoTDmTbi6S14Qa5CCJmk9UUbw\ncYjAaFxASuNXSRqy7rKNXwfFbU8EKKkV8WqLyp7dpgh1vw75Kq38bkHpKxdk\nJla/qbvvnNxhuA+QgMWmol3oFy73bIOHMRehL2ByBQm3iEqUvLOvF7psYFob\nwzPu\r\n=riP9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.10","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.10","@storybook/addon-actions":"3.4.10"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.10_1533288546577_0.9258265611152559","host":"s3://npm-registry-packages"}},"4.0.0-alpha.15":{"name":"@storybook/ui","version":"4.0.0-alpha.15","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f9618573cf7f2715e94156da57a0eea90816fbfe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.15.tgz","fileCount":134,"integrity":"sha512-MwKbzuJUaOjDBBu6yXkyIpl7+IEJdsBNn65NCC2622YNngA36zlKJZu2RGxi1ae1WIcy/UvELtSftsbeYHnMTg==","signatures":[{"sig":"MEYCIQDSthxokJLTZr69fYGX/6tLnmb+4rRFXOYUSIc4y7tTqwIhAKYV2WDuh7+FpZKTNvUZUWCzTQpgGg1cbhUBnulYfCNQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":810113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZCdUCRA9TVsSAnZWagAAgSgQAIeeKNO3XJVDnP+GDspj\n5F4M8mv9oUilnUNE1aVPxIpED9z83EWgaqX+6GAnt+eT49fHYuD5E9Sxnb4R\nL+/itvzXOft4DNLui/Qrxc+VVEy9IOrfdrvGy+ofiCOXmUC7bLCyb04mgjfl\nICESm7uzEVBItrDU5nMmX7SCyJ7dH80Vb0FDvJjDGXE8XQ869YSzJO0KMcL9\nIXgbW1K9HM+uPaIZZy5+DvfS/n6o2o8YKrt4CicDToZE7gi8J5E0cT9nhCa7\nu041CAsKvJh2ewwG+MIYOvcOgsiQmieRdUQKUqHhuBCxGcgVaXg/Mk4SAhqU\nxZbwWGIMWxaoyRdc0MTxquAG5oh2HW9mgqeN3ao3aCV03hhNcZOJh/ugrVBA\nYKH29P8StN22XLFu4YyrqofYnd0bQ3FAfmnxXcsPOZ4RMDJq1GSBSLV2yYfz\ngBkBKO5c1HqWDJN6xjl1AL7KjCnz1+nYsOMPQLFQdDYwARvZbz1lgXTwWIiH\nohOX31FlbHIRxF+D5qvKu0R2LA4TTI1tk9fClTAVKc2TwjTb/TpwyFh4Br7c\n9qcFbnhGzvBdoG4k2o2YXyBLliaySNlx2VfiLIjgmCmHlRTcCdwnMNcCLYo9\n0v5rdB6+82OOyFeVtFTe3xSOS0AVwrYb/GGMAhRYUihxfuT44Kpl+jEmVEtr\nReqt\r\n=r+W5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^2.1.0","global":"^4.3.2","emotion":"^9.1.3","fuse.js":"^3.2.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.4.5","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.1.3","emotion-theming":"^9.1.2","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.15","@storybook/core-events":"4.0.0-alpha.15","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.15","@storybook/addon-actions":"4.0.0-alpha.15"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.15_1533290323624_0.8174757311417418","host":"s3://npm-registry-packages"}},"4.0.0-alpha.16":{"name":"@storybook/ui","version":"4.0.0-alpha.16","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"23c2a578f8e219263b25e18fd9dba2693c5ad64b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.16.tgz","fileCount":126,"integrity":"sha512-bY3cV4svXu0R1tREHNmwFIriNqpwjhzQZ7CIzGUPgePIGiL34x/sW31Xjghojer0b7+KU1O26/FW0BEFo2FI5w==","signatures":[{"sig":"MEQCIHXs/5kLxfvcWAgg6wk+Y+HQpyFHeide1vxg031cwyKpAiAiVlTFKjpRH6RabQzfF9/8ORpGPlvn903qVBCmcelMeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":799655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaFr6CRA9TVsSAnZWagAAlRAP+gMqy1tR1GudjWfvYNCw\nThHVhL+D8dy6S6lkQhFMbJeWfN5gOweKwY1n/Gi+tLd3A9UeqTq1s6K6ar4N\n0tqcLVxwNHK0ArZ16W2THTDnyaF8YCbf2OpKRfrnrthawIFFxw8wjcN2UBc8\nEXfZEgV1T4gPpY+a6ulaihhhMLycNptnW0AV9MkkLmp/j8+BB2Pw3Hbwa7bX\niG81RQqEK/CYmKIuFknsPwSEE+PAZe3ueZL51oBSyCbXeP5Hm0xevqD5rn6c\nGQgywBf0GBvC6/HFH1C+bsMUkvOqxLX+HcIylzxbMEonuTfEwvodMb2hZQyI\n0Xw//yVmW2y9j4tmlG66jYghxYz4JWgSLiHmrzF8StJawMf3biG1syyTdoYR\nAan75N9QjS83ZjVbkp+pJKTSnIS87kz7PbzLNxAVW/IBpNfBDYCWIEOLu9cC\n8WvIxi2xIxJmA7c1ADbc2Z4FJzxXEVpv8RCMw+EnLgYzaBfeJAfcCPXrByuX\nXgrth0sbWEwSjNLTPGTiMptbs7cki4d6syuGTnEyjgb6dzXKpzgAAqfx6Z7C\nq9OpnWCQaJguir6P6iFA/UXsMQ5ds3uOJPVIjH8rrtJZv3t9o6k1Z8G77GLa\n8otpB4KHv4rXArdgxUckuhDZF/AQCGkzRltD/Ca6QqDjn1ZCSui7fTacJSTI\nAQE6\r\n=Le7N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","emotion":"^9.2.6","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","react-emotion":"^9.2.6","emotion-theming":"^9.2.6","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.16","@storybook/core-events":"4.0.0-alpha.16","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.16","@storybook/addon-actions":"4.0.0-alpha.16"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.16_1533565689842_0.06904006931011186","host":"s3://npm-registry-packages"}},"4.0.0-alpha.17":{"name":"@storybook/ui","version":"4.0.0-alpha.17","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e80373b4381df277b787f3668b8c4a85f0bfd660","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.17.tgz","fileCount":164,"integrity":"sha512-a1Dz++GlLB0CQrI5bL4dr0F1Osri6POSNRgcIjrWHINhKTkQ26L2r+oQSIeiU7AUpvtn4zj0FTzdPGl3EyypMA==","signatures":[{"sig":"MEQCIG70/vefIPTovWjtpOYvXmxBHpNPLdJF/H9yPOx+J/1sAiBafNdvn18Hqn3d9yg9rBSqD10q/Jhg5JsU0rO5jmPYwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgFGKCRA9TVsSAnZWagAA/7UP/RqC/42llybO4THpTlKB\nsiOwBvBJsZL8VdOZHp2OZfxMlLoZcGpDMvVgTdpL2NupFDInnDNiSmWz0bBM\n5JUU3YbOv3EwB81STh/GL2+++YwOZYvFauG8qP0VMOIt5b7fZSFgvhPdA9wq\nTV65SH6inUvmEcdmdg7nfziYIh60vmaTLK5UewXsgBNRpknKkUUrRMJ3dN2C\n384csq7kdlQsGeic+L3fbxp2ej21Yhc9MjgljMUTtcL8z/vJ4b/DA0c6886I\nRf8YHidsbjznI3vTHdPHCp3N1fldB1hVrJpBYxKYyCWmyXBCCSVy++qEr2Ux\n8lYlPfGdRGcCFIs/hNlUKj6/+8kYU7xbuX2L4zENCqedfjAdSsMRZI3rBf6H\nnO6v3Ph6Zcpw3ma92MKULmqb1nSsnre2Ezf+vC8Qih/D1wpaaOW5KKsCoJkB\nB+k9LjL14bxrh5r26n60+qxUsKDpra72NK3V26QQT6LuhPmR7y61Z/DZhkd1\nIOaOTuH+qoJ2/zxGHpJ+WO2Yb7SjHZDkRL6ttOGe75dc3yHJqth+9MHduemR\n3GfuhnRSpNcCvxqMmfeQYo8vkuY4dOn2pMHKnTiDpqhFMOdRLryiwFzzMJBk\nNE1ARbXT4u6BEbXQ4DGGmugvh9ZTpqUsjPyEUeZirhUsljEF8ED+pRAwBqPT\njZqq\r\n=CKmj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","emotion":"^9.2.6","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","lodash.sortby":"^4.7.0","react-emotion":"^9.2.6","emotion-theming":"^9.2.6","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.17","@storybook/core-events":"4.0.0-alpha.17","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.17","@storybook/addon-actions":"4.0.0-alpha.17"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.17_1535136137616_0.8197449998658322","host":"s3://npm-registry-packages"}},"4.0.0-alpha.18":{"name":"@storybook/ui","version":"4.0.0-alpha.18","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"035511489fa11b34cea5252ea6fdc1788dee89c0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.18.tgz","fileCount":164,"integrity":"sha512-vmkm/Kfsotek9/6ewu2EY69bhy7oAMCo11pzIQVkwv6LvJRM3aoq1bTb2mMkPmcnsKHkmIh26+ptKZKCnMVkjQ==","signatures":[{"sig":"MEUCIEQQiGdZQB+w2Bw81lN2LRaFL8qAHlksDsGnKf/YVDM4AiEAwcxqp52cZ9X542SGFQZvdTgLeQQIwkd8/Hqmmk5faDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgcMHCRA9TVsSAnZWagAAeIsP/RRD6fJ+AAR/2QYD5M6/\nRnsK76+NRJBbXRyanCHowne3UVKa9EpxLscCCPngvlTYC9nc7+iw+nOBVNor\nPObqpcr+/fpWxfT9PQdxjDMLHR083BMrG9ztPXHzBo80etqzM2R7h+BJkzem\nFYbOi69fJlfWRDqHmjSnA+9qXNIr0STZnCej4iSslityQaV3LIKZLf+iC1Dy\ndHq8GWPCsXoLQtDg3AS+LhzuHSgyRjDDAeQDWOXcfk3wX3lZq5eAiuvTSGiI\ng4svGd+BMuRV4m4iY6193ZU4lEVwrvhm45sIA9lMUzQySv/q0YvbeZ/+/RKA\n4R2EZBM+FqOJrXoIrRVm7Hv9wxn5L9YguR1My37v59S+rtB2rbIhNpZp7l5t\npX1hGTCSATabQ66ywdsNuXAftXG+RO/eW+9+1yz0MZS4krweqC4nTHl6X2xL\nkDUIFtfRDbp6+YMri/6kubSIYBNisCgzwSMo7nVXBpgqr0AqnnaEwCNvH1KR\nX2U8GcIfYGJDmb1beGfLkB2z2WDN3fTkHHlB6sSBsmRB+vWmRv9Nw97s8t3d\nM5qqNSttZV8QXFScGdJQ9KxwlKkWU/flqSUAq0wV85PcxI7bHIAeZtQccIPz\nWYt0YolYfB8Gm4kDHMN5ApWqPSfQ8W0wEmMH/TvqJtn7oc7bSQMe4ZAB6mnJ\nRubZ\r\n=/v+z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","emotion":"^9.2.6","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","lodash.sortby":"^4.7.0","react-emotion":"^9.2.6","emotion-theming":"^9.2.6","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@storybook/components":"4.0.0-alpha.18","@storybook/core-events":"4.0.0-alpha.18","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.18","@storybook/addon-actions":"4.0.0-alpha.18"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.18_1535230726654_0.4200507725006861","host":"s3://npm-registry-packages"}},"4.0.0-alpha.20":{"name":"@storybook/ui","version":"4.0.0-alpha.20","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fe8c9bf3ff0cc720c70c5e6c4b1b05f0827c0d72","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.20.tgz","fileCount":164,"integrity":"sha512-TZS6OUcL/bN2Cu0Y7Z99XmPceRCNA0Xk7FAGyq1SInOrVtca8iI5Rjs4kpqdTmzvmGvB1x07D/tllnpZhdl9tg==","signatures":[{"sig":"MEUCIE701isk0ngqrdcX3ULDYjImN8HMPtlW9Tv/ArJhUDq9AiEA582i/PRorAYgm6XUWvqRkmoDrpOvw7WMQZeVoQahATY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbicjsCRA9TVsSAnZWagAAm4EQAJCuPZis5hEUkIDeEAUC\nry3k3CDyGmEr+oH3nHLoVkk0sJvHAmZuXZHTxYaGlhnBONyeC9YHoN01F6NQ\n4MK1Ce4aIDPT7Lpfw1pqqUESRG07MVbss/xNOrWG3mWPgesRF47vpFgCn/fe\nUCXp8Pe1q0JtkfuWRIop3zdtekhpBlmy7TYuQJYniA0soFrT20ofr6PSvgCo\nD2St+wU+rgE+/NwO88PbTBGoqdOwWTsoGnk0+2eF0ON+p4Uy4VB/ib4o1z1n\nYMwKq2cvmqKGoLW0HTuWAmK+xcif8Jrq7MOi9R4vmV36eHs2G/uB3dTTQc+r\nAlvHYXJdEkfJa+QwMRe1oFyMzt6gV3ptpRhNYKAuLm/WkuERnMGIf/qO0jmM\nyBV/VLnc/taAmqHscNLQCunyv+MgjtpYaxiUPqXv4USVFIwiox6NjnSmBD2u\nu6+thFwsEwAPsnzJUlTKWOh+tJMkWbadTG93bSb9Mhn6zRu3/pD36fheG4z1\njcsDRKBuHuX44qAXq0k9oFe5vnXlJmJjxTfRC7xRF2ue7xPXOQ3w8Wqat41u\nB9IUgKUAhJuEOr7rr9YnG+9HdtPLdbTrkQ192DnB9Y/J7rJv0usObw9SvNpI\nR5fc5JzPdJaLIZCyUdMNwRCgetyOlRD4Q7ubdufqO296wt49YM3ANXm8uNod\nERQX\r\n=a7k3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","emotion":"^9.2.8","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","@emotion/core":"0.13.0","lodash.sortby":"^4.7.0","@emotion/styled":"0.10.5","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@emotion/provider":"0.11.1","@storybook/components":"4.0.0-alpha.20","@storybook/core-events":"4.0.0-alpha.20","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.20","@storybook/addon-actions":"4.0.0-alpha.20"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.20_1535756523240_0.3387305803004501","host":"s3://npm-registry-packages"}},"4.0.0-alpha.21":{"name":"@storybook/ui","version":"4.0.0-alpha.21","license":"MIT","_id":"@storybook/ui@4.0.0-alpha.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"dist":{"shasum":"f1b3e97b0a2e93d30f6e63eb97cd77fe068d0b23","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.21.tgz","fileCount":164,"integrity":"sha512-cSlJCFNkdb1q1PmcNIUJwj+KTT9n+Qu1LD2wXxFGve5KTBDYY0skyyatSC65aA8v/TnfQNO1SUyyK3J2p9y0nQ==","signatures":[{"sig":"MEQCIHQ8/7ApU/7Sr+xYckvp94+Zj6MwWuxeyTDnvqj/pQEZAiAFXPFnv8K8CE8bbz7bXaCziC7z9ZvvuV46LsQ6WkM/Nw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkrNOCRA9TVsSAnZWagAABKcQAJLOTx8rq/MwaBvEKfE0\nsrvcnPMgyaHu6ALA9CnP9dYWkKkinbbMjgR3mbb+KuvjHEwSU+7qty9cWamA\nDfwLSRCdb0vohvOC5pzwXX4o4O9XZfK37cVXacvUWVqOGc+9l/H94pnUo4Tf\nbVoezmEivm2XSsIddTDrZIFcp7+vrQFlbEdo33hWGR5xflT5Cz3kT5bCpp3Z\nPsfSYazExb/cO+ecOh0uMkOVeubaPd03BBqUyImJ++NnHoJ5aaE7oq2c3P9f\n57c+7wQzAbGMvdkeAEznd6qeNNRGcOGyaT/Ju1cBy0s9S+t7GAh2djgfTYR8\n/YkouvNH4xXE70Y+KMbeYFg2MEfW0I5zjhLHmt3uzn+DwZSGy7vo4rT6G9fK\npgr9jbCG6mbW4t2Vds5b4BFMUO8b4CF9ZVhAuRVgA7Og4/Li6sfEUO+6A1Op\n/lRXo1y5VAp+CA0kIJme5+d4zX+MJBgllfexPjyCT1pocZ4EXdkmr2+GmPGl\nanz5toJlTMlgYSLJSw5ZnkXqwa/T6n5k1ig2LD2AtoZR9E5S4dJZUJlxFYgr\nKAqMywV7/0S2BtZejdweXatmqsYHJoZbcUkRwaUjyMZl/esXDEmsVspTcuU/\nHq6p1oGzd5tauhuk6LsyjSKLmsRxqVsXN8UwDtU26a0e1MBmZevM7ZZRte1p\nHVD+\r\n=lfWY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"729607334cfef4a70374c3fb19d0e55b4f123cd9","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2017 Kadira Inc. <hello@kadira.io>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","emotion":"^9.2.8","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","@emotion/core":"0.13.0","lodash.sortby":"^4.7.0","@emotion/styled":"0.10.5","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@emotion/provider":"0.11.1","@storybook/components":"4.0.0-alpha.21","@storybook/core-events":"4.0.0-alpha.21","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.21","@storybook/addon-actions":"4.0.0-alpha.21"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.21_1536340813012_0.028865617793996323","host":"s3://npm-registry-packages"}},"3.4.11":{"name":"@storybook/ui","version":"3.4.11","license":"MIT","_id":"@storybook/ui@3.4.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"arunoda.susiripala@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"mnmtanish@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"teije-vs@hotmail.com"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d7b1bf92f0b27dbce86d8e22d0296095e692d2d0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.11.tgz","fileCount":147,"integrity":"sha512-VJ7KxZ8xpQ3zDm5lO/r6oyfxUMEzIifbm6xTcruz9fPZS02Z3yJTs3Yfj0TH7B5PzXga56P9Doy9BSs5oV9xyA==","signatures":[{"sig":"MEUCIQDoLh44wS6zkrF9RDFrNQdtLGdC90ukBU4n/VNkePAq0QIgE4sqNORezE8Pa+UQG0qMeJoc3cVprf5dO4FDK1G68KU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboDKnCRA9TVsSAnZWagAAIc0P/Rk5FjavBJ/spFGT5VVm\nBYNgwhXaYYqXBZ4GnPpI39+bbU7qakIsPcbMOxfQUPUaeUtSdlQXF0VGeMAw\ni6X37wgRLY6PmEAGI19Os/LmzdwNKl3iUK2houxcXH4SuWrCjJ2Vz5c0wjlB\n06HQBrs2o2YtRoMN2gsUrXP6pdD0pZkZH0eSZgGpEj0jhFQ2gOKOQPMVDj+o\n4Xf5l8CP5UGJBIQWVaWGpYtX0J1aCz47C87NHXN60oBTJWMh+gv2ddRKvftH\nqpe5xIhu/2XRhfFxMoXYZMSBoa4afehardhft8MMNHXKfmFJXW6r9+iWn2mZ\nYHVB/BOQW2FGUrKJg3OydV5f1UjP0QZXCmayc1UQBV69joW3cRtsE+evFhjf\nHB4W8rkPFadlxmMAitYjAoZcLIA3ymfKGCdkZ9PAF1C5tqBoEE8UaHTAa9lq\nCybwl0JQnPj2HeAdVusQBSxX7/q2muy5S60HSJPu5JwxtSqylJqhlTyDGtdr\nIKjzhJ0Iwr9DRLMdTMg7OJ+ia2MSrGfwO+D2Cm8xBm2saPjajJY85enF0kfM\nFaudDRvwraz7bcLOnOcwb8/wsVZUONW14+Syyi/molU4Yq0JG8QlyZdx7OUv\n0ps3R13M8lYjjuClEq+Ou7Q8FWy0/dLfMgFLNJ4NeTU+OnlZz0QnusuUm+dZ\nNusv\r\n=AYcV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.11","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.11","@storybook/addon-actions":"3.4.11"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.11_1537225382995_0.5803298839259334","host":"s3://npm-registry-packages"}},"4.0.0-alpha.22":{"name":"@storybook/ui","version":"4.0.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-alpha.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3ace9a54f814a380b915a31ebbd342269eff371c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.22.tgz","fileCount":168,"integrity":"sha512-XM9dOwL+qNG/ZVL8qJ6bXTttjHpO3by71pk9ijzW5ShgZ61r9Gg67U50c+jUlx9v0i4zsC9poNo1msUj1z0A8Q==","signatures":[{"sig":"MEQCICmO/Knj2H/3Y+NSS/ZsURZpNN2HQvr8gC1L/W8K8hmrAiAoEfKe5ngF8x0S+6HysOKrARvRHfp6fxk7HrIanMewrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbormfCRA9TVsSAnZWagAAdfwP/3VTSvVEqcroPQzhZ4Yh\nYOH9ruE1cb2SSmEI1LJoSGEQK4GsI1kqj1Q4MPHDXc/FIiy5VmstfK6mDh9p\nEBLalV09oNd50sZxat8XLOCulRJhpEysZA09NLzo6dLrdOev9lnSXdF3MSg5\n3yhe9U8VT2LzilIvzHwdNLoJU8Qu0apkcGPYmhul1Vowehqy4QqGhPpE05Ee\njAOFr8g/V66+GYZLJaIuTOHmWpiFhCPH+ju1iTFdq6dFlV6zIAr/fm+zQoGD\nVizQysDnPwy4mTAa35MTaU3rNcya+LCJwvslhFGFc2efIYTwwtlc4yUC615X\nJbY1nK13JbJnZcqBfknGYZ8+NPdjOLVMx/Jk0JE9FzC6WSQaz3A1zdhDRhiC\nViZkPsO1h5XuY98rc4fAHKDZSYs4kH3Kbnao1UbDrd6t+HKJI2PMGwDGL5Tz\n9O9DKfjpAt66FmBLE5pgS3AtCl7phMahs5of//g5bod70snAT9ZvlDCh3ir1\n8yBcfWIufqNtcwgKPL4k/4xK4SimBynOc5bXucCXypzctBvWYrFWAmz0KZdy\n2P2gcxV8JVDRu3MGlWpiXeUfkdmrxOIRroEkhen2mc4iwBjEh6zuaPfh4TxI\nJFVLqk9KhE8XIA1XVtdrjsdnub0Id6hUn3ydxUYPLwGAHHkVNnmkDb+f6bg0\nZA48\r\n=Zi6K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"5112b520041c4aad100ad7eeb3487e534c64e48b","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2017 Kadira Inc. <hello@kadira.io>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","@emotion/core":"0.13.0","lodash.sortby":"^4.7.0","@emotion/styled":"0.10.5","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","@storybook/podda":"^1.2.3","@emotion/provider":"0.11.1","@storybook/components":"4.0.0-alpha.22","@storybook/core-events":"4.0.0-alpha.22","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4","@ndelangen/react-treebeard":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.22","@storybook/addon-actions":"4.0.0-alpha.22"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.22_1537391006453_0.7049174067890573","host":"s3://npm-registry-packages"}},"4.0.0-alpha.23":{"name":"@storybook/ui","version":"4.0.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-alpha.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"611b62964d288bb8d69a27c7e6a42973bc71cb74","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.23.tgz","fileCount":168,"integrity":"sha512-f/bWytrQ+ZV4TXRDT8yq7gIlWnaa7ZVAvqBFrOoN+XCC3Phq/XD+xm6l7u8NSyTi/DztgedpP8Hkz9cFgSemwg==","signatures":[{"sig":"MEYCIQDvjeOj9JAMFfgVmnBxAMA1IpvF/QkRa8OPI8b3lGs2XAIhAMvM7SrPNWTEh0fIpPPTsa1CUcnhk87akS9oI5wDpaEk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqroWCRA9TVsSAnZWagAA7AUP/0YjdkfRurTAgi2P7bhj\n/gBpwKtJRkXVdu0r0wcpOaXe2wvVp5zTUoD+TGr4GND4htz8us5b6yEa+W3t\ndSJX0/P58bLkvyQsBwTZtYHajMGrsKNdxgp8m5jVwDD0Aaw7pYbI6gyvDYy+\nkCaK5x9uTNBUwjzLh0PNs4gRnnivCOfVmL0Fb2sKUqOLXigDWCrsF4UX366u\nTTCCXcA3pkoIAoknoCezJZfvEoq3+FAWaFnquaEoFwXaMrbCF+WA+KRxFuk0\nVpp5VhRDiv7AZg3Qhth30ghOqEH9JCDjVIQ+hp0oVRyZOOW9aBL+rbVWYhj6\nvJ2hrN/U/hjot4OSRkkx16qSJJDJHfu84kjiHhszR9eJbEW2dgRAmP+F/3nd\nuhiEFRjjs36/f3nDC9RwM2X+yz8Yg/NLTW+p1k+RmM4aDsQRuAuKgkOgspn/\nmREDxSDBmGLPP6mo0jUlElrJ1N8n50vS4HJeQE1gDsxpi5ahNxTWaqy/8OQp\nx5A2dgaMXoySwp5o2qqj9eJRZsqs9qd8V7tjpQ0+X5pwL7rFtIpz0OwdN6ng\nJSTjLa6gdDmg1NC7t4kuD9j63QxLL8/1E0au4az1Tig3orVDOOaF+CWJoAcb\nnJDAlX2Tn12JH0ulm9Hsmuv5zFS/Wvkn6z8+qDuXFgj4yoUmzi8z6/OBQGhI\nIAFc\r\n=76I6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"2ca9c34c4c929109170b01751632858934b1b54d","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","@emotion/core":"^0.13.1","lodash.sortby":"^4.7.0","@emotion/styled":"^0.10.6","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-alpha.23","@storybook/core-events":"4.0.0-alpha.23","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.23","@storybook/addon-actions":"4.0.0-alpha.23"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.23_1537915413803_0.35872507687932753","host":"s3://npm-registry-packages"}},"4.0.0-alpha.24":{"name":"@storybook/ui","version":"4.0.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-alpha.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fbd9ce7e7bbaec10a55ef2074253ec82137fde17","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.24.tgz","fileCount":168,"integrity":"sha512-ZGR0MZ+9J0fOYbot0ef37xaJqqmJMYmqnLTJVewrFFPY0v7XcoyhdV4vdfN5usROq12OVD3Wk+qrvVZUboi1OQ==","signatures":[{"sig":"MEUCIQCnMG7o7obN15MLYcsrguD1c34odi4vOiX421yzEUSf+gIgCV7NWRyBUkOPkS7St61ubuVNnEQLXNtgs19CCApxgeE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtc7oCRA9TVsSAnZWagAAZWwP/24izGC7BFTZFqWyDdOi\nwh4CqTmWsXgVoUzWMnXgGFvB/56XGYYCVg/Luj+N8ghZy3TIpyGaCFR21AbT\nAM2AdWfQTPfmkImwOobyu0TelWHpbY/b83x0kwWGw9jDvilFltda7p5b9Yxt\nDllows89dDIEzTj+BPv8m3W30iIW6fbezrJvvW+DFH4+YMniaFqer0E70va4\n+2xAPjjzGA5zxVu4fu9lsHjZWG1zri2n9rBAa6ZPW32Vh+nAgwr3+U9djEN1\nw20jzAvs6w1iu/Jyi7KbvS1NqLKRuPzkuFP2rQ3mrRpRnV4Fygl1vTVhEaL6\nF68YBXGzmae8Zgi/jO/7pZhuBsFfpHT1M380yvbaY3P4pHyQmGBEwX35NG5Y\nUbqy+RmbFSVo5r2W9C3UhPz45IqqxHH9bgUW8jFFtibOf6LatqCmOGdrHnQh\nNytK/a0bRvqMfC0HO20zC0s1KjRJ3V/ePQUTt++DZ7hLJNzSf38PIPld7GY4\nsNSa0ff4RxG/S6emxVTUnKZdCxA3NKOPIvZVta3Z7DXfTzUFqNbtckv/gK1q\n7a+y2exVWif1znniTaIfl3tJWRSwpcoUiE3QtPscEJFAy0dOjyfuIeK7Tyn7\ndogOq2PpBJdeh1zduIMo4zX3ByuaZ62aqrfIDUgbW5Oi8mdEWJj3ls4Ic/0K\nDfp1\r\n=WOEd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"bdc8120ab9456b34e2f67692cc3439ac75c4ba54","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-modal":"^3.5.1","@emotion/core":"^0.13.1","lodash.sortby":"^4.7.0","@emotion/styled":"^0.10.6","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-alpha.24","@storybook/core-events":"4.0.0-alpha.24","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.24","@storybook/addon-actions":"4.0.0-alpha.24"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.24_1538641639399_0.006083447844216661","host":"s3://npm-registry-packages"}},"4.0.0-alpha.25":{"name":"@storybook/ui","version":"4.0.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-alpha.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5479be82806064a87ca83b98ed8272b4bc0de280","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-alpha.25.tgz","fileCount":168,"integrity":"sha512-7tgbrqur+oLnbBKUvXMhoU6PlIlt+JODtlNHtcz2eedyulr6e/5MsAimnIUvFj4vhkxcNwm+nyzPGWtmQDCkYA==","signatures":[{"sig":"MEYCIQCYGpbDTY/As/3bSU4VQyKtZCgXrBTGtbrZuY7xZwlbwQIhAPDNI++3CFIN7qjCtAV7+l48vP3LiL5lr72+56Fz2rf+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwb1gCRA9TVsSAnZWagAAlVMP/2Om3Ic/+efScD/BO05Z\ntwqjv+s1EwNi6VGWZAt4hjCdrmjxa2umo4aDnRtoNsSe+YUyRXZS9mx0w8r1\nXTpYLk1K+YGKrEYpfrPtICXBLiJdHgoKOyibM3+6jAqcDzHK5Oh2nYqdUaJi\ntDtw2d+ZyvFNynAFN6W+qIgZ19p55alw39YWCdeTcif4U7qpimkHvh/0gn8y\nenTSG9F0osZwtdrG9rLNTyszAIl9zG3EHq/+lL4BETlz859nsLD3qmkavPvX\n19/fQ1+OmaX8zT+nogoc2yaQsi3yYkcU/Bbe0vasT8ldlGUaAqlGXselcads\npNo/wFphsWSzf+SUR+0M8+aXbPUt085VQkA88mApGjq6OX3O4P77HSrLVEJb\nPCS2NWvEYyQrJFIh6TLjIpBePMg/b8YkWJ2n00OIJkw3Q0xmQSs28mgWvd6H\nHIskZynM6KWzuE+ovz/6x/NKd2X9nQhXkZMkkYvJws/4v/Q20DV5vf7Si84g\nvHfNUlFkrijhrLol6zeW8ot4g8tLZTMbjzw/LJJIt0Bq84Z2Clo4Oae0Cz2P\nvzhPv9yTORYUMab2gFO/tLlmbet2L7bScveFA6rJDQA9eXm9n2APvUZtjo6P\nd7AwBfyLwIjLWNCZP9/c4zOYzHrvHCQiyRsx+YeNbywR3lZTGubA7teAmEZe\noJeX\r\n=8/Hc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"155afad695926070cc6426e98d795907846f1207","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-alpha.25","@storybook/core-events":"4.0.0-alpha.25","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-alpha.25","@storybook/addon-actions":"4.0.0-alpha.25"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-alpha.25_1539423584131_0.4899308778781759","host":"s3://npm-registry-packages"}},"4.0.0-rc.0":{"name":"@storybook/ui","version":"4.0.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5a72cfbb42af9b74cb1e988d0e0d8a999de146f2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.0.tgz","fileCount":167,"integrity":"sha512-L5IiRqIRXv7tObLVJrO+J1zXdw/jsnCwq2hlGBa1dJ2w1N1sC00SxzekG7p4JmAln41lkvozlQNyRj6SpSFOig==","signatures":[{"sig":"MEYCIQC3jSJW8qbbY1RXt3aeLFyBNYB68fULkBQDip3N4qyBvQIhAPr+M+iVBFD9be07xRzAJE8znzp5F0csZEXOESA03d0l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxLVqCRA9TVsSAnZWagAA5LIP+waaYh6HRy86h1EnkNHH\n+8rZ11C97oFvtPVhtk/taojjLjICEoahJNeqHtGn0LRvQI9bf6j0/AwEnoKx\nKrTUABLMAQnA1L97FnWHHNMAL+59X57i0hONP+9bfXMOSRcntnVOZ7l4Jd0a\nhGazDfwHEGy1efXnv6ZyuCVY9ej+C9dJW/c9xS80q2OAvc4hyB00vvb7t3nJ\nCMGyqAMrCTxT4mnsStGG2+bqRycYGIri+g8V+Hd6LtU2NLXwOybBi33bmiPV\n2a3OirZ+ELg5JuVa+Gzd4LSYmzs2LAaswaUPWvvgoysYy698u+s30l+xW9m0\n+V17vaLh8bmxkKH262xG2K4YpVv2oJB6ZlMGKfmF0NMwRxygVV4ORIFatcQ4\nD8BG7YbfD/ca31wEWcU8JxQkOzF7uGGs4T9mB8YKHvZtl2rIhWQAF+nQSWOl\nYcEo5VGAVq0MNXoBsjssSxVYoC6py6EuVYJsP4u3saWMX41eZ39J922pkFLr\nB6D1zKYOeAxLsx20DwtWUmbrf+szxQj4bar8aEHytPjWkY3Uzm7TEwATvl5D\nJjJYZ8V0mCGUFw6bucYZ2P1U/QqSgRSc+9F5ZpaeRvp4fWqrkoFoAuD1iyjc\nMgoSa8lLV/CzzwktPNzbR0scI7pCo9npQppOIKDO4x03Hg8zwODMLvBRoS6V\nSUo2\r\n=IKJH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"76b3c817a1906759f75ffa91f8261faeb64855df","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.0","@storybook/core-events":"4.0.0-rc.0","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.0","@storybook/addon-actions":"4.0.0-rc.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.0_1539618153703_0.6301085559000974","host":"s3://npm-registry-packages"}},"4.0.0-rc.1":{"name":"@storybook/ui","version":"4.0.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ca21412ccf9175b200ed1770972c8074e6aff32c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.1.tgz","fileCount":167,"integrity":"sha512-njHYoYm8TZ2wmtcMEoot1cUPhzLuoqk0QYr6C23KTMACVWCeoMF1i42dMcF2DBPSwbKALv0dSH4qDGouSjQH7g==","signatures":[{"sig":"MEUCIQCtodfw7KA6z1/kDiuocJxMY/pbreC8/R8eSWXmxPJbkwIgFdt6QX5GCnmZArWeZJU7Z2pNAJYOqDlCjHjXQx/+vzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx+hPCRA9TVsSAnZWagAA5ZkP/AxJtgig83WZNX8Y4aT3\n1FU0DGFe2KKFq5A52b6pY+uJPoiZfHGH6vq9Gxs3DoYoUT+XHRu1XhChdaua\noXp/30YtJWHED7//tnIHBZiuCFMDajpAF5Qk1sBkLtfpk0nboJo8w647kP3h\nGZurCqQNOOaJ8rKSLMUUmWxAUYYHjZQTqRIarNAqXfyrA5ELJQb5NMvt0m8X\nsVUsbWDYq7hJ6Gy3lWblJmPlzGkTJ3lpEzgO3FOhKtLxVz5NhUW97A2OYd0S\n4lvYN/y1tv11CvKJVj5WtQRSlJ+glmZLo3GCLEXCe/W5EdO9Q4pX1aqDzU3P\nMV1SIQRDNK2Oly6l+5Vm/r3XNL8X1IaTelwmGXdgShBmsz5p5VR2OMNoNAcs\naqsgC8ybRWTIYIGdLdHiJaDNINE5FnaJGYn8XhSHB3Xzu2jhIM9uUotxalKN\nJAn+YBef3q3AoH+Jo/jKHrvlHR8WjVYoEOfNT34sEuqGmg8VWxBTQtIsOEkk\n4XOfKK6WW6fr5w0ouHIX7rIFIfD1YcZR+W+OttUeONNVE+9lHeg1NcNlUY6A\nhnUb62BSc5drNctE09Jlg+UMBDoEak+Bem2qL/uAX84Eq3FDG09oBf1plF/H\nyOyMqXeN81vorTf/Wbhfxaca0HYHWWBU0NEoX49WBWuRu3eaZl1o0Qe1k6fy\nMKRL\r\n=DZaA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"46d89b3e617c500235c68e6d33067c2838c55489","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.1","@storybook/core-events":"4.0.0-rc.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.1","@storybook/addon-actions":"4.0.0-rc.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.1_1539827790725_0.6658241784310908","host":"s3://npm-registry-packages"}},"4.0.0-rc.2":{"name":"@storybook/ui","version":"4.0.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5d4c9c7000638969d4914dd812847b8af3987f9f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.2.tgz","fileCount":167,"integrity":"sha512-fXLC3MgSG7yF8Q9Z+a0tVjTwjlqiZDW83Pz3mSwlEAfVUIVcc0YCp1QYNjy55Ueqr8OmK9JpcEEgErFHsqVIew==","signatures":[{"sig":"MEUCIFBqieNh6rKYWjRd+Ygg1VLbFymGcZZoY+eH7kbiWEgSAiEApmFjLM4jOaT3lg91P73jmQvsfCSlhH7j8x04Xr5TZ4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbzdOoCRA9TVsSAnZWagAAd7YP+QGaiB1NdsTzZ6nqT/9K\nCAF0O4Ga1E1gPxclGDt3nvz9y7Qdi6AZSuy+bqRNwRPM/n1REqkBjBVosolz\nFJ/uSycUI9er8tfq512v+aYt0+3eAP5fp3idfIN+BMt3Yp6eHM2TVRQslmd0\nk73+p7ovlSLjN8HOqDwKMDEwdxU5m0heXCnHg9MaeFQqihuOUgs0VdNQ6XGJ\nOzmo6da4et7yWTxMag4gHIHr/GTFbVabVDmrwXTRdLqFYZNCk+H1VNYoo03I\n5nv0E/8G6FwuEARlY47l/Wn54uG1QtkR9F8aUgeqrZghV2PJVFLZDQuOAE6T\nzNkd9+6MkVN7TdcXk4h1IgCTx4bowO5U10dY4GPyJKD0N5X5j8mBDHj4Uncb\nD7KuRq62tI+xKc0s4ZPpd3RGJFqhWdn6qa1lqqje9rNf6hSTnFo1B14a0AUA\nLvQtdbE8XzeAzXAySTxRiQAZLb1mOGHeei+9SuyjYjvoQreVbhfwSrk1X7+o\n+YUMSN+1V5wMYBps6Rv//MfJl4Gx6zLLTu4jc6q7uwwe4b43+GBdTD8IW1RE\nmtabaIvlm848HmuaZl4+C4L50Z6jNjgIWZPfuVYr2vl1B7D/7b6k9M8gOSBP\n7r/Ho7SJvmqzs0PxjxgciTQcAvlkVUuhb/YcYGb5+asm0lmQWBBJ+akoJLPT\nVPRE\r\n=8lWt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"8fb0caa37edc7034a33024e9dcfa6a416857b7bf","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.2","@storybook/core-events":"4.0.0-rc.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.2","@storybook/addon-actions":"4.0.0-rc.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.2_1540215719640_0.15690989358886687","host":"s3://npm-registry-packages"}},"4.0.0-rc.3":{"name":"@storybook/ui","version":"4.0.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"455d50a13613bda53ece7b0be49da5bdb6ad124f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.3.tgz","fileCount":167,"integrity":"sha512-UfFMrhonTEJcxuo6Snizcj/Vv/UrF5B6V3oFwhAu+u8CvwjjlstN/7X/oR71aSPP/DROVXWhjd4WaScAX8QMfA==","signatures":[{"sig":"MEUCIE8O/s7vc9YnCeJvZRsbcIaA01C2ViCp93jLoAJQVFokAiEAv0g/yqWTeSqkqJ5f0ythB9r3EygQ2h29khUWZuSbWvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbz0qYCRA9TVsSAnZWagAAIfYQAJArVDWq7vUy9+FZrHao\n8jGpy5eo1yIFyjb3WCzCcw4Zr+2w1GojxWRM5t7ajiDh/AYS7YiYGACib1K4\niuctcO6iQTJpE/0k+uXdRhAF8g0XhIuf9tCHCBERbfzaPfZ7lozzPSWUQNPj\nWXVrZOg4YK7JigExinKxiReklxXDRkJ6co6nfvtexY+XetiwwzU8VCpxPgGK\ne2KA2d+XLnDUrllJu/b7vA3IvHAh6IjIyypWd1pmznJARnFgmDLx70NZHj2P\nY9TuIJ5FB/b41HbQi96t/bsL7CAN9ul87/jrbopd5xsoSQ9zgb4Wcr8/U+mu\nLTHOiXCIMcr6sbsr26A1ml7cjOuvCdUdM+Ql4LrKrgERG+WpB/3DSkpboEWc\nvPzf2/sPmnE+hXvK7ZXCP55YB492ls4oTITiVZt3UkJxce5vg9pr7INyrvzt\nx+BnbmWjJZD1tykxCADl34lbBO8rza2OFAUX66l1AogU8Sexwf8o89q8DA35\naoAJk40wD+VCGyIHWum8jSq+3IKPxi4du1oZbW3bvQZ3yp4LUGruH9igOU2O\nDvkGpuzU+ROXRgosS4CiJcfwzqcwJpF/gHHUYrFooZMr1vSpkVgM2dE8Zlyw\nK0ypjm1S2SeRULybI1hD1PUPiyZG2s94r6hTzQSYGTbuIRPLAbLtYpz64bWH\nI1WS\r\n=V9Hy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"284fb1b4c2fcb619ec6c61af4e04f77df1896bbe","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.2.1","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.3","@storybook/core-events":"4.0.0-rc.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.3","@storybook/addon-actions":"4.0.0-rc.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.3_1540311703617_0.16802336859217815","host":"s3://npm-registry-packages"}},"4.0.0-rc.4":{"name":"@storybook/ui","version":"4.0.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1e105ca2f8175b7630e86b015032ed95677c616c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.4.tgz","fileCount":167,"integrity":"sha512-Py0AK9QSs8QdGsrrTkOXaey3HrRKzfzkIWHNo+HdjfCat1tawmhy9R4C93uco71lsgDz0L3+4yocAaquvRNnnw==","signatures":[{"sig":"MEYCIQDU/fakJpZLIh5Fx4qrmX9I57+vIvO92LpCddyyHy2q8QIhAP7joF/p6FTMibMTdSePYPn3btW3t021OxNfsRZzi/Aq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0TEiCRA9TVsSAnZWagAAr/kP/AuIPt50NBaC878tyg4r\ndhvU2cXsD2Z1in/7OpyY0tfhIn0cLP7EdNj5hmrvIZeqyC3utmoBOHAigZoh\nx2DnLCRqTlGlDCAcYUoBx4X9IP/ZHpus+VwDQhSJ11xslpfhSjScIEkqiQjq\nHAY9FFsP7+2jlfmvo2P15aB+/caB1FKR8SCRgrJgix3DDGBOQL+MMy9SKkb3\nvXevEqZg7W2sIOkKV/c/0YVC1hXZUHiZEF6fcJDtpVQ9B1yFgD3dWxQSzT9p\nzwooDu+w7Cp+JwMN5iVlodExn5D+XDeTXH5ARWSeuQrphJPzK3MHAiV13NIC\nmIqpZEjm+RU7/Un98axMOVQdPZBCBBhLS+NMrv5XGsUoFUSUIjR1KhykX3bY\niH/PiWpS8S4JeCag0Q74DpcZ8u407WYGCMpBKLFB3tDOD2opoJJRaTpih7tS\n8z7pSrWOxtre4vbPFBB/apASAqiUD5Votq3RNj0VdOQC5d2UFpDB/fQ8Q0ta\nNRxikt4KR/gIt00fekopQzUTBAJu8tbZnDq//IBsRu2oY97iAN/IsKFgSzut\nja4PxDlpdA878FqbKajHSDcDR9ECBwj0GM/zTxlWJFfPFCGIeckTd2Lyd+8X\nfFLpg/2nYI8ZJkjxk5aHoGwy7u4MegJpyeaGVyhYRZYJ+smy6pi88HQIUNKw\nffrs\r\n=yagP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"d7bbaeb132ef759c3d3c0d8ee7798e54796b692b","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.4","@storybook/core-events":"4.0.0-rc.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.4","@storybook/addon-actions":"4.0.0-rc.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.4_1540436257064_0.6292176590013561","host":"s3://npm-registry-packages"}},"4.0.0-rc.5":{"name":"@storybook/ui","version":"4.0.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"23b558b63c819f10ae6b46544bd2f7431ff281d6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.5.tgz","fileCount":167,"integrity":"sha512-tHOvxIqhXK1wJcbTX9mUmA2x4kLfhVOEGM523LpFbEsPzsdua7Juv3fxBFBCXA//kR4nvotjHu6N8P3t9Zm7zA==","signatures":[{"sig":"MEUCIGxADRUYueerxSoqSl1OaiM5zdjasTNQKJ4bUP7zBxUhAiEAto5xjzqdxH7A2gj9d4rlXz6O0hhDwHBPMKAODdr+L5I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0TweCRA9TVsSAnZWagAAu1YP/jJxlLZlZGD8Odkgwah7\nxLS8lZTHijrLb80ZCg65Z+Ia7C4vMjrYswdVH5mM5SKavpCCuu22bX1mgyBT\nJBPLNiVqq9DfPovphvRihkcLGFTne6i7JBuiLMwYNySrVWWQZqxamBor15uF\nPJuR8RzHtctK/qwQ7ETnuClKI6ZEMHBWGoIwRuGsUb0LdImVLcn8+yKeNscq\nDVwQWUKOGwMp9tALImlqvKd7BI6srbVP9EMmD4nZwGtot2jbGlYQeEM69UpY\nGsPNd+vd54nhkyyyoOFDyj+NxLTaKlWPHD7nicZyylNw0W8NolDVu6dvkUhe\n0tCi2w2EytmpVEeEHW3mgkjnTnjdaurBRwLKpu4ale02ILAKazL6oI103Vjx\ngJkND3Phayat+2X73R5m6iNH8IdfA4xXoVOn5B+SfIGcCoYIDP0ufD6ZgPjy\nL4umS82EPredMgQ4LUKEndeTfR+OzEGC029idK79w6CoiJ+sqbIa2cu6Ruih\n7MDovagxVkmrxe+4RHGu61REfV4DR5T3+M9KJve3pbEX2SudkGUqS0QOVBGw\n3hpXHOqygXKjC4wRLP/SVZH+BxFuzimkoKnRmapCiZnazUPSXsbKcnFraaRP\nKdayF9quDun68bmTRjR9V7v6aVghTn0TpmadALnUPFEQ7DGHsR9rV/L4ET7M\nA6sA\r\n=8q7+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"9cc644cddec3e4b0079aeb48afa457f432695e3c","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.5","@storybook/core-events":"4.0.0-rc.5","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.5","@storybook/addon-actions":"4.0.0-rc.5"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.5_1540439069293_0.1967309328911453","host":"s3://npm-registry-packages"}},"4.0.0-rc.6":{"name":"@storybook/ui","version":"4.0.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0-rc.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"361590313d82202cfea5def86041ff299aa8f0d1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0-rc.6.tgz","fileCount":167,"integrity":"sha512-sE104cq0tU7ExJRSms3R3cNXqVbuQCv7CgJOG2FC/gIpZpUzmxBhoxydoGgehBVGH5g9jkNaG1gFx6pmspLHag==","signatures":[{"sig":"MEUCICRQq1v+3UAttYLY7g9Ed8WVqezFXLd4j1nB701ZlVT7AiEAyFmd7JVLTaUbVuHhbYAsmeykzYpwA5LmwFfvX9+W8TQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0Ui9CRA9TVsSAnZWagAAj+4P/2QAh9T2i03FPaKc4VQ2\n3e2zMWxjv3exi0/tdzD1lGpxz6/CErvJKqdiK1ng8EIpBW1ZrO7I16BgL+IJ\ne567yGkMd7qp5yJz8nnzAaTfn93Htx5oPPVerSYwJfcWDwTUpkHDdRe0uWe1\nsENkik+xEqqnmIS1DB4CYd30aGVO88O7YnZ+yz9PeTuzBgGdjc/WEhD6VdRH\nLa6vRLGVZ7anJ+2IDw9/c3LQ5Uwz0C8v992nP6cboVyZd0X8eLpZL3lefqnx\ndZm6TapqTMN0LTZKi6OhijBci8kfn2mpUCnb+MZgHO9b4hTORxQamSy0WqZw\nFT/06LoxBmXcOytUR2VLDczLHu9pMnKLGOHehEW1odtGUDsTVF5taKyVhfy8\n1EnTZnpVkENoqJf979ZkXKtTzTobV6eSsBm0bvSZbJx2LyVWqCLhHYWcHNzh\nUwcB5O4MOdB+1cnbE58qAmbYA2y7dtQUv2lsXhNlqnZf4YONjy8eGVu0oSr2\nc/OfId7aXQ891GsNEWoMG6KlYSAyN+Wielq2PY5iA7Gn0aq9oVTIVsP9OOTZ\n3rz/N5DsMv+PUf4MMsPfU/6W1pm+f8+RTE274CI7T7ld0X37nhS8ndyJ2q23\nJ6XemMo0S83amvGLs5diXxtDFk8Wc6X1yI8rUFG9U1p9p2iqOD3GaY8JioLo\nqZhu\r\n=jAF0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"b3417c8134ce651264af9f65f65bd5b3ce54f718","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0-rc.6","@storybook/core-events":"4.0.0-rc.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.0.0-rc.6","@storybook/addon-actions":"4.0.0-rc.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0-rc.6_1540442300436_0.9830377031926822","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@storybook/ui","version":"4.0.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"22997bbf2bde13a829153d134fca484cf85ee5a6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.0.tgz","fileCount":167,"integrity":"sha512-yBsGKNZQDyw53+Q3BrjHIvTrgCHL4YsGxac74KjvtuhZAteXY9rnOp9h7V6RPUTONBJwKwRUNtapSJJX+JFg0A==","signatures":[{"sig":"MEYCIQDIZnFoesKmC2+kA15gGspUy2PPsyLtvP0hN/SCr05fyAIhAOpCWlla0Go6VIxtEv5Z6HQaEZBR3ggWKOQBv60mzlLM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb1nFbCRA9TVsSAnZWagAAzYgQAKIwvK0NrZDI1eK/Bf26\nNju07SX/eH4I55g8wnMVs74D7G95yn1dx8gYyz1Hx6/q3E5Pla7lmuVKGezq\n0hsweNAxHLlJuGXENpBEl0xflUy0h67TvBSPO5b/lExJWYiY28Cl9uD7SyMl\nda960h3ycxgk3UIK9eLjUjJC8A+6zgvaT3mGSgdgpm33vA3vl7VMM1RkiC7n\n/Ryq4BeWiJKe7/cS2OjumtZSJrz1X604cQAgIef0lmm0qnQasPDD8fMpBVFF\nDTP0NyTt0hHLEPtKg2ZTF20pb7SAZoRwdUaq6kbgaLa3FX6VpofVVsqiBGsy\nah1ht+y2FBcNFon0/eL7JW/ss8/Sz7toNyPrHspJZNO9nCClLNamWfLOM2/n\n+FcZq45RmzLOFzgO/zBhs8VLc3FZTRz37EXqVZieAfkWTJYu6kYoVMJUxn+d\ncVcRc2nUnGrkdHqzuKkLIHiHaF6De5O7VHnlrnjCadUZvMerVGp+SqzTBpXf\nPT+tgDiAfR7dwJQY0/nTzhsDzzf6iUZdD+reQfiju7HX3AAoF9qi4PciQyF5\noZPxFxNbhBY5vVlqO6RHGalGCUpJPd4zvscE6DkDZ9ZWQArDk/uA3alcMT0v\nZynX7rMmmnjzcRZAMF3h4rFUCsDA9AcMiu4eB17IIioNs1NTivfMXpcZdXQk\n4ijs\r\n=yAPH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8dd9bb346153221c02ed495e43ba02bd73271875","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.0","@storybook/core-events":"4.0.0","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.0","@storybook/addon-actions":"4.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.0_1540780378688_0.4130427875405829","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@storybook/ui","version":"4.0.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"7635200ee0db1e3c230f3c1c45ef1a648667af1c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.1.tgz","fileCount":167,"integrity":"sha512-TcWmcQkeA+TxBCeQywUkreaJZsmeliUgsG/XJcgJZWqV+z+YnEZyDfEa7KzMtVIUoCyVGYgy1YNzApVJqhgdFQ==","signatures":[{"sig":"MEYCIQDMKDZxaRcng9r45ruqY9h3x5UX381FXrm2THpSbO3GAwIhAMLNv5BJ3TNuUZ9f9ZvV/2eJc0IXCeTlZOgtCO+zyai0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2VYsCRA9TVsSAnZWagAAQSMP/jNaLfGINq5tN+eMATyU\nZubFH8Bas/WPusnlb627Tu5JDXic9eFQHCmC7xBUhdmAeJg+krNmqXNOuODG\nPJsIusX+DnR+XXammnMC3tJZdXJDpdb5vhN7/6x7QouLh/IVl6I3XAcpC32k\nTDnwZjPicS0+w9M4pS7xWKxRgzMFduRybTXE03pY8rzGOnZBBwnT/IwO7xAo\nfVLuEhNMuhzoYpmvStSx1203bwK3lM3nH2s0qQw2vJaKTUS51fCd5Pyp4H9S\nc3bcS8ZNj+tr1ba07C0FDFmpykRbea2tdFJHVQ1b7lrWJTNdudj6rwC3P4aB\nwRk2bN8BToSDZBHOpn4xKE+A+LJNaMPMYmHsptP/ysoxoCwxRDTGlHwngrGT\nP9CXpX/M2AG1eFFXbc45loKpGpwnqNimIJ3XA5p0FUvdXNpSF18HcjFdb9XP\nazehQ9Kr21XYaeJIy/AHaoHHSmOo0WMjKYtCQBwhwS4s9AfcNR4pUa5hAT3x\n9ePmui8mJxRDdqktOtgl/9mKP7rsMO9FNe3EBZk0uUjjVo5mOYhTCTv74LXm\n+guKSYude5muBZTWUQdS69vrwxoNd3w9FeWVh2UhsZR0gKbz/BNbIwTtXT8v\nckyHFMMZllc74L4m+dCakk48mltCjLnxLlohyuvE/u0t+6sVS7tqOyFxzXgr\nxGJO\r\n=rCKI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9d9f3ed7bbb999eea86b898af4299533481c129e","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.1","@storybook/core-events":"4.0.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.1","@storybook/addon-actions":"4.0.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.1_1540970027352_0.11635581182562849","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@storybook/ui","version":"4.0.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"850fd30f300064a4dc5b3f5dd6940bc67739f669","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.2.tgz","fileCount":167,"integrity":"sha512-TvatkR49gbHaTy2qlqO8F+n/iLQmLg705vaQMmZwYAJ7ekh6WX9gFiF9m45C+IeKIM44JMCbwpkeyzHVN1u/kg==","signatures":[{"sig":"MEUCIQDtv+UsNRElwO7P3W3r3HVhSPeOWp2wQcQsdQoRTXT0YQIgORaZc/l5yFiDtiTgi1AMIbwzbdP8iT2wyJX5noybSBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2WzXCRA9TVsSAnZWagAAWboQAISGC/U9OXMo2nGpepTS\nGdTEox+BOxUw+I5nbXCZV5LtuGRjMRGQhI9XSU9ine4dxJ8ZDnOEw0FAcdJr\nFVDyJD29PiDGZMn24HSgBMDIzKqombTn2MPKI05zDtoe12uA2VbHRZ/DM9xo\n+wjvmITZBW4I3aJEeNii99MOE42orPHNg2FRUouMjTEKeHB1p6ro7nQaI03K\nQmIPS46qR8Xli91ySpbScUfC7K3C6l471+gD92xiNVYavuSdTFAH5VnN0LR7\nIgGnZH7ybUpno6o4GKFhVcXpZxwb2e9jE2tVKAWUYVgW169cc1wyC/3CyvbS\nsv3zpo3PJUWA/8MER24H7lNweGGgXpyZbYXTJJwBO0tAV6ij7nIJW8hjSYT2\nacXfG22crIDcewfj8j1tttD12qKziwGBLhgBLSe60qDRZernU8sKU4b8ZOx4\nrJl4poLoIe1OY9Em5NTP1qc5P8zsapkUsZu6is8qxBqYQdfI7a5hNmHzbWk2\nHd2rmjzYcA2XTUE/nvkUOG3ymytAOoxEqxJaQuDpMDOI+GkG7LdXCdUd6OBG\noNvmHRrNdYBMZ387T4nsMTmLeKOWR5wsb58BaZJMi2DDwEV9B4xZmuRB1K3t\nEDYh/cIOYzeGqAP9N8Y1kvw58eQ6EQyl0UOZ1MisgHbK1QKVTS+2ecPn/COX\nfTM8\r\n=jJ7w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"037f6cf3a54776739c9ec124a927657935b5c6e2","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.2","@storybook/core-events":"4.0.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.2","@storybook/addon-actions":"4.0.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.2_1540975830616_0.39973327911992196","host":"s3://npm-registry-packages"}},"4.0.3":{"name":"@storybook/ui","version":"4.0.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5c27f9e4f785d0a2360f073957b7c908bd2616a7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.3.tgz","fileCount":167,"integrity":"sha512-3TwB7Ms8bzQZnG3edeG7n0gs4SUyYtQIH/slUqQp64rgRX0TFRS6Uo61lbma5Eya3/DePTCFkXiVSj5HPqYLgQ==","signatures":[{"sig":"MEUCIFUbRhnVZcOnSVEqgy+YtL1+ngXGarVlVCa6goiJ0sTjAiEAzSYzJFRx16986mVoZuINx3Ezy/iF92hdFgDVUHggdj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4R5ACRA9TVsSAnZWagAAXYoP/094BVRnX36aYrDWoaiy\n6TKOcZLy4c33l5HTgbuvPudLyu3mi9JgQXRu92tyBJBUrVAeXWuRe/rBqRVe\n2iQ4CnO6ypioqQMnGErtJGjENQjRmejRRRmRAcX0ZcU4LXruB/rQqWyXNCe1\nODiA8k71xBn8xLbBXmJ8FX4zCOitExMGajPWhVLEL6061rKKIrN7sKafXhsj\nTCSeS6HQ9YgFW92girsics2BAGU6w3N0qQ4cmj6D9dwMW+dhoa0Ea7Yv8j7s\nPnfzWsV2OWx9aD80tYJ1AcLyoaEC74DAEQ1s51VS9V7uvY8ySwD4BAJwMsci\nUamNqRqSLaZIfgEqITN1otfkH4k5Mkg60Lpp0014SqxWsBeA7GzX3444Npeo\nAxwgXbmu+ZS3aWvH73kSumv3ULZKq7bBsNZqigtachuXjBhh/2B8Ha1VDgDe\n7f506TZ21w8kd8xh9rryDcSFXTJXo1jZcWKa9ibOBagcXE+uYbntH4Nvyfhw\ntMsgN2MovPPfspOJ0J0j/c+h2aUhfEbN5901ena9Dl8TnSr/dgtj2ZJp3kPv\nft83VYYKsRG8F40eCKN1e+8krd8S3DxiG77gfnxb2ioAKfKGqhlAyIbokend\nXL5jCal0jMbQRsXpbBd8gwEJ1LtJspHHAYmvzXPFyxPPC/4Xbp59CqiY6ERL\n7PIB\r\n=rNo6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b9ae585f9c7ce3327b4da400b917b04d8596807d","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.3","@storybook/core-events":"4.0.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.3","@storybook/addon-actions":"4.0.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.3_1541479999539_0.37833145951406366","host":"s3://npm-registry-packages"}},"4.0.4":{"name":"@storybook/ui","version":"4.0.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d7b96be6ccc4e90760dd5e8277a734660bc0d234","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.4.tgz","fileCount":167,"integrity":"sha512-07o7qKQehsIzte4cjp0o9mXEf9YDEiRo3DQbHyTqFehEsj1vSJH/+WH5p5eAK4Zu7K01wprdOoyxsq2tRKQ8xA==","signatures":[{"sig":"MEUCIDUltczko1Xja0hmEf34xSGl9zCK1ebe+dUoXDfksxJLAiEA5QQBgTvNNEbZIz1yxTh+Dk2+W3dJKOVIQOLcvP4PdAU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4SlKCRA9TVsSAnZWagAArYgP/345jRuq/VdA31Z+fA7O\nsl3EWVrko88S8vxroa6rTqO4hFxalj6NERiTbYyk3WgZ25iFVbFNhoG/5pHP\nJZ+0e7+rJprWsqzlzo3p5P2CYflD3oZFUoV85cHOgI9BLRhUpditCNePvgRV\nibew0WwBT7DMJfSC/RyK11MLOkKzMHrvqw0qQ8fYIytAIWQDy/0cq5OhqWR8\no4T8yroqmZTDAOmSA8ESZ0VjwUCF7YxW5VfCJ+FiXV3Z4zZFXt7y8vx3ZnXW\nJhcJHr10VZBPldAiJryRttRJiGo5ccdjVGptxo9banTjlU5CFrYrwSvDG8Vv\neIQL5HQ3UJUJJzZ23Q6plDeKxmQKsfUSLEsOPg/mMaTPxA12ifrCrcm98k4Z\nKo3sTxulZiYT6i4DoHTacjhaeyX9bR8BASXmn/tHP8nhBEekxJK1EHPa+zbN\n4hPQYJQRM7yuFxryodp6HWilj5hdajCzr3PZtIRk0gtLqllQ46ZxXAoMhOmh\nl35silJb5lZNfcVSq1Dn8+PtpTs8kIg6bkFuk/cTYlUuT5bemy3W72DUDTY3\n5LF/IXnVpLhxMxpRO47AF2UeZHpcsEalQH1LMhMTj6iGY5qLS3zkkLv5MnE+\nklSsyslnQ9TAQc7aiYw/6UHjdxGlh8rVMmkWWAe0Xg656El7kDfJQb5Vb/vr\nfu65\r\n=krjh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"0cc22e4b2769339e0fdf8980e572bfe950d4902e","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.4","@storybook/core-events":"4.0.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.4","@storybook/addon-actions":"4.0.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.4_1541482825559_0.7946124767709364","host":"s3://npm-registry-packages"}},"4.1.0-alpha.1":{"name":"@storybook/ui","version":"4.1.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"460e5be1cd0c517ca4f9afb30f4cfeeb9394c7d8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.1.tgz","fileCount":167,"integrity":"sha512-VwrhotsJIusDILAFl2GYHQ0Xb0eR6Hbk5d/UKG14J/LrCWmfdHjNRnFtCVqar9HI+Kh6I/hz376prNUkJ2TwtA==","signatures":[{"sig":"MEUCIQCEQvUKC6/+pgKGuV9A7bAxuMj4YIxrEB4K+deZt4oHtgIgRbM0DdLgIjAP58h6C/G39hOED6u6i/rJDI4zl4Yk8HM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4VxVCRA9TVsSAnZWagAAs10P/2BQhOVANuHxsIYHDtFm\nvi6343/j3QTYTYvcNqTmMnJUWRpCtaYoFaazTXgaG+v+oE4+B+z8vK4dbPWu\n5NQ55euGaRg1AHUpvXhoUv5IQxZNYLniV6RxuEUuaSnHTQvRdN91rG+RbSm8\nJ1p2aYryg+R6zZeTbX5q6hNRLlmW+KIhfgr432hAjvayIb0GZgugfl3/6Tu7\nYU2DT3gFRI1v0Ir35ayUskVj+sBiSty+6h2G7A7ECoFPhvP+OYoEJhqI5pd6\n3MjL+96KrcbrDAPQILYa7/7/jTSs6RnegxKqSAQ0FKjQjvNR2DW4X8yjkgxD\nWE2HfnqOs/AC1Zj3tZaC3gTvtFVn15ga5oQ6j7vTFr3LK/xDiSG8akdkAa0Z\n7yP6AVtVhX8bofKrf7uK27pu0XZ6RujVZAGnguxJTMMT4pju0Rp+PsWFkfWM\n0NM2h1CS3JpGGwDneqxvIjZfGYBQ+lDkRYqISuU2X/BwIFvwLW8k2nj0dExZ\nMACFQdNnGQEsACbhQL6/jNiAeTTzHpkWy+Cwd9E5tN/SP3zCdjqrzEDwZe8X\n3lTkMG6REYDSYtzSthD4dkBnqAtMHbvpnGMGET8y/uVo9RWH02xkd+/cDmEI\nVbdOHW6l/NciOriGmXiEP9IdcnIKcHyuH/DftWP1Xo4dgvDf8RyROoXyTLsF\ntpA/\r\n=Okv0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"253a667e68bac7dee4d97a6bcca020b7d05617e6","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.1","@storybook/core-events":"4.1.0-alpha.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.1","@storybook/addon-actions":"4.1.0-alpha.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.1_1541495892805_0.9096684206869643","host":"s3://npm-registry-packages"}},"4.0.6":{"name":"@storybook/ui","version":"4.0.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"640bb40335484293f805e4ce83246368a1b9cf7c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.6.tgz","fileCount":167,"integrity":"sha512-P3te//P92F+HDa2dgD16iSxhyVnSNbAvlte03ngYVdULQC0IxHvHh0hAoSEs/XHjB3g7wYIMGJPyjpsBrvQ2lA==","signatures":[{"sig":"MEQCIEUDiF/AocODV0m5Qt1QBvxtvQynENI3lciAXZ6rjIenAiBqzZ0tJQVucLhoJ7xhGLwo3qgfmzPTd4BONx0EFVrcMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6rJlCRA9TVsSAnZWagAAClsP/Ri7xuo6pZG4jEMhlw1Z\nwXqfS2pFzgPjt1kFII6vfPejYdX31tyxhg1ASRs7+j5UYuJx7Np+4t7CilZt\nrGMqVuCwfLLGbqM7oQrbLkAcenOJBc1TIytPkaGNihuaRoFzhlNX96KXJFiS\nY3QRDZZnsn6+kOBFgHsLENAKpmfnKMf3Lq3AnfyBgDviwQW/EeCjgqBYMykF\nzchPTO84KdojMou5zIBQmHfNRhF9tfiioB5r3Tpof7cAwXSmHORmK3Dm7zsi\nQebLCfxwimOvj6b2UWPI5IWlGOwZ0lTrMQRO962M7Uh7aKO3r/CeXMyFzNrA\nDDqEHgnNEScu16GiMm1DJOH1yIGFr/7CTL11VLH581SWNThq0/P2MgWrYzWB\nVLpmiVJea0/gcQbSuijnwSKBjfWbC8PYOY+EPGJoTVMRuyibKxHYOCwVjj3r\nC4ZMnlNwYMPfSPF8yqyJORFzKNmi3hCfTndGKe6KvSoifw6WN3XvZC+CqZrq\nibRDfCikOa+4j5rZ+Q8B4/i8h4Oz5qz56Rlx5LJHOmkx+L0vSSNDaDif8Jy9\n+d61zAdLag2NE2QGz8rd78UF3Zb7Fd79bdDBu664LLTvGL92u+0m2XM3jmjg\n8JzXalWwK2t6PA828k5xYdReuegLnQmYKi+rblkNdzG6NrFUPvWvnoa96LS3\n8PVN\r\n=87eM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5d85f5d13286129f85f3e6d78c105b67fbc35b5d","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.6","@storybook/core-events":"4.0.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.6","@storybook/addon-actions":"4.0.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.6_1542107748231_0.9845582752556814","host":"s3://npm-registry-packages"}},"4.1.0-alpha.2":{"name":"@storybook/ui","version":"4.1.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"534321c18f7783828605a344fb62bb96efd6e781","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.2.tgz","fileCount":167,"integrity":"sha512-ZLUi4cfhajVltl9N6B4Tqchj0NqlcoDXgcZinflhI8Fwygbq8Q61vQzQRdXqKA0UipRKGCAqt7QxwPzc9BHx+Q==","signatures":[{"sig":"MEYCIQDKXR167Qz1D8etJj8yV1ofcQxenVuhNmHRvE7A5Ow3mQIhAKF5wx7lm5WnR7E7/GAXPksZsIE1UnCrzZUERQYIVR16","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6rcnCRA9TVsSAnZWagAA/jEP/16jnxr8L/T4FCBClYKm\n70/2gvbzId8ipvRQzx+ad8ZnGMFsPwZJOyb4dsC6+dDqXy/3WBxawJ4mmZEv\noZfagdDKryxSOL56JUMWJhBvpTAaUpJ3PFMPx5mGaMd9Thq6cERuA/SNPIMC\neuZz1Y5CuNAC0qXsvRjD8WkP6KBbQrWiFfLLrOccTrwQRcut5K5XzzC7BaTG\n82yOc+XmWa8e/DUfMEfmC1DWpE0HixYUW7gvzHQG7H/8Yc22IaQpDN6LPs6R\nr9szsOzyeCEMAsZC3hN5uNg8yJ8ngIYqZLqsKEC0TSyn4BDmuRgOV+a7kcdM\nDJMLkrZnLIJlzNeS+e2PJpQqWiA+4NxyH7kfaFvcKpIiyFQdAB1mYIShhl0p\nrNvtiFkDXHdZ1wKxz0nQF0JqRx7GKwrl+xvKxuyAY0Y91AbrmwD2BrV+Fi7W\nBIgiQyT2oVT1qKQM3QOM/9y1BrJqkTScOx9dV9ilOthQCqcL+m7zFNbHquL0\nnlFLBC+YTU70l/KopDNJqi2I60uvjJNeu70zIXiJiTu4xiBGQyvpVOqIvZtf\nIkckFRoUktY/Gxg328Hhg3XcV/aghI5aGtlwEdF2fhvGp0o5MfPgbBOxtsWJ\n3MxQeb0IuBnxr0F83wBBvkqMuXKAofn4vBGgkIt8PeTezJbfFuB4Z2XJghrA\nwla1\r\n=9BE7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"cdb9e485eb85690368b1f698db9220ca7bc0298e","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.2","@storybook/core-events":"4.1.0-alpha.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.2","@storybook/addon-actions":"4.1.0-alpha.2"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.2_1542108966682_0.8930226992793493","host":"s3://npm-registry-packages"}},"4.0.7":{"name":"@storybook/ui","version":"4.0.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ac6f66c7973ff19f0c0f27fd5bca2856eed628cd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.7.tgz","fileCount":167,"integrity":"sha512-VSvSU0Ac81D0J26U6+E0zSQBA7VtjVFBEv/SwXJ81DxA8jgCK08YZF8CGaTJGEcY6EY3G1HACcfnVHrXyzT8zw==","signatures":[{"sig":"MEQCIC/8vsa56NTfm0ALESG7RRhdvoASzffAWh+HcC1u3uk8AiA8QhmAgjYz65Sj268uPl2D2UF/ZV8Hx+Oy+p3zedm7JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7XXdCRA9TVsSAnZWagAAzrUP/3ziYsWaulqboCl7zsUC\nflbuEFO5valTbEbGBH9nQf7oJTGlq2xEZCAeyRqFVxkt2o/SZnaCN8k3B19E\nwcYJkWqaEz4JWS93MFIG8AMBTzV2NptE1I2T73Y0r2uavc9pTEmOlkjJa9b9\nQZU+uzx8DjfNvZ063a2D6kvZg0B5MmpdkM1Rr6Hre1rzkarq0TEYTlE6cagd\nySpq5FoNHtXi3YYY8bzue69kSObrJhBRrBbArV7+ukLjdaO0BiwkgxKAILx2\nqxWqFtS2Kp7AChEoOKv7fXjiM7kK1qINTjrjllRM4F4HO9VWNP/eIiWDmV9d\nVqp3Frntw1FONgH7HptHKq3EiUWFYDpvZ/3+5+sc55VJdraNfKRjp68d5SaN\nHEdr1j4ydkd+Tm+oUJO8dRffrJRia3MDk+6IfrwFn6DEhXVVWdENn98wKYUT\nRfq2xTBDGqS/dYMUrxb+dHIG1LVHvW50voz7fkoNeYzuUJHwdoaNXp1bnUzT\nOe7P3N8LcHi8js65ytNPliWq3WYbSwowh5DA7TwPPi/CVWGFEPTs2YGj13ES\nK6qXECShsgNLEkz4RDj3OcSlqg7fJEtzJAQtWPjiwqWQvwS1csBTmtWbwOiv\nyMyvItKEfAYibrScQQ03M3N1lEkcs+IroaxGaBmpUrHQ9nQKYustY399VaZh\ndUQ5\r\n=cj4z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5d5dfe011db3b65ad52e1559333b04e7e07af461","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.7","@storybook/core-events":"4.0.7","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.7","@storybook/addon-actions":"4.0.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.7_1542288860870_0.3484376592688814","host":"s3://npm-registry-packages"}},"4.1.0-alpha.3":{"name":"@storybook/ui","version":"4.1.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"99d4efb7a70cea90805a1a2bc75a1da6e0016706","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.3.tgz","fileCount":167,"integrity":"sha512-ItomcqF5GpUGosHjb3CJSldn/MNCsRKIl/F9vFJ5JafdEuLR/1cOTP6iontOWTvTYF81WBcwxodtgtqkSqM+bw==","signatures":[{"sig":"MEUCIQCUsxgdE2NAFbo7+NFY9HCMTUplALSr7mNhIBspHTGZ1QIgC3dHJrrmcZl87yqRmCrxUvY7lHiwdqh1w3ONOfqYBzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb7X8uCRA9TVsSAnZWagAA4RIQAI/W3RdXlNcveFdK2DI8\nWrtXjktz6Ht12Gh9+EReX8hHTE2vagqQLaF391KLmjk614C78JITRIW8JtPx\nxCERPO9anbuALNn9/mH7ZLU5ZqFTf0ApkqNCcExsVRcpW3F4UIShzGaRllNV\nIQH9+KNvmdE8E3vJJzlsBF+0HiJb5/Dd2QVEcMJBf+Nj4QqK4nyxwUeOMzsk\n88VgMQ6wnNdrFfWzXZHEEPqnNngO4xFI6fk7YdfNOa9upVNNYShJIByKRtkA\n4XB2C1Wqel3ESaJSEJjx1vXi22oRofWHFtlyeCE8Xm8cUEORiT1ThOrkkXGr\nRDixVMAuW8xjo/XGdeuX4u+Z7KUBzBnSYoDydwkgbDJfl2DR8xaEJFh766lZ\nKCxncezmwbMyF1Ip36i0n4d9kDsEQl0DziOkCsfCtlaXuzsciFGVIoWDXs/D\nfYVM5sypcVJzUgCXtcq1gb/GmjRLYMkY7uoysESzGM6mVjLFcdmpNepjCy3J\nRDJ0nBxNINWEqCG9JFcMHzXcPrT46UXTcXKEYHgHhx9o0EvUhAH+aZB3H6z2\n9X2OxVwUxB4I5HTOoKN6sG5mmshFUnKVtltmM2XsWes+sxbUvc7gppLlNXGZ\nCC56AWBvQsK9f3iRUWs2BiY3ZBb47HpsrtYcCXTUq9wOVxULTQSYsGULlOc3\nSXxj\r\n=aJXy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"ddecb0b7f6a9e976a32ac4a24c2876d8ff3d6d61","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.3","@storybook/core-events":"4.1.0-alpha.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.3","@storybook/addon-actions":"4.1.0-alpha.3"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.3_1542291244989_0.8075610103593955","host":"s3://npm-registry-packages"}},"4.0.8":{"name":"@storybook/ui","version":"4.0.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2f3148086a0e6feae123d305f71cb3cf79b64a71","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.8.tgz","fileCount":167,"integrity":"sha512-PpyyMskrwBq1P5K01dqc4t5UPHlLIRZJwNtFcgg/QFiGoCxb03Xx2pn9weOEsHazdRbs+yVzBKut9QTiVbLDVg==","signatures":[{"sig":"MEUCIQDR7iedxFHfBJ63vHaJUStgcTsv/w1EOsAFk8o3Wx+rqwIgPG/xKtMIFYPj+xBw3ID/4k5yVRcQlnR1t6fMcTc1OZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9S2HCRA9TVsSAnZWagAAz7AP/122HJbR/jKdObzu51Sy\nekPYVcyWNv/+F+eUfIXicZhE71TwSih248gG1D2D0oyD/cUgixABykq/AadU\njsbVZ8CtIhJ1PUgnRdJodwWNLtHfV50sR6wWH9PFxFqlU/nR7uEq6icZqxTw\no2J27tdIZ3U7GCFErTZpkeKyOyYFN9uxrVgn9fM6Dv0AHpoPxtaH+JbWneDB\nGNdLY0ogv1YkjR5P9TdeufJzIdc13bXX8+zwMN2D0crkifkjGvN2eiLGfNOw\nNguzS3YiowMpMPxSKCvBxAbteDSikvTXU5P4nORDSgVNEZun9rWy/lodLTJ5\npzW99ZkHIobCDJwqoI6dpw+Ce3xPU79yMz0PXQyzWuKvpH9KljlT/A+eHuS0\naNJdvOndTU8Lw/z0vKnOOnfPxHeJDtSe99oXGHi2KHpiYhwGuBVl7GKJtpM5\nNHSIyZOJtDdYJw/KYQ8llQwFmQokRHHHRxSCaBTh4+THT8+I5GvVbQ7PNpVd\n6eNS+4kQvbZZl2lGYt9Xihyg0aM2U6jY69lePhr/eKUZxFXlaBMbDJgv20+F\nzta4/72+8v50g3CGLBZn5vCKCzS3JY8WieZEnWWTT+t6f/3thnmyLlMoD+Wi\n0XJD+hqFizq5Myhl7gx3h8y9T9AZ8EJgBq4sDieqq92HIZ+NWjMyH2+lZOuw\nzQ5W\r\n=pFxT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"960bd59b7d7fe3f63bc291edf55f7874e2c10a31","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.8","@storybook/core-events":"4.0.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.8","@storybook/addon-actions":"4.0.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.8_1542794630904_0.41919834864818095","host":"s3://npm-registry-packages"}},"4.1.0-alpha.4":{"name":"@storybook/ui","version":"4.1.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a5576c1bebeb7531344b9aac4ec12b73f6b25027","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.4.tgz","fileCount":167,"integrity":"sha512-fnWWPdkID9uDYJF9R8YoY5u/Mae8siMoouxk06fQWj2Gyzf22/6qB4ifB0gN5N8fxnoEIKDPzNg9ms1k/Aw0ew==","signatures":[{"sig":"MEUCIQD+oqFh4SPh/XE0f2cmrVeILyUUUwfc1fUpIX4/RkkCFgIgaqmNb8E4uxqc1TuiytiuEIHNtF6uMQZ4Cdn5YEqGayA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9TdUCRA9TVsSAnZWagAAEFAP/3s0BB75VBtVLACabbiW\npTGjt03Bu9qsjysQz7chNu+chQVTwhQp25xwmnA+N+xMU2qonHySdxanpbTL\nmRx6GqmeDbcJvjeExlmicoAOjGA164o9beQISZwaMAH9Hf7QydmCn1qiWC20\nDAfSXSEQXhxF1VaMXrODLVWRTXZpHhbCYiJPCl8fWsHcGda+ymVYztB+7WpD\nusGzkP2Fk1fc9qOT3yuAvRwYIrrJYBRvLIQ7Oon14WY64VzX0mtzYMPAi45v\nQ7zQfXPoM5t9Q1dQJnPmsygOJnSw55GPNHaPd0sbf/Bg63Cmb/+aIWmCudJV\naWldQC+f7ZVpez+F3A5wXS0U6cuRV77HUSk4ZGkONDns0Rslae+oE4uz4cgB\ne+n1pusKbGfTZYAKinV6DBJZwFAMwIt4422bRFHVYC9F/m9Wh7wGmDM5bFd7\ndWa0HILyPNk2hs1z9Hxqgbz+wYAPS3Zj+A6UHe0gpb4lcU3dyXG6Nf/OMv7T\n6x8GjH+eVaAyLLqpvDtl+vnl0f3+uU1w/5E+6mNaS9dWxKlrRzWbQjn5vvdp\nXUjn6KsB3AxtF5b21H+iIh5WWKD78vl/jLkKXV5iCMsfJvPeVF1pHh+DbRLd\njuoZO/xQZ/DnVc/sxRrkO7nLh4nCBAeJ+C/WYzutgY5XRn8+hmQvmHUI+yqL\nxtpq\r\n=ZtDe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"d8dbfcdbb5c7a7bcfc4865559dca8fa45e057ab4","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.4","@storybook/core-events":"4.1.0-alpha.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.4","@storybook/addon-actions":"4.1.0-alpha.4"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.4_1542797140227_0.06580447054624017","host":"s3://npm-registry-packages"}},"4.1.0-alpha.5":{"name":"@storybook/ui","version":"4.1.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b791722c679d95ef87d629d7c268868ef470ad4c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.5.tgz","fileCount":167,"integrity":"sha512-PJHqpiuMAAEHSf1J829thC1m3d2PmCQH7EnIFm66mOBdeSdi2wTOqMhNdSh4ooEll8bcLXN1BmF5pHWowo6JBw==","signatures":[{"sig":"MEUCIEhjWSep+otxFNFx4dJ+aj3BTr8aJPiFdC00U2OaqMTnAiEA4AVs6jSUeUaOoZMeP+f1KrXho0+5VxMuF3QhneqD4+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9ik3CRA9TVsSAnZWagAAdQYP/RfwaOkq2aclsVkqfxV0\nXYYT2bDyBwJksaQUmWZGrXKpkA+6bhMo4RLrUClFUzONLg/1zHo7oW5eaAZ9\nc78sC/DX6qruF5hPazBmY5jxF9lls+lqaeVZ6D3RlCLcuE5p79tw++5OHUwh\nHUdG4hUtAQwqMCydhsxy7U4PStb+AVv0m2RY+gfqMsPmFCYaBM1Heb97LqU2\nTU5A7F3qeqD7tfWBBpMu3lsdGAiqXwGaxvOAkXwBHKUagU08+ZC4CA5PXKeb\nfaOWjhKrePCqipAyJpAIrhnfM/eYwrS9Wkc4HNB3rqZy2gAYyFgbdrEdY56d\nbQk9j3YYtqEUhaVIitAqCeo220fDo472uQ26iCzCBCleDkLh4LQNe5loH/DB\nzuuk42VK7RQMV+avykqYsDbnSlUWc4FKYl66TzUoM4unNbr+lQPZt8EcV+DC\n5EpWss8lRDXtQhXPP3G+uGNe3CgyAN8xDcHEVQz/Iyw5HRWyuON+tQc0m9jX\nTdY3EqXNmJjzOF4iX2T0AcVCN4xsmXvwFYD52maC+lGUrGsgwAoPRIPCluuz\nEMDXIPQQxatOtd0vNX0TXYkNutDsrOCOdGwmfl6Dsc531VV/Si6eE8ET2tMx\ns3zBW3/dpTIKpLXCaTfx3+Pn5sFhbWbARijR4bngP1NAjViq9UphEaHJ7Cf+\nb393\r\n=39I+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"337eac8671835325fb003d8d3cc0a1cc6dec9bf6","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.5","@storybook/core-events":"4.1.0-alpha.5","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.5","@storybook/addon-actions":"4.1.0-alpha.5"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.5_1542859062362_0.7912859459139119","host":"s3://npm-registry-packages"}},"4.1.0-alpha.6":{"name":"@storybook/ui","version":"4.1.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f087ea2ad5de8f4b059539e994cfa2f05739edf0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.6.tgz","fileCount":167,"integrity":"sha512-ue+QWpx4CYKWiq7bVRgdnUh1PYo4n0bRY0xPomPTdmYuK4vqddxTBENGtML54hKMTb9jTLjx2c0gLOFjdGjc6g==","signatures":[{"sig":"MEUCIQCjwNj7MqCTLRj4Fgl4z2IJE//4VFP6fpyOj1LIiLIPUQIgDyN4LrrAinoC+T6mchZj25hi5gqrv3j4pThESU3O3jw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9ivfCRA9TVsSAnZWagAAtLEP/0um4a4aNYzRIWwq1ShC\nNJ6O6F7wFl4265VzwgDkcXdUoGnHRVIH34mKivpMQt8qfo5zIyXOYTr1DaDb\nKn/A7CfA78tm0pNnGpZABluGbM6E5xVXXp4YvoOm3qKPpYN8FLnNL1cPX05V\nbzqFcQLfSO+KtL43Cur5NJ2xQ9oQAECg+T+zfX7EFmHlrgkldEqfzRNY8y9f\nmHx94A5/sDVeA+Cw1z0BjspGqCZtI8Bnf67d0BknsB3Kw3SsW2sHtiL9LZcI\napkiwTcQvFehcDircDEt0jTzDyMQ/1XXP0LowV2Lr/0UxZ2K8iSuAc1w3y4v\nDEfaQYHfBCq9U2lQqDj6mFEHpxHTfPhs/vxQiTd8XfUIY8c61gb9vowxRr7N\nN6H8o3MWzPW1H8k8fngiO+nWbxr8mxfpxJu/dXyhKaWk0aH2FqYYPq3+9lQ4\ngm9klKfp3rVXajib1lqDQzAkZ2Ws7N74heSP/T608oZILaPfp071vlwPg96l\n4/2Vh9hv6NMJTgObO71OzuzT73zuwJDuxrOCyuXbkHxoYuPlZUww9Ko2e+2v\nQ4cwXme462ZTbP2vfcfUbY0whNSexGHCqDsjbaGRMx/P0rurhfTAECnc381k\nt8XGRNORq9DxebirHZw311tFmmN/OtmRR8kq6LogX5CUgM0qcThjYmCT0qY4\nvPHv\r\n=D7FQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"8a9c0db4fdda75eb1f9d649793f9cb397c9ff788","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.6","@storybook/core-events":"4.1.0-alpha.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.6","@storybook/addon-actions":"4.1.0-alpha.6"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.6_1542859742612_0.07092698231525407","host":"s3://npm-registry-packages"}},"4.1.0-alpha.7":{"name":"@storybook/ui","version":"4.1.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6982d5aabecb1b2869ebdbd414d06fea3cf5b504","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.7.tgz","fileCount":167,"integrity":"sha512-0NDphI0mqgD82Bfg6dzcT6zPCy98L2TXG8rFludnRQO9qO3bqRYIhTE4oGx7AIwWFW5m6b/jmRl+pLPhCcJasg==","signatures":[{"sig":"MEYCIQCE+f8mao1dJiH3bwyhIWcuaE+Z9GAGoLVZYRF50LtUewIhAOA2kxqkBvrB7LwzF1r+PqcjFSJHqf/azXIvbxVtKOID","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9jIzCRA9TVsSAnZWagAAJbgP/2dvxhPCRBp5x3tRYCtZ\nFsRFnpUZojopxdpJhaCcwVMNf1XCkifmkQpiwF5uA9HLHoZxFmbAqCVU7QYb\nEEKqATnyhf6InGaW5nG+j3fKCjs0jeSOdzYgF52ALWsPFHPyO4AzdCaYesHr\n2fXLxCT8G9+Ye+Bu1sDRSc78sqTTwT7hCcWRlerHWbNGEJMh5iD40n9iCGlH\nKN9zjQic5v4O5oVLOdOzDVnIawhlLNc+XDFGT7VSQ3TtiIw/80bzvDxeQ4jS\nQk8iqC6QzOs30S6ez0p6FTxHwJ28GeUOTsLx5DAJYwxE6TrZbqvg4rZlO8vo\nlQllX/8TmOwPIQrIcP0rAPlsksYrnZDUTvejJVlyVpEVJ/5sch8nSqH4RhHg\naquSOSg4iMKEZvHJQmgKxJVFVUd9REs7iRbkUZpoW1d2yYb92thCFF2KrcAl\n53zZelSkWri4Frbr4TuUs7qIAaFWz7H31/HRJms6gdLvghhcNyrjjQmYK3qT\nMDSXj0mvqAMNE4NwcwyCsVLp1oHND7fE34nawTNH3x6Zvcq/da+jmohf53hs\n/Dc9jOK5VNwX6qaDrhRmxLEietjvbDbdO/BWCCNobIls5zZHNNKxjywJ7VDW\ngSo9rLBmoK4fjUU0YWzB/nWxMOmsNjrmf5Dj6KPzePmLfzCmI+tVwLeA4zFt\nzX8S\r\n=/Cd9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"d507e2edaac929bf57aff9e62ea94d4f964ddfce","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.7","@storybook/core-events":"4.1.0-alpha.7","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.7","@storybook/addon-actions":"4.1.0-alpha.7"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.7_1542861362868_0.042730009673844105","host":"s3://npm-registry-packages"}},"4.1.0-alpha.8":{"name":"@storybook/ui","version":"4.1.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b3620b5a9271349e54797023274e1c79488443d9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.8.tgz","fileCount":167,"integrity":"sha512-FKGIiv9GUQHkbpb2JcYKQ98DmJFQy2JeJcmLh6/lerzRnBsIBd9z5LpBr9WV1Dv2ptf6l74xvMyEZbwoXZKFqA==","signatures":[{"sig":"MEUCIBgZtgI1B3d3BHXBmBJ7uVmlu/474eQ/JWonHAjT9n8MAiEAsLhvJSIS6dOf9VUXALollV6NaCqwIFHpRDLsrzUDP/g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":962038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+gLxCRA9TVsSAnZWagAAduUQAIp/0/B7//7+mFPNaSeY\nh6f+llgxRGSUYkKi69VdwjZ+nkFfsRirITd9JU+xG+VaD/QLhqNQ6PpPMUn4\nNvxCZNQbq0HR1aIBbBWKIS0Jf6EQuKMAtAkOCI3Kbu0xki6pUF3jo5teA2aW\nlGWQnyDz+IFLZIyc1Dzm93nc/QyRwSyE5k01jdWoxR01ENMHEmrkiwZ8TmgN\nm1zv/W0yHsa2DhEEQLBDi/ivM8sJjAo0UdMeKjioYk7BXTTQrttBYHXXvVuw\nAMGrbyggKvbiwWly/exOzgUK9GQC2hamqg9OGQ2RwjEt6CAleVMjyrzysT5T\njQN9f7JhhawZQNSuWmrhaPnlOl51H+yYA5qUDizvFIwDqP1PkHUWJyyI9ZOk\nNj54woFJR9o07/Cv/i7pDR9yYgIl3OrXqiz8zi99cjR7pl2f6zGNAhvZaTsQ\no041tVbMuT+YTfNMLFJ4P1lZ3Z99ZKxG50s1LFdYVDyucKv6FeQYJQFv7wRU\ncW86eKjd8yOJO2I92TQJH86mLB3QJY53uU0EYvWLlZixpHuXHuoN7LD7Z3ro\nhvNr3415EnZkcbhXES7YEAnMw+SPYW+ha3NuruzT4Kjrqp9svQUB2NA0XVzs\ngeDdCu31f2HYU2gNiHbBhmiwb1Vw/LJBNe8GOLxAW0zD4+NbG2P/O9lu4MJI\nGZ+N\r\n=qKGw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"0833a4b8a97c8f95f484131b552c14a55194bdbf","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.8","@storybook/core-events":"4.1.0-alpha.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.8","@storybook/addon-actions":"4.1.0-alpha.8"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.8_1543111408919_0.06446532393050419","host":"s3://npm-registry-packages"}},"4.0.9":{"name":"@storybook/ui","version":"4.0.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4bbe8d42a3d9fbdf103e9fbab0f99f84eaf06ad9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.9.tgz","fileCount":167,"integrity":"sha512-kZghSm4v6U8Wfwsa8qk0TeQGBe96QZt2E79PR9uxeTNAEDJWR321CIsRG+FEFXIjNo09B50FgWMM4466CCOeuw==","signatures":[{"sig":"MEQCICRHyHC7nYBbZMPuuLKMUdkaepNF+ehG5sD6f2RAdhonAiBTcZ9rLZ7fsmXrhgWwVMYRAylVJi5szCIEKKYmSYDvDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+sA8CRA9TVsSAnZWagAATUAP/27rqvD3RiwLGJmHkzsQ\nd9CK72bVmQffUtKnq1KlNOe8vLz3pEBGhLx3OmuHAqHLLuJnHCfbFYm2BdSZ\nz6dzqGo3ZC1rOdok1Oq8VY+InY7yPlv9ugxNw5Xyxh3KiSVN/GBwZpVD5dQV\n/2maJkgJKwzCxXpCLvRpTPeRTVOQ5FsxvBtRICkNcEI4G3e3xkNsZM1Y+Oh+\noIMG77g1XuzGlQJgSlemrcHa4GIPXhMKxErRx2zJIUmcPX2FKUcGQ9gEU23w\nMedim/yzHlRS2/E7gmTFVoJd2g0M+fWCsWKCVXH5TrKqSfixD5ZQucNnt/j+\n3jqpbbuVPOJUj6bRAGEHkX4UiN9JP+98cb0TBA7c0FH/HmD29jO98YiR4oEJ\n/T2R8U+7Vy+VHD2ZlvJfqF5GnVrOQV5qOhF7IXIMHWz0ebBpsNsCdhi1dB2r\nOBRSk1y1qt5m0IVPGNt2lNSVqNRknIhOp+Qz0Kz26KButu9cugZXJIaAXpno\nCk3wvbSe7ApY1+cG1xS26NY1lA1g1vKjUaflhCYCoNXF12NZGLFKfBsg8b5e\nQxDIP+eD1D98Yzn0uB7kNQlkLGN8W7bDCPsig2YPHInf3ymGAtNCW8y87Sts\nMUmnMpeDuftezJorZvaD58FJ7uqXjf1geM8gapq8e3ewaaYokvHB9oqYxbzi\nZb9v\r\n=UQOJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"378688ef2aaf78e29b2824853bb29235901f5be6","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.9","@storybook/core-events":"4.0.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.9","@storybook/addon-actions":"4.0.9"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.9_1543159867796_0.944796414009548","host":"s3://npm-registry-packages"}},"4.1.0-alpha.9":{"name":"@storybook/ui","version":"4.1.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"christianalfoni@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"23d5f9cd23710588a600e2e10c1958d59c30b5cd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.9.tgz","fileCount":167,"integrity":"sha512-XcMZ+jKibCPrRFE+8MJ9bATukR39j9OHgOUREYUnmscO+TziSLvZjY5V1HfD3qjqaGX6U7fvu05RjLEh8LV6tA==","signatures":[{"sig":"MEUCICBsZBkQt2Wkj/bKMOMD3IzI3n1uETS549VRTpsMLpFtAiEAilQTQYyGdCG2K+jDO3ekKYvK7Vb8GV6lZjkUt3quQ/w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":962129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/7Z4CRA9TVsSAnZWagAARGQP/0qHVKvj+Yhsgl7ixRNH\nNuFNZ7L6qhW14jgOphZQe+AVYfDqKKrtr5DTaadLRr2pQOWru4XlIWX1EGF7\nRY9x8uvWGdidmJwcSE6HYAoCKYGvPA37RAWZICNhNKMO303DaUMjl2EqH26v\nWmLA2HV2Or8+JjXkcBnhUxql1r6Mi8yzp7bSjX6ARHRfpBp9Db1hc/c4CIm5\nPdzdiD/xihyV1hIvbaMh9hyKPwcqXzqd96trhsKUgenc78HAAhKCjIg3e2nD\nhH/F0pW590odFJgA74Zg/oT8tviz3IktRB//RPwnzY9xw3/cdty0lEVjiO2/\nA3XY0h4fAzPGsrRfW8v9VK9Xnd5izVIGcUNqarIl4HFHOcYDOcVQ9pCoU7HN\n5MF8fDu9aw81q9pwve5T9eJJ8XmOn68TKFBiermoiAkWM0chfq9PNHnSV8b8\npfJ/6/ArgIBDJHViak34v6ORbCLzWKckwzC34qj2D3Euh+yeyYBs+qTcDhUX\nvh1BHDn1bWMFL2VpV6BUOAL8fFhkghXMsbMWii749T/cFhvNJoBDESj6Q7GS\nxRGXu7ws4ut2rYfAGNt2PDwm+v8OotdONDa5PGEXCo/L+rtQ2zJB5CN6AntY\nQcZXcILPBYbcvecNJA2pDpgbOWg2EyC9l9upPY8rObdZdCmf1jCNnWXxMOJR\np9ms\r\n=/Aah\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"6b224a2cc63e72f684610dad84cf898518d2666a","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.9","@storybook/core-events":"4.1.0-alpha.9","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@storybook/react":"4.1.0-alpha.9","@storybook/addon-actions":"4.1.0-alpha.9"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.9_1543485047771_0.00013427581904856822","host":"s3://npm-registry-packages"}},"4.1.0-alpha.10":{"name":"@storybook/ui","version":"4.1.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"35d871e2c752ea3c76d0d95caad917e93cd429b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.10.tgz","fileCount":169,"integrity":"sha512-elshk86PXTt1Sx+dtYH+ZnykBx7tibmRf9tczjYsUW1sSec14uMRa1POAnCkyJTwU3QYyUSLiKjULBA8DSDcrQ==","signatures":[{"sig":"MEUCIQCI7mR1uxOs+z2o4fthn7nrQBglLIDlPVlo09p8aHJLAgIgOIrVkIfwiYxWRXCLiMIv7AYGUq+d9EWPH44k1ItX5YI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":965772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAf9tCRA9TVsSAnZWagAA36sQAJAZmR/RW6KytzUtDXPT\nmee51aSSPgfeOWOHTHR+SpU2e96WKOXct5QX5x4esU5bepinNZtw9moSJhh7\nx1Ycqj4llnlcQiUbYx5vpbdDQRMimSm+KKSnlxdtpn8NJtdIcxxv96056PxE\nyX+a1NluvQzqI1JQa5tlQZxxrIiTYfhbaxgZy83yGmHFnhDN50K6xDwP0jjR\nkDH6+qrNBk7o/tffnMTLDoS25F1VITlb6rwovGiNbJe5vk+7mT8tPoRFhiR1\nc6kxxsiTRNCttKzVYOh4xHy0/5gev3DcP9gEuE7efFKXz5gEsEXqDEXKZfbl\nWPz9AsJru8yvLi3brsOeNBEuqkNco4YrDv4PkNp5tNFnaQ90LEqe1+L57YYO\n9GvoGNLSPEZxn5edPNO2PjXoYavIpL07T2pVGG96iFf1vXU4gzcY5Psx7rsr\nv5N4X9TP0oZHk1I5gCCiRYt5FCF98mzQ3zJLnoIDWIqzRwDHHX7G4Tr+iYeQ\nBY6y+zIq6E20rRLyjgxIHY6PEppCivFtVRfsQghpRat3v5KyZBMlzAEj6Eag\n4f/+DupUBS+HWKTXJqxERn1HWQEu1A7CCB8F9oSdam6pdOCK3qGNvZsoeyDa\n3EHKxNvXRyf8b0gy3YVVG5fEhxksH8ktTtTvFmSq5PtP5FAhCnJdk2jRnIux\nsri2\r\n=mIcm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"3cd3ae347e7bc1edbf70fcc8dfb4959430dc9bed","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.10","@storybook/core-events":"4.1.0-alpha.10","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.10_1543634796948_0.25337862555094137","host":"s3://npm-registry-packages"}},"4.0.10":{"name":"@storybook/ui","version":"4.0.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6d9fe3a1cfc6944ac2013d78c8930881bb2b5c4c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.10.tgz","fileCount":167,"integrity":"sha512-4GkbqXhHXaYMsjOqQpSitxhfqWqsWdP6b+0Zj05a/k3Dy3XMekQfldgACfV4BbURfTBhyqyfP2lqdiNDQNb92w==","signatures":[{"sig":"MEYCIQCa5x3L9sGz1M/QvhEnYeuah0SDvtAW00eB2KZ0e/J4rAIhAJOGVgvAruNHVvNYd8vOCi9d5KI3uTbR+E1oPffFemMy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAxAtCRA9TVsSAnZWagAA8xsP+QD89HJ5qpnTQfNwld6S\n6WLJchFAwZPsi06txitqIMcAuAF482HJbMnICH4ODLeyj4kXReeXbMq+GEqr\n8inDOfsDq21HfqJLKg3JfbMv4tOrmi+eZPD0Ck2ycWwsyzNtAkLlDdj1/0Xp\nWFFLy0vgLRfitpJgiWKaBieMCei7kPslpQKLc/KLt5PD49yhYnLxkzt/fuin\n6SBV3jAtQMhYg8wZucgbk4d+9L1q8BfXO0bobVyvSjTAe88EaG3RwADO7ige\nmbAdhSRaIcYC/YId4K0wDPZAZshibUDG/xW9l+1OYeUt5HciBO0QHRutzQRp\nsIReZLpmlopyyxusB7IqgXd9n7izEwBZaRISOs/9LTcfuCPfMvnCx6N8Q9DF\nVgtXqEIi+AYz/cQvtSXJklriIy9WwQ4ruyBGHROWd8gPb6SCslCUm6d20DZK\nhN6IUrj9wpQGmQ0rc1ObI+FDA11uUuwZnCXM4hxpXYTZWqIqOzE1f8sMUaSX\nxEPGDxduc17zwnX2yO/HrcXSrM0IWypv4UPreHA04YE7O4L0h2GvN7ZZtw8m\n4D+Y0MKRnxWsbHv+Os/kCHS2h/Of6Pu2xg03x/7E/O1YgTgyeARO6IH5PIS9\nVAbOeDoHaOMgbU4Ee4zv+rI3tTuXQ/2fTzm7A4qs4AaosgKJt6aUx8OiJh8H\nUFO5\r\n=srA+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"c6de6497c36e2a3fdc5c5514a1648ee2462a080e","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.10","@storybook/core-events":"4.0.10","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.10","@storybook/addon-actions":"4.0.10"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.10_1543704620550_0.9409502051929801","host":"s3://npm-registry-packages"}},"4.0.11":{"name":"@storybook/ui","version":"4.0.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"20f85b159c9f42106a21c1184eef257eadde7ed4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.11.tgz","fileCount":167,"integrity":"sha512-gvIJB9shQoIe0/WWuXQSWElkC4Ho4DKgxRq2QV72kUIRZKnlAKC6ufOc40MhbNwIkvNWG9slPzbLn1NJTmL0eg==","signatures":[{"sig":"MEUCIDpkPBJEhMVkasiXcVOq2x0fJ+sDyJYK7LCA61Tzk7i1AiEAh3pZ+XRJPBF2PiCt2VpgOQ35XRAWWbh/BW3wp4+nQb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBJmOCRA9TVsSAnZWagAA/+QP/Aj85PSRGE++Ps82ygOU\na4alErkPIl5bCc4LGyoUF1F2fWrurVQijDbu2XWG8uwSeaK4AMUp8tbNDeOB\nlzF5PJMSPlm1ES7Y9X40sG9hLciLXpUwJe6ppv3Ri8uAZgCGqwgdEmXFL3Rh\nn0UMp0MKa6oeaYnrH1YxaDnesFWTwqqWL3K416+u9/825OxNy3f/ms39zbfo\ntrntqAP+UaNkvz9NEZYflKs1v2mxce/Y7a+vkaxFaUxJd0coE4EvJE4rkapY\nzYEUDdIAqnim04oNEcdkedd7kCzI5Yxfdh32VM5dTnSVh3qz3gFrfDmBJS/a\nCsGNCRqGfx5l39Vo0gyBoMIXV4hUwhItKnElK7JclgNAnhet3jUQKUey5M9n\nboXFbcqzijcouCdSOPYgXuuhgu+1xCBx+QXPOkmqULPix6xtsffoCvvbA9y8\niCWqvdb97Jp1E2/xMAd9UcbG1x6TKyCDnKpohvbS2S9NC653BTpWBCOqXwWO\neCDWd7JSzdapRJtu2yT9mN+TCLnEA0RmDJL3DexrRooTIs++iIhDKtvOVYCm\nLmmYPqmKVnqeS23plzeERzkhM+N64AldUJIdisD+BUA/O+xsP1pdDqGy0bza\nk9+zZaUGX3R9QTt13JoHCcmhEemtzfoS9GSZMI6wOEV8q+xFvJLEb8EtrTYa\niuDI\r\n=F23k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"99598473bc98f9516cbf855929b54769607fd7e9","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.11","@storybook/core-events":"4.0.11","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.11","@storybook/addon-actions":"4.0.11"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.11_1543805326215_0.8784686135631028","host":"s3://npm-registry-packages"}},"4.1.0-alpha.11":{"name":"@storybook/ui","version":"4.1.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f5f6423618d274676f4b7cc8ffab80c118c53482","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.11.tgz","fileCount":169,"integrity":"sha512-laS11dCkA0rRTKz3zCDKtU2YxqwVRhaP/V9HgJFQsqCrz0EFLMmvm5CkWJpzo0VAxvTsoFGJToSMEhvRskS4+A==","signatures":[{"sig":"MEUCIEPBO9hMq4DRiSICw5OE4Yfms012BzPv9CCeOkLMmAqZAiEA2qbf33w3vw0dzFOJCCbTXAh1DI7oLiA7nZPfVwWHpPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":974940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCCNrCRA9TVsSAnZWagAA/wUP/0Ed55FnFiSZMK/SXdk0\nVsNS7+upgzxsu85TXdzyCKkuVlRMwOp75Xkx1/EHTGst3uOOcQt5xWU/oTbv\nEx193yJPtyVcqEfiQ+xRknRbmo7G2c9IyGfGNfLI5KhNSvfrQvWrt5xsZM33\nLQL/6jyZW9nHs8sIYPe1XqciJSZP0/i27DuxZtT6LIKWXzfdD5MXVkNUuWWG\nvU4Z3sSgVOhrJ3wctMVMLvriR9rAz2nZsed9VX55JrLz1TWnk95FN+sUNvLk\n2ymBZpjbDYRoZh0IzCC390jU24B+JXLUv9DaBjJdDPat2D7PhCrP3KnEJYb7\nB0ZwoPTuZ/qEtWyxmPr/e/o13Esox75tZsny8KzPkI6ByjQzmqDlahK5aNkl\nhXqgmT5O2O1DyjQ+Dhkb7RI42yBpwOw2rZ13dwBOk0NzCvhdl7U8tQg+3xXG\n2D5gZWAqEZRJy99tGqiuyAZed3h6uhChINleWl1LraMN4q7oouqun19gslkj\nI1u8i1gatLyLGAtE0lHmK5eTmTn76PyPTdPzvBDsI376pv4akJdkS7imgDfs\nwtyfv2pkYK0t+oDfiqz4Qh99nmaswsPCIs1C4YuUYV6C8HDNZORMwPH9IEj9\nQT+6J7RW07XqMUu3XoKiL7eH6tcQxKVfKChNAyKhNNWLL6kLYba7te6kGVYM\nOOTt\r\n=BaE4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"1e9e66bd9d89584aa39470e20e49d176962ef082","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.11","@storybook/core-events":"4.1.0-alpha.11","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.11_1544037226851_0.1823874854646539","host":"s3://npm-registry-packages"}},"4.0.12":{"name":"@storybook/ui","version":"4.0.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.0.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"60519bf1d70bd486a810697c7cb2cd60ca627a51","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.0.12.tgz","fileCount":167,"integrity":"sha512-GRMggs7qGjedeKMrzBmEw+kWgK5NhmE4lxw5wBvak1BjYtitQKfcVcSh7q3nEelU9OlFYsSRX7UHkqV3h5XTbg==","signatures":[{"sig":"MEUCIQCydQ1134vpmQpo8RyYdsv7KmRKGf1p6md12lR+0QnsFAIgDxMoMa7UYgm+qrPciLxSrTse6RRBv9ePxUN7aT5cnFk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCCceCRA9TVsSAnZWagAABQQP/0V310qTAO1cZecoKoEb\nZ2AUCKKb9S1G98dhXLFoAS+j1TQt/KE/wZxWIpJKSp7ZiPqLea9kdwMhsBgT\nSc5zH1MtmtQMpVkHAYYEnSBAJLZrMBqff0jQlaiuC0uU15dr1oXpeZ+askUA\n0ziH6PbJvbRYS5oAJ9G/9WGZNwQ9IKGOiZ9ebjfLpmbftfzTce6c3AtEs4RP\nvwj74htGM/7tW7I6WenZ01hYhuZFD/GAoTZAuyQlJ3CVZScnkcsYKVLgGSPu\nC8tSw4CY9druYBjYrwTvj3QVtiIhB7QkPtvnltBo1d5MmyEOWRlJoUT/CDEc\n+HWhDowXk7fSHvi0LgWjg+Hu/95q6e7gTmdu0iZhD5yh36YtIWQPciwxmzl8\nlhecbHq0V/j2BRnWj0HDCh98IHFXu8V0ApWaMocgfam+6D6Ni2lZWOqZjCcT\nf7GWltrM9ASkP2t6x8S0+8i8+j0Le/tP/gqDmCYXj/gncgAU6O7zmw/zvhTB\nOlLRS0nYUDJwi+zW8hROzK31y2a3wbvD6Ye2Tj3/FW2rPMHD5Fp2aSnbgMWa\n+N8rPeGMtS85+JnahvnOE88JfDOFcfP/KzzYtc8zMaXxTT8OFgV1IS8xS8AW\nZuzq+C+T773LQFfEmeBjygh3VPMrRYbzKvIeMhJuPNq52/FDg13HK8u5bIMA\nNMSP\r\n=BdW1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d22d1d183e34417b55754330129c1c5902d4cbfc","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","events":"^3.0.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.0.12","@storybook/core-events":"4.0.12","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"4.0.12","@storybook/addon-actions":"4.0.12"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.0.12_1544038173840_0.01596969141321236","host":"s3://npm-registry-packages"}},"4.1.0-alpha.12":{"name":"@storybook/ui","version":"4.1.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fb094f20e28d658b7642e636183b89bea14a6f83","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.12.tgz","fileCount":169,"integrity":"sha512-2W3o96euk3Mg2CxykUSxShk8ObrcaFdMdPk4EHFhlL0LmHFObPHTCBpU4LXIfsRtLdmquM7hMD4NOwMmZ1JQYA==","signatures":[{"sig":"MEQCICiR/ENXzQKNIQDDtzPotMEdk50BR431+h/brrzLIFyXAiAf3Rtu99YY9xbAwH5uw9vPvu7JnlZ87mP1Tr1FWq5U4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD/RSCRA9TVsSAnZWagAA/BoP/Azn0AItr8Qboxuu75DD\njzpORMfGJONXSqNFOIapH5FzKiSyyLqVFklyxk2889eQ5NNComWsldH0GXW5\n9LzRQVf5v5J4+pY2WBZAnKpiQT7dQX5ogFIIUDs7h8c0mqloleQogU1yZZAw\n/0Toj6P18tAf3Xm9gcw7w6Ws1cT3C03lN3CQ8nb7fXX7+iktjmgk1zdbCMlH\naIAyACvJ8Pe+8UW7+hSh0D5buc6IZ/90sAXPKJ59QNvRZg87fT0GB0kWiaZI\nsvdFAmZSdt3qBCJQ605j/sVys8r/oVh4M786gPOIhi08XTcm/uaNfRwxda31\nm5QUGvhfq84zLfkidr3qIf7mR3zdXTzJnFXM8CkItLiRYc20ug73WZehTi1J\nZalORPITXXXuwl+nP0rZW7MSGpjdxiWdsjIlmfOJZ7Bkoj64PWtO+AUuGi+N\nWaQcfeNstgO5BqBzO76fvH9aNt39uILoE1RzNh+WTvXnTBSQ4J0fOhGy8TYA\nt19n1JaJyC5L+1YjsBo4Oo0hZJQ++LFTQ8/GAZXjuvthMmts8pFVYwB2O3Oi\nT2J1Uyxn4GWbGWiWxqcsDbiiqNtW9oPoXtv7T5jFSIN46cUfTqFQL7CSBEKa\ntd94VLEc4YDy+Ro5ukMSAfQBQJ6hmMckh4ktGwfumb0ZqKZ/t4cMAG7UAxFl\nnnXx\r\n=H11P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"4ed93b4baf960fb7d614d55dec7981854cc844ac","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.12","@storybook/core-events":"4.1.0-alpha.12","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.12_1544549457866_0.028168090110846977","host":"s3://npm-registry-packages"}},"4.1.0-alpha.13":{"name":"@storybook/ui","version":"4.1.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4dd625ea56a3904333a6c521bd8edaa763383017","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0-alpha.13.tgz","fileCount":169,"integrity":"sha512-7xlY/C/Rqe7U4g1brXzVnHcPM7KKRHN8xp5ntqax/HOHnFx9aOOu4X5geaZrNGlSFys3Sh0IWikuihnbTjPAyQ==","signatures":[{"sig":"MEYCIQCPXm4Ji9PlLdh6Rxj8dTOT+CQvUrR+ioRaw2mOdD9E7AIhAMFY6gKsg0k+ZZ8/OsU+Qey9l7dHFyFvt9JUXhDnUUiW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEUmFCRA9TVsSAnZWagAAHQMP/339JPfInF9hYbaC7JcS\nj/Xenir8f5Yb4cyvHRm/g0WW1YNWTSZw9xAJ5ZQhlLo6fy9tXSX462c0BrzH\neVjErAFFI+YfZkMb79zccP1sGxS6PuJyC7lWDoOOiG4a7pP5hM0iUOc/gGh/\nAxNO9aFJoYxTZSgT19KLlhKyZ9sCRB9Fc0FP7ceUShlz42q4szBXmQvXhYmd\nUVodgkjE83urMUArSzX2SPhy5klEyT96HTRAVHn2a+nozj+KgqePBWam+neR\npqEl8NKr9wGRUFeuNB3Hs8wZQUaFUY04634ecN5vJ6rjmRzv3Y7YIT7ozo26\nAmQFTeqpcGcXj181R6zMet0aP3CG4nxvO+SC7peap1vwJM4WxW67hHz5D7eJ\nOZIiW55je45410HWOg36pynmksDwY4v7AJWmcLnsHzZt6nKjsm+6T8Nkdrtn\nRUdYR0ivnNFNwOYQCJ6qeZGzABufJZ7pxqzuxGHzlwegcoq7hS3BGojKO/3O\nImwCugz3ArU5RPzJb14OJJnL5j3F854xJiz2kgKvkzW+S1eG6aYp6qJpWgIX\ncRxkDyWu3TWa4CeR9AN12RP6yaHqSJPIc4yW4WD45M5G/SZVNp2RQUc7+PF7\n3iupcs70o/LHqgRm+n9mK0uJHzCPwzBCXac2JS/6QFM+w0d+qvFK1tHjupQz\nuEqO\r\n=ISF3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"de9516f278798d017ba37ec46c28a443343941f5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0-alpha.13","@storybook/core-events":"4.1.0-alpha.13","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0-alpha.13_1544636804816_0.9341336494981369","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@storybook/ui","version":"4.1.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e3f60b586239d6cbb1fd282734b3a25301d43593","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.0.tgz","fileCount":169,"integrity":"sha512-g9rQP7eAHm5pIbpAcmV5n2iRg7s0odtTK68kME7NE0Os7r84Y2lN87ei/SWr6NUy/hL2QEBjB7Asmt1ywmHthg==","signatures":[{"sig":"MEQCIEtAov0dNuIfZc1+A7g1ZpDsKpYfwVxqydvN9wsg9CMYAiBp4F6r7BrKSbicCc2FCX6dZaZq5ipR5TmzMGM/j0epaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEVsvCRA9TVsSAnZWagAACwsP/RgvOV5T/oaodvB9Wkh2\nwdwBxzee0t0OEOWd1xz1fRfo3FNSiQxySe8YAuzVnam4/g+BN9uSE229uE8B\nfxFn5iaZLk8b41rEKy83kXy7wkw1wg4I0I2A1yyRagILgPzLPrbs6we4P52n\nsT+70XvbFK1t4LfP913w/VSDqicw27LAQIH5zgyV2z/b3RyaRsvsKpA55QQP\n9nfa4lDnE7xcoUhB5JwRss1lDih0azuJGFlLQa/H4jMbLA1pWJ/zGSoY+4J6\nUpxMAoquuqeNagD0ZqLvBxggtxqvwkHR6r+KiBZl4ikN3L9+T6NTRVQ6HZO1\nA53PqGHpcJ6mBLivDRHUvkFGTDy//M7KP4oYOIbjp46IEXmhETL7YQl6EQo9\nAKfuNTej6IhV8WUbJZoP9Bq8H1H+5l0heLNAGpCwsaGOVFtX84uzeKAXv2DS\nA5W2GL1dmarmDBaioI2RQCP7X0e1421o8QWEuKW0aPUG83RY1G2zMt0ir7sV\nvRFse7OUabKymWPOdvcWm0joQkcqdQKyCQf4SdGpxMMqJkHhOTSHTP5BYmGg\ntaVfLKTXQ55gk4L4M89kwK1oOObqEeyu8w7jJfZT0tuBKsHpni/RRYZHd7Bk\nwY7AQUOhSt3HYzKL+wOFHvzL7T7En67m38eZXxzKNIQ46O1cvROlL5Ywjzd+\nfWrW\r\n=CmJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"75d45d3d10a182cac209723cba2669512bb436d2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.0","@storybook/core-events":"4.1.0","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.0_1544641327038_0.7301815715737738","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"@storybook/ui","version":"4.1.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f45788b86ef448e2134b26038b83eabf3d0f8d67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.1.tgz","fileCount":169,"integrity":"sha512-qcYhTm2VHOg3jkR1hTo0j7cfx8Ks7YvdhJ73aszVEUwDJKG7tZWHs1ymn0waOk+NBzFltoo9kloSTpULRql+0g==","signatures":[{"sig":"MEUCIGFkP4cWYxlf9sgUhQ0ZJGxlKUdF5e4nxldovCpfXNtGAiEAvZc+WAKZTExi2GDtIRIfI3Hu2y14nd7RW5i4HlHWOqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEbR6CRA9TVsSAnZWagAA5OgP/0YnPQ2WA0gxEmTFVsGw\notqjkTUH06/u0Fr29HMvcZI1lQ1AwCJdpO1poi7TjN5t+fNFvvVrkP+u9480\nA4pRPKYMap+gd7aVBdc3wZuzRrlwcVgC9SDNZMtq7hc3N+H88X4ZbIMIB6mG\n43gnrfz0an6/hMrRuIKTYK69wESQoZtdWLeB5s412pNK7b3HQqyXQaS8IKE8\no9kfd4n5OiWhwNsKkwZP1SOmrCsaiBJFN4DGZxUHlpV40FPZdQj6PS51t1W0\nmEjxUPfDNbIodGrQmvtfZzrR5DzywFmsIlLK1axjQDK6dSmnnli3e9v+0xTV\nXSvaIUUTMFfkxMhYzPj3Q07EQAB1bDBgdZaeT5e5idvIGZcnztCAr0dutUZh\n9oj4ruHec9XPM2Ssv0OH062up5bwP+JV9qKUnVJtFkAdBE1apr/CSo2Jo5F/\nIJjXer85HaLGtOdi4Lv3yS08bqX0IBrn2/fb/9fH6ITy1apAUg4+2Zjd4Vk+\nL+aQjD3AYwwUM/mdgVkg78nVkKx10fU48EcR+Cl9TRkg2BrnFjZJ2iwKoGQV\ndyRgNyxgiBR7MYeYrUGZp5c6kfVa73r89QS9sYU+dp8m/tEYanSb1PEWciIC\nmb0gSQ0XvBZVBnOjOahyMCQVnWlvPhlkOT75EdKrFMfvmN8pFeoOhvhx2Ioh\ngnZk\r\n=y56n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"03eaf5fe1b473f760cb393fececd20461074c54c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.1","@storybook/core-events":"4.1.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.1_1544664185159_0.339044381051544","host":"s3://npm-registry-packages"}},"4.2.0-alpha.1":{"name":"@storybook/ui","version":"4.2.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"04b8260343192a7085b2bb59d5b635e65dd0eabb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.1.tgz","fileCount":169,"integrity":"sha512-ZYqyz5F/OQWFDFLdbkwbVI3JfksBueymhu2WT30dZfkwFcdG8mq+BBq80D6zbPsjGagQNklfv2FJD9EqAwNNGA==","signatures":[{"sig":"MEQCIGr2bLs9ZzngIKQezMfHv3AhcCEA1EtbvJ1iiVd433m2AiA1tRq3CwExSvfegTeSRTmPNSnLco9DG+Q+jvqiI+gFpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEb14CRA9TVsSAnZWagAANB0P/06OHAIQgZtotKKl+OP4\n/zOHgBZp/FSsJyWOt9fbdqG1QMPlkXZDT2oiyFyG3SEoe691sgb2MRieHAYL\n3zi30edjVh68TPwP0/K3BvPf9iFBPv4FwGKKEK/jUaDknUkM57wtuLOpTKvJ\nyroE4Hh/WTQdkszoOvPuF9j9gQeKpmGP1pKU92toPk9wRO6u8wvOI/YHwhKf\nJgI18nNggT3LR9XLeeOa7jGufWrw8jHdkEvK7oGssO32C/bdE7T26e4PFKXV\n5ErIvVluE5FA4NZjBlSGZtvrmzSRR1QBivy/mVlemXsrQLEDS3atu5tIBTni\n3lmIdR5Iii6ap4gIeDgks1fKgbuTQ0Au3xQ7t8MFvb3t3AgvkPbZf0Z0Tfl2\nMjOl4/Bt9Tbr4MKQjFKt5jVh6o9jNELEs6YQLujJ9X3kjepFGm6NPJwzqksL\nV7nyUvnzK7gBeXA2b75voL3LDxeFvbGRZhWDh61gk24ASyjyddm39tICVU5G\nbkW3ISCleVl08NrO5SYo5OfdwbpxW9lJcZcd4dV0Sz6/pK1pkXWfZH4GNihL\nEDlqlsCqCth6KhKsuRBBGnA3a424AB72UEHEvBRBnnnxRGeLdFrtvWM9hPS2\ndCOKOYHxi0mn64s7Ca8U+6avhXhNdRZA+B0nx6lNZqwFhs5nN682uF0on6rL\nMlB6\r\n=5US+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"9d23c3dc1a9647e8a465e4032322f95c0f13a870","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.1","@storybook/core-events":"4.2.0-alpha.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.1_1544666488147_0.1138721156108411","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"@storybook/ui","version":"4.1.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f48042eef72ae4a21fe62463fa2e5d0b71b5fd1f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.2.tgz","fileCount":169,"integrity":"sha512-e/sZ05tj2SohNT+l60eaxWb9wAHV/kthckTNrsdjFoaWSqB9Vt6Ljk4phMtSCr+w1oxl2EGyETjQG9pPOTvzxg==","signatures":[{"sig":"MEUCIEOrOT7LMM/8kJw367oZ1csbqCAETYw1J/MxlQP/FyaJAiEA5m145/aqMuVObKUPI25vvTOxhf2Co1547MbsPKdO1HI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFm2uCRA9TVsSAnZWagAAFQEP/iCwyPir7LuD4ZeTkEAq\nD2TNWBibu07TvcH2pRjdsOXduAXIV3/llMMm4eugFISxtBGib+1yYRfCLBCx\ngZk7KSw4JOSuXpe1PQyVaZ83yrVG/9NC9enjTaNy/KmOI5b6FqePYJ6ZIjL6\n2tnCQwXVRP0CBvveh66RgAK6b4jCD0V7Xyn11ydNkTOeDHd/AR0xtxZ+TtSc\nRx1O8fy4oloNnpyml3rcGMMxdoe5f5vgi0Rd5RpzWFyDS9H22Q1ZNLsCLDlh\nA1fyRwYkJNR/lEX5ZcARK83JJkzdLTsK/lP7Qdt4Yu14GQDjI1IdVVPnWN3Z\nX/w5heALiEXpjkUgWhY6Vnh79Qned18H2E+pZExUe6EuNWEyB5r3B0dW9CFx\nDwOhTQChToo97JXg59R4fGv2xMEmg9Vd6zCFd0CPrFzapNuPVzWJwz8B9aoK\ncmOjHD4TSCBFz7uRn3J3W2tGEAaI1a7hvDr6SknxlPr1k3hQvE/ntYpy/vVF\nJF41okW55k3s86KA4UBEeqtBQmIeUQEQgDzSozZ7fpAhT9/UZBgRNW2MlcVS\nBh5HVH7FT4IPEDWK9jIhXTKUwGWUDMqh7lv68WBOftZnjrfAQfQ7nc4wCdib\nQCkQfzv3rB3SD+ayftv7DGV4wAs2VagfCBaZ4ivbS/KtGCiCDtVcuaDAVFue\nKpQ5\r\n=ZBpf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"c4a0f5de2bb8f8d4bc4ca3f4ceec0403307aa101","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.2","@storybook/core-events":"4.1.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.2_1544973741321_0.9412475441768946","host":"s3://npm-registry-packages"}},"4.2.0-alpha.2":{"name":"@storybook/ui","version":"4.2.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"96043dc06c77afc73530fa1c3228902e6931e447","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.2.tgz","fileCount":169,"integrity":"sha512-m1KwF84Q48W38qVzzw17yV1dtI1mhEOhdhjkdK55PqgUqnEetH/3G9N6AWdrW1Yeb5BJhMQ9bYFZbzPH+MUFSw==","signatures":[{"sig":"MEQCID0fAR5opS8wpI0CgFxhzm/fmLdnaBIrqvrtIzPGiyNAAiA60VxOWCBMZIfAbngQq44PwSUmdZg+PhPvFbsiBkHLbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFn+ZCRA9TVsSAnZWagAALYsP/0U+uqCLFFsO7MdsdkKx\nqMyCKKxwHIeYd3/Po0ayMf1MW7eHGkbXtSiuSARQlP6OD3DYMe9yNCV2yxN9\npRjGXA+gY8c7LZyJMYiVX8rKDzPxeaInTMQTUUOV2y8nDa4mzEmMyYowlP4V\nMa6Bzz4ccJcmUxz3HYzdFPbAg142EVyz9CT4okoUxrrjGNBjrvu390sv/wUJ\ncda2G9QaH6yk/w3OY5j79eNGQDX833iDQPNadW/GH5M2+fplTKPdC9031zF9\nmY4cKJIsyHN9C1WDjq37C07XUssJxMz4Aj8ZbXShhYgCLrP7GvpAcP1Jp/5W\nHUgL5PYTck79Y/r6Gsz1Z7M5NusNTlAmCXHFDaXtIbTJCHiC9Zc9PvFTWtN6\nWRh77BL6PVUk+nALbduHqkDbwTAM7lEBrO2xiP+Os96nMhXTSqUN3qCb/joJ\nwlwaMJDdASFS561aO6YgHJRhVM+/JMXmHoUcXDsKety5fFk7yYm/VROIw837\nwMTgSC1h/Q7XuPaal8wqCRgeC3ySTLb8CMVuOX6u6xZJNzLkCfd3aE0zSfev\n+47Bl9bf6eQ4AVfStv/MXBBfvD/z9Zlv5uk7k5lGoT5cug42xuL6YISOoF6G\nDz4H5IQOQWWY0PlPC16WBp8sAA86/+ehMVr27q7sU5WN9m24n3TvB5LKE6Y6\ns7Ex\r\n=wjir\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"abf2c4e1250d5d4c55b992d85f991e40327a33a4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.2","@storybook/core-events":"4.2.0-alpha.2","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.2_1544978329217_0.44480494326825304","host":"s3://npm-registry-packages"}},"4.2.0-alpha.3":{"name":"@storybook/ui","version":"4.2.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ecf65f4f8a709ce065c9e4e2d00b8fc1415ad4b3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.3.tgz","fileCount":169,"integrity":"sha512-YZovifHWFe8Ce4GvH/mXt6HIjSEqesLNnIk5+NXNeYoMMIAI7+/P+gQ0+EHg2AlOn84jjuTCOYgVc4qo8gSrGg==","signatures":[{"sig":"MEYCIQDxUqVU/DjWBNdkGql3fHyPY6bBT24pGu9lBfenrdhF2QIhAOL+Xmd6gbTHiYvMmEWWc9R67uyrdCXXwqjDjBkEYjQZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGQytCRA9TVsSAnZWagAAO6cP/ieTSnsrCb6+NlM3JLe0\nlDLulw2DVnF6PU9IEMwlRMujom+8WfafzjqyiQZMhYsG58UGGu4OuDtwarBc\nL2v7XSFaFxMhzmXeXGBobw8OjKdokkLALtWphCXu8is45UiFCoFfB1Rtrgz4\noUpta8EiIQe/2ZsxBamlhko86rU4PZLudbOLXa2UFSV3TrHlTzeIW+arIMDg\n8I3cw07Y0wgbJjkRRYhYn8i7xHMjCUAoFI1VrRPAfZ4UNp8Vy7WGN1/UY1hm\nB6KteZzFgFR2KCt8FrlqjLOwWJK/alQwsjZMBsblMIxSGS1BBrK+McP9WvVp\np/zAT5hQW8h01J4lyk8TEgC4k+SzLIUNgExIm+sS7kMZc1T++DEgX3g/KEyu\nng/KTHJKrwsD7k5Bgdz+oge1bJuT8Z4/w4wDx1KRElzsQjUNi5VEk9Y5O2ij\ntA/ja7oHIbZd8dl27RW9hl+CmpAaQlKAH6B2gNLyFJb3wzfd0qQSjA+DPppJ\nh20gSF4yATHh+TQAfH5xE5sDG+kU1Ih3POesubM8qDtezkQzTOxsG095UWzq\nDrqVWE+HJ0szIyXJtAkXlfcTPIUM5GR0YEQewEM4lFv8FiZ5gUFQvbYYDmAq\njlOk6UCYSAHp6tKROhRS6oV4x6zq0J+ULTYitODbhWsRgR34bAM2EHNhPnXM\n3fyu\r\n=rjMD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"15d34d0f3ee9fb191434bb5447824beac4f360ee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.3","@storybook/core-events":"4.2.0-alpha.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.3_1545145517249_0.2247289092329443","host":"s3://npm-registry-packages"}},"4.2.0-alpha.4":{"name":"@storybook/ui","version":"4.2.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e6b49079c66a6633deb6d11b7c22ae3a5a558e90","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.4.tgz","fileCount":169,"integrity":"sha512-4FiPuf6K/3edTZM6vhh63ab5gzfUq+Loa0VGBoNyyglr0k5OWzpOPJ2yKvT7PYIenNCaZJatiMllzrQMo5Ojpg==","signatures":[{"sig":"MEUCIDjOFRyDAdT/nKLlig/TN7ocK6sAAVW5EtImamB2o0uwAiEAk8x+P+qICyazGOGLPRxdMSaRsV+xeNq67JlQGSiQjIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGfIQCRA9TVsSAnZWagAA+14P/22Nc4Hr56XZjQ8wXc+D\nNc61aLNxCzn4VD7xOXNyMUZCQiKk13GAngIPMB9A9TTivguwtS/x6V8AjZkI\nNwnRbqcTHdTOX4GfB457/wD1Xu6OrRtYUbM2q/pr7i9BQQwjseNSXtBCQOjg\nYpWjrs4XCjVrRZy3xeCagUTh5AJaAxXAl8fwOdRU9zHYwNmouRt9xFkPQOFT\nq+EgXMtSdZphkCvGgCX8xuqa05JgSanLwP/zC8gQ2fnY62J/I1cJbp3DxPEG\nJ8Kcr3LnDkWttfgeffrrTdcsVNn6TJ3qVEkss4UlQX6uSFArj2RZyrJTwe4M\n/btkEX8CYzcKjOUfOtxuRv6eE+2JxyEaXBXq+nQiXX4xxk8zwL4emRs90L8T\nHiwreoiHHTQQv61u1NqijyjTSagNhvrOQlMQZtB05AmUgtUMPDP8lnRn1kp+\ncHiKDUmYgDr5gSsaYsNRc6qvvJRMIR2rmJU16wVEiMia+0bG2VXiy0sVh5Ah\nud59fD7VIT4MlrFbZ/4qPbtLZKiukugEPkzWdyb3XCPkma+Ub67kq0ODX0mK\nq2ecdAAqlt6nmpr3aCyZTFq5VOHe4JTGqDsq/Zo5QzamzhHjrJ5ePOSV9C6N\nV0fSTdyWxgk8cabp21vMcqJkFBAIAnHODFGAgQttmk7z5W4vfwCH9F2rU/+p\ngJRI\r\n=QFRp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"a5b4e89e4cb2e2029d0ac881aca6b19a454b1821","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.4","@storybook/core-events":"4.2.0-alpha.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.4_1545204240151_0.6487692903971582","host":"s3://npm-registry-packages"}},"4.2.0-alpha.5":{"name":"@storybook/ui","version":"4.2.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"aa731c177e9efa4e0880c1ca256570de16f398a5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.5.tgz","fileCount":170,"integrity":"sha512-7tDIwnEYnKMprXTc5uLdetDbWbqWHXYfCaakdRDJanXkNOdYnty85b6ugoR5cD/c+pjoSnwMUegP4JdzjykhdA==","signatures":[{"sig":"MEUCIBbgc8FPKpKBbeG5vGsgz5YCW8DsTfmEDcH9Uc1hvPEwAiEAvPsyCVBhre8YcLkBwj7qKMfmyhKapbTKxdB4RJHqUxg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGmypCRA9TVsSAnZWagAAHMUP/jABnPWu3nTSmbHH6Apy\nsvjoo42y7zFAC9IXn8vRbCm8U/nyVrGJ/JHI8N3GcUPV3eHdar/iyJDhb8M4\ntvb/1JGIX9UGPJ0B3uLXBQ6LXF/sbGyZMXwnqLqGBH7PpEjUVdmOjRPCwTEF\nUpBAp/QJ/t+oJ/E9M2cp0JzA7sifYxvboRTegtg/MXP4am4pU/z9/C1LpfcB\nZ+PPEyMK3lCkP+XRoHDAYgr9gqqfPPQb3zQO3dGc4ap6RJhq13cMb0KHH8EP\nj2Sa5xOK/0vZ3OtFVojd5wWq/KV3YXxX2FZIZHOlVMcp8MstXE8N/AUzI9I/\n1N6o+JQQbj/vwNjP21KO6eT9+18zG3JV4Gltumn9Vn7xE4KpEBBA2QNoChLo\nwKHhJVFEEtvUqt/pCoJGbXIlMpTzVkgWGzBB29lslKVhzzH9ZK1IqRf/znav\nbIinsbImgtD3aPAXbz4pIyg9xr43KkwL3ZYlTGgtaAFCi2bj0fsan2TZ1BVi\nhaKlANf3CmNvY/W7Xd6Q4fpPWn+K2yiXenETzSAGKJNVTM7HZ8qjYCpwglc3\nCjsgXUY0kbFswNhp44aaXPZ6ke/b0Y4GLkky3diHBxthyGe1eugMISAmccqW\nvCcFiGUG1bn6QLW+FfUxXekN8cOv/8zGScctXlO4pExY9xEKU9QWrAHoFMkq\nzq1h\r\n=C+sp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"fd600487eb3d295b22c3b32ba659f9b3ce7ef3e8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.5","@storybook/core-events":"4.2.0-alpha.5","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.5_1545235624537_0.7683264526702225","host":"s3://npm-registry-packages"}},"4.2.0-cra-debug.0":{"name":"@storybook/ui","version":"4.2.0-cra-debug.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-cra-debug.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6a146bf7d4b253d35fbc6810d81d83a2cbc9c64a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-cra-debug.0.tgz","fileCount":170,"integrity":"sha512-OU5K8QCtP5LfDQq1T/7C6o1O6ycGMfIeKcm/JU+5MnQnc97zRmjePsT4AqeqKau52mVyBv+FkNsuKvA9Klsvvw==","signatures":[{"sig":"MEUCICIweBwk0X7oqErjbekVCstB6O75F5wuyb/eZCMUMQXsAiEA84792LvU2H9wSDTEUJG6K3Zq4uHU/05QEkveW6pbI2Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGvTwCRA9TVsSAnZWagAAceIP/1LCK6ijvwprJgeoHKCJ\nvTCowNXvK+tPvZUASvV6fvkX0EPewY4HGAGJchfBmAYKeO1OGvKvTk2SrP3t\nTMF7maE77MoSZvYGhNnpXe7FgGZU9l5jQKkcBHE7w0EXlkfbZpXoDTfSXCFq\nxM5J/9/J2kgNcrZf1iL5v0Mpzfgn2zJuAPFuOuNQZ3WRocf0i1HA0jGPWc4p\ngQAJlFSoQQwDBVnVQTB9t2fSoT1hKaP8IWBhXyAMDDXMuT2ZK9nfyiYf39tM\nZN2Y1ErRmsKINOKmfoD/6EPWfcKWQRQLeooHD0aCoeCHctnJsU88yPs1EK3h\nN/D3maqIjT0yalrzgk5cScaNLU73Q3lnMAWW60Cgu3Zx9Hql1+lm1659EC0q\n/ltXaveG7Ube8J/hId5+OARmV3+LLT/pQPqYbhSDvRq3keHo1lV0JU2WMx19\nJJoNGlYLAABu83zq1djFeCYF0xpVjpe825kprxTNdRQ+4+zQNgBpOebBhkzt\noxQ5hDH28Ve2cJZvsv/H6kOl8/zrOiObZSXdXrOiYRPSoIJZPCuUlbNIHwkp\nR5K77+gW9SREIz3Hfr4SjHUn8HE4nLUsiaPKJMq9SCsrjTaUFNcm4PmGZgkQ\nCKxQG+zKwhN9V7fKJ0twddrpDWgz6Bx4tE2+2eAgrmp8ztTJlba0RPuryhyC\nTvZC\r\n=pfj7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"0c1bce162c2cd7f3adf56e7c0ecb9df7603064e4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-cra-debug.0","@storybook/core-events":"4.2.0-cra-debug.0","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-cra-debug.0_1545270511532_0.4468639547146078","host":"s3://npm-registry-packages"}},"4.1.3":{"name":"@storybook/ui","version":"4.1.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"7ed0e44d3eebe8aab1a8b2fd47c235d9072b8225","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.3.tgz","fileCount":170,"integrity":"sha512-0tjir7iMhjVjMSyYPZ2f/EAEBE62rkmVp/aWGzkMDuRvrxFUQ7Z73C8fRdpYoNcvqlXFf3oh88q7zHd7SKNCdA==","signatures":[{"sig":"MEUCIQCSL0doy5tGO1kr06i1P3i6SsTKf/ubASMW7EJ8qsV18AIgD4UdH9NcKzKMP4HHQRxHfrxPMchnHwACT8DH74nO4gM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcG1D1CRA9TVsSAnZWagAAbP0P/RvtM3qAus6Riu1jJjxJ\n2wcEsuTYffPXxHtWvCZV3lcbVUSI2XBVjd5GShUOlhxaoK0Hj3r0gR/UNSgj\nlp6a+5s7fjf8mSGeG3DYn67V5UT7d1neHWEJNK29VL2MPFSMXWQ4nStl1IfW\nwrCs7EI3FfUtgoX0raccoytY+zhJy2IzBRMF7xo6MPtKNFOwU05G2m5SHLG2\n9+BpyCctmNJNETr7+51voTTvVrNHMPVByMhQHMK00uIgPyZ2ivR30O7SVLqq\nMn06NjbxQK/kMttAw4WQ8pIIRKhksZaDTOE0tT4HEQiaVweGCUy0kWiFTwr6\nqJR9sQ9BfYTgCd8z86aH1qebex9Wa3t9+6pYrpMCTB7lEjWaGljE++kGQRC9\nc/P1iEOJJTvwvUGL/E2rZLm9Nex8lqofG6/bmRXQtFq8uXzvNvOlOdstIe9f\nk4QR+fmNwrib7+bHOGHdLjIrMNb7rFTZJJe4hsDVDwA7eOdNSqx87jHcKmSv\ndy7oCy8NijeTLsHeo7lTQvX60NDzMSsdzoOQLjzFSVivpsTs89to3sqdtbp+\nrgRQrPx4DAoERusdE9ko1MezPxfvWQg6Fmv042hjZ4hZL35YDXpaI55ILbGO\nMqjzZDX9nsy+ghaMvYZBkp4kVESF08qiHn7QS6llnEzdvm8I5W1sQAab43p+\nPJGm\r\n=bpYb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"28497a9bbe829f0cecfdabf8d18ae92e33d31db6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.3","@storybook/core-events":"4.1.3","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.3_1545294069240_0.9981598948866657","host":"s3://npm-registry-packages"}},"4.2.0-alpha.6":{"name":"@storybook/ui","version":"4.2.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"141f1c35b5a0c15f4d28db7414baf003def0476f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.6.tgz","fileCount":170,"integrity":"sha512-nARz1WabXK54QsUcP4mSCqPvHaur+bboZeSCJZO/iCb8MXOtyifzLSLbArspEE5AfxLWl7bfnOiPQckL9pQRGw==","signatures":[{"sig":"MEUCIHF7UOw3Bh97sjWBKWIP0wa0pvZztfJmvtE7vpSJppCIAiEAvILQ2UjPyf/nBlPX9pydOscc7QkjUQhOzVnCwXaNd0c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHBZlCRA9TVsSAnZWagAAoOUP/RReTkipjCFFQ9Frq/jW\nXpOT1d7GO35y1cl9CKAKLVarBDKX8Bgkv4lvutB/BA2LiQ7rwvnxIZh5MLEk\ncxvHk7CmtsjeezV2lt+64EAXoERi7RgDzMyWi3m+BQy5RXT6aQ/twB4KUgEn\nPgxwVyTI/w5dXGI71Kqk3KS0pk5SCmPFPipoqCWwcpDpsn0Ds4TEgrtcoOi7\n1IOB34s43HeBUurklYg68kZqwm2VO9MM0Mjx7SzO35DMQWSd1LwLAj/8gfaw\nrepyvt7hSlAbicNZmqW7XozTFbBrdBeS2c/QTlhiqTUHUyMxZDufpcPhQBlQ\nJQjiaO1v/53V2kouYbFRe4LFImQvTDHTiBp1nMlO1oniih3rQM9ypNCDbH/y\nuy08gbae5ont+14APGzgnYHbDeUIaCH60od9PzgbrvJYrXzE83H6AhC7UBob\nGv/AoI0IyzzKymQ1bUDFbSVT5buC0wJveiJzpgGp1mrZHMJS6HOpmWwfN0EA\nUccTk9Ec0ogD6g9spTti1sZSX3OQ30ASsU81idWTv6beCHwjxoHbIevoWoVJ\nqv325Dcv3dUSr4XycmR76WZQPXde/cMeJbwDFsZs8q/GCYhMnNQcfruWwFja\nolpv1U/6EYMTWWFJzxMToYrGx3d8gXIDZSvMMuj8xzXbE+IG66pWYABE7HlI\nr14b\r\n=yyYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"bb9b7b3d5b996ed037001f57ca60bd26ac5c1326","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.6","@storybook/core-events":"4.2.0-alpha.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.6_1545344613120_0.3347208218623421","host":"s3://npm-registry-packages"}},"4.2.0-alpha.7":{"name":"@storybook/ui","version":"4.2.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e42f4f86302af01771a70ed16cca815252c9433b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.7.tgz","fileCount":170,"integrity":"sha512-dds7yvR8ygIoEldMoLtoL0XRky4vRy2l2wXVcawTsd0YFS2cSDsXrdcie1n5/09qeZ6TEwkjBvcQkV0rOiXL6Q==","signatures":[{"sig":"MEUCIQDG8vmIDCwLU8K7cHJOS1tR0DG1X+zveAzUY+IhiQiLZAIgCAguhTcQ7m/UH2jaWO1IJ2I0Xrq2hIdnFoDe8oK1Vkc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcIpQSCRA9TVsSAnZWagAAHCYP/1/0UR8/kcI736L1WyOX\nt9Wxf1ApA2T9wmmnpXVj5hS0c4do01tE01Is0DzgpVeT1RquOOuS72mbnE+1\nO2jBurXp1svXBVtIIx3lB9DXwQnbJ8k3h7m1QXz4EBmeUYojCed9DAhZsSD6\n88IdTkfc0gdUwep5nD9Nc2/QIeV4FwicXJYTfJrAGTak4aHzDg635UHsTjIL\nf7UgaDOSAMVcbiLZxnFXRDaKcSa2V3Fih5FmTxKQCJqI4Kq4aKtSxgE91LNO\nL45966FZB7ZnwVjjJwfonXB8fvXwOtTMJ7c7ATVzjbXBmYNn29mSH+5KiWAp\nnDYHtb4fVrpkpCXgMe8Y5lYBKzTmkK+W4Iason90d1rgIxFBJ4/it+AekTNG\n4rRahmGvlMfjeDVbF6Ol1TDaGdN/8eN52BSv3tBVeBZ2n85ZKZUGcgJ5o/hD\nAwotkIbRKScMlA0N90SYgqfSBYKrz8qdaLXSfB1Ak4bfpYh40WvTnd+XmdAb\noJCHPTWI4zsT+XMCBFlEcQ+X5gajtfVK4z8c47aQiUG6xcHswz2yF/uwrXUC\nOU2AnBrWmN4ikSuumJaX7UrWMzbcTU0uA16RtxJK5fyJIhogFedWAu0lIVoX\nM2U7J8qrLfmz21YdcysL0HmYYmwMAztGFIKuSfk1lkIPdIYF6dOB7gPUoTVp\n16E8\r\n=iBMh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"beba7b395779bdac206d53864ef01a187ddaef97","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.7","@storybook/core-events":"4.2.0-alpha.7","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.7_1545770001559_0.09627286616774078","host":"s3://npm-registry-packages"}},"4.1.4":{"name":"@storybook/ui","version":"4.1.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"519118ad41430115359b245384854cb3388ed53f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.4.tgz","fileCount":170,"integrity":"sha512-qP7aDHxHBShU8MACnDsfR7LaOYvGcpRKF99yO3eygmHGJNyt7DHvxa5MnUOnsB30nRhcPuEPEWbVsamLQOUg3Q==","signatures":[{"sig":"MEUCIQCyHjPrDRvRGx9WzpwKy9TO5ORKQLrcbIl1GhubAYgMwQIge2HvY0uThC9bp216g88grK4aBijNADG7mzDhyjJx8/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcIpz6CRA9TVsSAnZWagAA8zgP/1tMy7KYJpgrzpfb9yXF\nOJCTt0u3kH9wf4TuFom4kuo1OrH51iG/ffcBRFtY/4+pNyrFG8QxrLVzg4bv\nQOlPVeLHY/3aBqf+Y3/+6WHLZn2Wy8PF0LM22i+kHMRPYoNwUN27OD70XFrp\nBgXWF6rWcXybLxzS+TH3MvhK1hYm4AEPdnKEKVjkzsAKZowcAaaXTgyuNzm4\nylVEB+bhNvUKB36T3da/qZ3mZPxDoC5YZ4vZFIJAMwZHHr4diPEL5mE2dM1W\nyBkK9BSodhwd4brxEhGQCspp4JDwqnWAqmsa3NcU0FMOaANdqrEEomjiZ9A8\naPeUpdxSRmtwokktPEoTvwAdDSA7EXvwN7Cewyqzsd40GSnfarbnNV9x6a7c\nxp8dB0gexsMx4Gy/HwdJxKiy3w8yzHFUPpoLhoHQsTFl//lS9A3Jd8xMrEL9\n6fPLNhCy8+ejXa/Z3Pbwi3Uc3LdIlLrofjWWghTnG/NOgg/zxN5yvBvHaKqP\nBDlJ14SEI0bD7IjOBov0hNVYgck3myYywu96vuRmG1F6uJJFI924CPs9Pj9D\nlf4uXsXaATfcI6QbZhaB9NufgqZlkm5KTAX+En6E2m47mjrNYclvQdUc3ZPq\nS+CjM1D0x3KrlUIZwgts0IfuJmY9lIB8mn2Rayt7IqPHRdWj0cFTVBA8didz\nFqfr\r\n=M9wG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9771b1ae4b2c4fe007289c5a41091ae85113140c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.4","@storybook/core-events":"4.1.4","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.4_1545772282214_0.4958965018068522","host":"s3://npm-registry-packages"}},"4.2.0-alpha.8":{"name":"@storybook/ui","version":"4.2.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"956431b3b47590e7e338bc3ab1f8f11844c4edbc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.8.tgz","fileCount":170,"integrity":"sha512-We74clN5G9XR92DvGQU6NVBv9X0fvdoPlFrcsmqvj0KwoNOZG7O4rr55ZBTelbxdGgjQxF6O3rZe7UXA/k4IOQ==","signatures":[{"sig":"MEYCIQDm+Sv7Ll68nXixjrVrg2+iXBrN0LosKe8DU6Zly0MXZgIhAO0+U+bdwKtY+CheOMJndB74IWVnbXQvbDqvBDSZdE8y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJZY+CRA9TVsSAnZWagAA9J8QAJWHdL/W1fDsl0qE5oKV\nhxdfaSrlZtLoUr+afuOmBNPRBYcoWgN4yFbwgYXpR4B72DKyR2ArJYbmbkoN\nqshnVV3NyIY5ckQD0XBKFnG3UuD3ZsRzaTQCgfWx3qQLvEXltJ2R4I6rAJFy\nFro0q5Q1LyQg0sBAgMZqq5wK74lYV4z6oFqdla+FjYS5ncwJD0g5dbYApO54\nkbkB2ZY3cOrrfJ8Thtao2x4alLejwb6j8V8c/F3VVmLWoD+RkCQqhnCSdgyY\noFhJ1mVlTCtJQgosDAsmaqdDi0veRV99S24Wvaa5QZTh46iiUuuewzT4Rg/c\nerk9XRWsVDTjiq5MADihT/vR93zrDM6VE61vKKgX276qxU6WOorXsHf1ihMg\ndFc393j5s1m+8nceQNmI7f4Rk6xl7qoukgMFtSVVssfXhEu+EhOF4eXpSqY8\nIPWcHQWzykh9mXP/cUtn8ejQMJCtPkowCeqKW9IFDYExUkqmH6KhPczAOHKc\nrFncZMDAY+su4H9mgVeG+Re88pQuFGLr4OqLxibBBhVv/OEaopyn82uEPx2x\nlc6wYduEGC/+rr2gZROxvMMCuDe0384E6Lmc62acUdlxon2D1PgxGq9sYpDn\n8j/TGH+x4rM4iAn5UA0wKVEdORp+F7TFbj/emUHqynE6Jb4NEzm7GDHmZeTT\nf+S2\r\n=Np0W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"1723c492fd1153251ec1a87c33090c2cdce68c10","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.8","@storybook/core-events":"4.2.0-alpha.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.8_1545967165910_0.9415075709472007","host":"s3://npm-registry-packages"}},"4.2.0-alpha.9":{"name":"@storybook/ui","version":"4.2.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9ca8d6a9c6ced51a8407bdff42051ca196e8cab7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.9.tgz","fileCount":170,"integrity":"sha512-cGfgK7m95aqOA03zalznjjuyl66InSEzuRPGo2zxFIUG1jMRk/pwb9owEU9sn0r8wQeXPxxbdsP+R05tEGHGXA==","signatures":[{"sig":"MEUCIQCi9yJTXfV/gHez/jGVIE5KP4iCYqoSMafBVhWPK+oZSQIgbz9Zstpl11gLUt3g95m7DdKINjw6PW3blWpx/1L9vN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLuN1CRA9TVsSAnZWagAAHLwP/1WZQVjE1jG9lpgRtxEl\ncmKumiA7sNFiICfTKYgOPtjHsA0MYxkh0VilGtGXZ2mbgYp2rA9aEpGOqW0R\nMcf8jAT/mES72HVn9fDb8MRAP+/Hm9wMo1VMdS5fZNsCQTbbwqzFw9gdS5mg\nHk3P0wGuS4A//+oj86q5cLTWaEpx+QR2wLUiJgTc7/dbC9bK4GrL2zjVP5Kf\nv2GFWIlqw1iHE7D7KVvk1WEEijNipChg74xN2cn+pdpiyc74L0K+6zR3DSxr\ngOps/vZGEa4UVP+GC35TpxIbpntp5Vh4xy73zPP36Z33GtXmjfqayuLBR8ih\n738P/ugOCs8Z/EASKrPUbYF7BrL0DEeT594YeZccgNucnz5ticZOibawoePN\nd+UXNKAQHlQWqihW3PKyoNxSTGnqCdFXgOhU1eXIvD+mXDg+XJkkBXSLJT6U\nidJYQAVdx9lPDeuJTo2acWg6cigqWZhYeJSjY0MwTjEgumsGcJYjDjQ1eELu\ndFGzobWwq3xnoVqedUWwXcxTIUrLGtb8IDm06VY7oJT8HgijG9W6yr+uh/1e\neJzoHVeA/75uWraEIkEl7ZczQTOsoHn0IuyCP5HST/FWw/6vlqlK995KUftR\nUu00UZ2RN7en7AR41gVLXzrHJDH6aKLO2uMC5KV7UvbxF/F/ccL935/Thhst\nf6YP\r\n=T542\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"ee0f498dba1b88b81b34b89bad13839d3b19e978","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.8.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.9","@storybook/core-events":"4.2.0-alpha.9","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.9_1546576756504_0.8925765191529142","host":"s3://npm-registry-packages"}},"4.2.0-alpha.10":{"name":"@storybook/ui","version":"4.2.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"110d38c767084cdb5ce04d5e339e8e3ed4010c83","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.10.tgz","fileCount":170,"integrity":"sha512-XSPJjFEgCwxzfP+OLa4/8wXsnzkcdEHEPNOtBeVIjRapbXFGgIR5dcc9eRFnpLVMMYUVMvt8WGN1tlVqpyCeAA==","signatures":[{"sig":"MEUCIDR8gdrjNIqjXleg++qFXm7NDUMdYlXY8xobLPbBPxxkAiEA4wLjP9w81Ve8nzqFsBesgsNbW+ybv08qX3CRRDVZy0k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMd+yCRA9TVsSAnZWagAA8L8P/RpHWJt9R7AyBratauuR\nY5B0PCspXMiTnGrqTLMSwtn3Et9grI1rOUpEryQMmJNWT/MyQHf/NwOQdOUf\n0ba9jq8dj1TKlYsDAGe1l8ip8YSiI5Dw8wAF39rHgNw5XPgIIVXG8P4Yim50\n85DfgTMsrZSbNy1g9067uCRm78yJ6R/AsqxMO8wdVfzTNwilNo1gtySn7SRv\n0uOb0T6adpEnXeJAL+J93TW05rCYLnoT8MRf3pQjAPZ6V1By+4bn+fO1V3OF\n+dyLpoO2K7Akd5LhAeKVMwUMVF+AWvbbg3xqlkkOQxibKmdJxMPiGVIsqVBb\nq1rkh7L0jDuy56w+InIs+26kIb2O3LxvTYxz7Mw25xP7K1NoFV8vJowEfrFo\nwdS1LLyETjWctYxGIhiz0RGXsnLbKuAUq6OLryLSkkZhqKhsHEwn1kfX8d8U\n22viLa4EKa7nLd2DReUTsQwIq4w0acRjqZ80Tl4RV4EjnOT3gmObWkwAGyVW\nInV3GjkiwCOj7wXz4zCRQgB3G2j42gsXq2OLqR9Gb18Jq103htDx179z0JL7\nk/8JJMcU9QJSOE5A4ubXnQ07c63M3BzgWcwvAbmmU4WoIENoJknHzErkkxio\nQL6nnjP/1NBmttkDSykOvBo4kz1TijEH99wPook9URsiJYk5mnoyd7mbswgi\n/oEL\r\n=VxeW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"0fcb70b58c24ef0906062b210480765dd374799a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.8.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.10","@storybook/core-events":"4.2.0-alpha.10","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.10_1546772402217_0.8251298088408694","host":"s3://npm-registry-packages"}},"5.0.0-debug.0":{"name":"@storybook/ui","version":"5.0.0-debug.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-debug.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6e7132a5023a57c5a9d35ec4008d87f3ee22909d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-debug.0.tgz","fileCount":120,"integrity":"sha512-HmvVcavAfZaLRiisoDUv5k/hJMyCHj9L0gE5helbYCfPhB7FWKzSI1nn61qhIhGvE/BGqaYQJYETy4vXrBv4Xg==","signatures":[{"sig":"MEQCIAqybR5Kp/HIt6Wca5l28xHtpaG+srVGRHAWMQ/pBNhQAiBrdJ4wKne+4NabKDi4zXWmY45NxpC2RoiVAeiUSYcmsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":874652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcM2pdCRA9TVsSAnZWagAAxRwP/jqdncS62NIPT6L2sWe6\nx4uzboPsH6aWwIS1rA0EDzWqnbJ83vLJLpQ2AntZc9RFjd+ga3h3VRTd9SpS\najFEhydtnn+8LtdkvQ6MZJtr6KvgIPV/BcLQgfncSvGV1EHOVOKLshvTyjZp\nfF19zH660duECdaNU3WhWVyjC4rIPqNywdjMPbrXvtf6zDp43zV2G316jsYt\nthyjLoFpkqWbj8OiTRQMwZGhnY0QV1QEvBxA2DxwaO0Xzjo5CSqb7tTMaeK8\n20ZWmn11hqRe9Ioh5YHiwoyZRS8mMD9izwJn2N4Ri0Fo5oZ6rONj3qpfAr+Z\n1Clq9IZPENwn5XTXyg6vHjhkFhNG/V3TKCHVkdYjjshZrFu0nczJPD85QqYb\nZmRUOoNmI9bu2hTbgzf68NKTE0UgR0PWsjXWrXmM0jCIJFIDBh7d2y4glBQ+\nVrSqASWJglF2aXPNvwSDPbMAkWsbcgvfAUKi4g1IBuhqyH9tQp4+EOdLAajY\nErg0YQXkg8elkNcOb/Xb61Aom+oCx/BfGYIGak2hBkfHSoAdErj2iVgrXsuV\nz4ii1cnokmwidEPryyp/ARleqsXpdw8Y8kwmVnQM+tGrpq0kRE5FcnZRMPRf\nqTk/HW417sz4xqAiPBHAYyvpST/tjJO0Mo8EROJCAJQYv2BT93cBUEWsf1yR\nzv84\r\n=nJFq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"7cacf4b23fc7682e0891e8fd4a3983e8879f84c5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-debug.0","@storybook/components":"5.0.0-debug.0","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-debug.0","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-debug.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-debug.0_1546873436605_0.46131633086707025","host":"s3://npm-registry-packages"}},"4.1.5-react-debug.0":{"name":"@storybook/ui","version":"4.1.5-react-debug.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.5-react-debug.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3be91d8e8ee913994d792324eedaf9e31f41a0b8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.5-react-debug.0.tgz","fileCount":170,"integrity":"sha512-ToBjPXBFcvBZM5I2eQRfYQknClC21PFuYHyocy4yCNxt6hnuSrd0sOTo0s6q5mXGOfdAqMWK4HhNF8JRnVGyhA==","signatures":[{"sig":"MEUCIBrz+2OLSojIX4Sz8XIevBSgkyktnhq7nvpmVEEVsCAIAiEAqOsZhllPRreoSDPvY73ZYX0k8ewgeRzQUl3RdQre3fc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNWvuCRA9TVsSAnZWagAA7ToP/1jLU8a79rtzSg/OMxq3\nYVU2Kml/QOQUSibLehRoOb/F1ezVI4nemQAPF9OTMskL9GeGOqDigkfDMDPh\nNYL1Yb7vpjn7GUf1h+LCecddSh3zIgpBcZgPyZRQ73yCC19cBbixcKD0mgyF\n9nSqSnKVD4EGP9lLBkJs02DrXUWfqqRcCITQlipgAa4uUNDOmuUhwKNNlN2F\nVjddG8O5dvDKjcByu2yJ86/naRB/ppIO6/2Ay9FseMJ+AD879wb6OjUzOUxd\nHnZeZGwTkR4rRFONDTnuv/G8/pI+Ke82qYYn0RWf5TdwqXKlcjvkVr8/XbQR\n8uJD5g3qpAhrQhr5u3MH2DoN6gsIzqYTm1HUzVAe6zWJkjkL3h5U48fDZewr\nSsUxN5o3i5878WK05YA+9/KxM697Wn1wYeVa6aRzGzavvP4YO5dBR66/QBLj\nbmqRcKv6Y/VY385zzNUM4cETyW2xDa8rMugX69R+kpF+wqxl3MDazRdT0nky\nsTOSH9Ykr8xzq80hPR/782/xuX3U8pY4dCtOr/oOJ62aJ4N58GxXiqlyMvoO\nnuGO6kwEBdY58ukFENWJnEhRqDNgd15tTvPrGo1nIRYVSmCDnfOsT0jzUNHm\n2nEIuT5QcCleU+GiMaFFImNY6Ugo72Ya1GbqPVAQtnQsDjO9ES/sueLGk5c5\nvKWh\r\n=YU0K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"9f6ec6d8393eb94ab4685839ab865af11aab32a3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.5-react-debug.0","@storybook/core-events":"4.1.5-react-debug.0","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.5-react-debug.0_1547004909939_0.17638369380743324","host":"s3://npm-registry-packages"}},"4.1.5-react-debug.1":{"name":"@storybook/ui","version":"4.1.5-react-debug.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.5-react-debug.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"eca421c3180d2a3235698c0d837836383ae25561","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.5-react-debug.1.tgz","fileCount":170,"integrity":"sha512-Jf3hfJL0A+akSfijdGa/QNXTTJNrjX2i9kW0s+jIdTeLACMKAU5ZpXYyQuYEHE6aFKQOsBcBDbwCR1Hh2/J8uA==","signatures":[{"sig":"MEUCICyh5+KqUdQdV7N1PY+xJUdQOiLKq3W6mtvYi0UNQmkfAiEA7iUSzu+UB3QokgGLdddo2q2AFLzucSmraNdNZMGb/bk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1001735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNXoLCRA9TVsSAnZWagAAClAP/3ANCXXAjWQ4eEb4KZCy\nfKgljJ/fDgypDWq6eCPdCNLGXNEoxCNj92WgOzxd5i5K6khvbEsg1CGT5cLX\nSf+43ym5VZJwnRfuK8lhear8ICYSc7L/DqRGDU07q9pkkGqicTU8u5oLrL3h\n6+bsJsJB961NQCnduwtKHjBEbHPc6iIA1tXmcYxYbotARiPwDVsEYaYoBqja\nqxx/rQIvhLaypg0hUJ0NI6wWGcjjJaVbopB9llre9bTnL3VixpL9XTVlpfgS\nons6wGwvwWGipvpPJHby4gKI0bUy91j0KNBiX2e8qgEG1q1+ndLzJESmvN+w\n0L2hvc0h3H0jPssxnGjPcjYuuJagcRZ6q8EzJofnhoS2BrfQmZu0LGPbUaUU\nVTnWecyoAMZXEgEj8XocEIDgccTJYIi5uUGJIUXX8nnifOcyQ+ybMy1m9bXW\nAvSaEoecbSKDRKX9eTfsLF2HXdbAcaDVGYLwPglJaAYO3fP80/3EJHsZBO3k\nK/QYtmPw3Xvv+HyMeBECO5UDgf7G3gLxZaFwqU6L6KlYlCtRTs/Vo3zy3xSv\nL40K90ZpxHlxMQjlgQLFdEiPfNL2OYYTubpI3AO7E5vTTm+j3PaC/LDl6TFi\nZfPVKhMtNKeLtcqnNCbP4rGpbVolH+yVxOVPE27cteMVtk7fJdaMDuekVAD3\nL72A\r\n=6vKJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"234686645735e91d11b5dc3a9d7d67e6cd602482","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.5-react-debug.1","@storybook/core-events":"4.1.5-react-debug.1","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.5-react-debug.1_1547008522691_0.46071990793067297","host":"s3://npm-registry-packages"}},"4.1.5":{"name":"@storybook/ui","version":"4.1.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4aff42bfadc5f14859fedfc0c6a56123aa6f5b2d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.5.tgz","fileCount":170,"integrity":"sha512-Mn8vQN0urQ9+2Sivh4KFP8ufvmKz6JAU1gcVYHISX3utcKCbj1RIIc/A8jpLnHeFm6jN5SHpZWgQf7avHpyBMw==","signatures":[{"sig":"MEQCIAhDPsGSl2rTSnGfBHGF8/QNBqLnPe6LhotPnDEeLtU8AiB1KIY6917bWJG3Wzq9+Jl1Nqwu1xfGVR6CnjhIpctbvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNZv0CRA9TVsSAnZWagAAkfIQAJgaEqIWilwq843z0LVD\nI9IgMUEuazrJpFZF1P5uVomLqcPDiYRGRIfAL+QCvklagqWwAar0m/mHodOB\nKSNOAHqwa9W2gEcP7Mva3Z4wlh3HM4XzfzhJFRZ8nsWxvfgkVfeRBquHzp7N\n0NGr4SQD2KY+oVJVyy4v+Mm9QLwhpdgCdUXpcPdsswLOejqqB6aEW/EZuQnP\nfJfnd6XYpnbqEJP7kzwA3ZelhIJRKiZ6bMa328jigCq5pJqN5dt3IwhYG/u2\n/5JBjHWZmG4lv7qaN6kVISItjG/Ix8LNSyNK+m5RatP0q2CnH9zPK1SJg2Hm\nsPK9K7gNhgzuJY8sjHnZxwRrwP81SY+nKHe/fs2RJV6LBnGGzUgT13pc0tt4\nKtVuN3WxBMs4hEHtmAGQzdmSGmDcuHPBBbKemVVshj0jaWnBTY3EjVE8LVuu\n9dlMYqwRqRHxqTohYGsoxGctotAt6JvSRMUzbWBVPGvXRFPlco+Z0MtAc2Z6\n072VAF8vLcyQf4CN3sX1MV+7wkKMUre+gCEIAstpibJy58BJAPMkvyXQ0NQ8\nRqC2intnlL9Akb5BH6ufgiucuaDaeQxp74gduvHsPpdLCVdP5EexX4rhZNFf\nvhRv8NG7i/mSs+fVbY+sCCfKoEZ1EBeT0LfRp0Ojg2+yBKGyG9FUp/Nwws1b\nUN4c\r\n=LWyb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6947deeabdb28ecf5272de29addfedbd316d4977","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.5","@storybook/core-events":"4.1.5","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.5_1547017203862_0.10627121963898811","host":"s3://npm-registry-packages"}},"4.1.6":{"name":"@storybook/ui","version":"4.1.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f8516dc03c2b5e4c57352c5fc6b26eaf9fd25488","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.6.tgz","fileCount":170,"integrity":"sha512-MXod0JMu/P2sTYlN6DM6yuwvizUKjwFn4lOf+F9hNe4lxZEXw74KogCv0CN32VUrWUP++ZY9DybQr4SMRFVVww==","signatures":[{"sig":"MEYCIQDUXGUejtoX3mo+Z9xMYOk7boHZN2Gz7Ov7i0PF8o4PzgIhAKZnWLbSZh7EbkK/YYcjbw2yvf1NeEjJPbccqCqdaCOV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNZ3DCRA9TVsSAnZWagAABkIP/1E+6v3OpdgXbFq7DXLj\nkFVD80NlG+RL7iSo9mfhDrdCSJxJaeQ6BkmdEwWg3LiQbSdz0wrnxJ6mtxDV\njewMWQdw4LkTDtdiWnUcWdBYxyIFzcln9g6M5sQwa4FHK7fSS3SsAmS+RFkO\nmE917AUE8gKk+lJzwfbs7CteGYpiu2C0M5pEy+uwjdtU99++xgZ1Tx6/Pfq8\nYIZ7z6fDvX2JqwhYufBUpajtqmGavYPr+U0PuBNKUJJNrTsPP/WVXpGUPH1n\nmQI/fW5cw1Mx/hf7Eot0TADSxNoDeE+vqKSrJK8BeMuXSsSK3u2VhTTEiOLS\nI7pSwiRMJPoqXPYacKUYbhm5KHB0zh2mIgCt8ryBaJYDMHKCChkQjMESlzTv\nC0AKoZYvYXDLG0VANdyJtyPsmq54rAKDE0lghYtNmx6G72oI4TfcgybJhpWp\niHMl7g1TPh9KeEnTwA4o5bgqkflrppMuN1g5HdXKHczGpeZYjgOOGP07QI1r\nvuGNAE8YQhCKkHowlfsGleR6PbR+77ZtRPeBL9roZNeicaWZfM1UVkLPIrIx\nQ6TRSbsiHfTchK8cjyhR8h58x+oCKgCPV6CVk7Pc7B+gBMeLVaI2WjLVCQkn\nbZGb7fefVPGgqQ8yLB9N8p4/AX/QLuXzTsB/yxLqtCiEc9H+zcVGn1qyUHlu\nVT6Q\r\n=ZHnD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8901a06efce283e91af5aea9ac8c256fa0ac6b42","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.6","@storybook/core-events":"4.1.6","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.6_1547017666404_0.6056639590445878","host":"s3://npm-registry-packages"}},"4.2.0-alpha.11":{"name":"@storybook/ui","version":"4.2.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.2.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1557ac2c8e02d08ba54d9a5a2be1ca04fab2ef71","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.2.0-alpha.11.tgz","fileCount":170,"integrity":"sha512-AWSqJHup2xiuraZU3eRn2+/TqhryrPHUXLRmC5Rz1nJUxVYGg2VMleAoq+KL4XiheARsNzPNAf20X1pNGJvLdw==","signatures":[{"sig":"MEUCIBWOuq7u+FsJ6HUxKnz563AYTeY1lkeDx2fs6kELUw45AiEAt/4Y/sFkqXzIbo0uLWx/EowjUaJBJQFyjRG0PF5gRG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNcdGCRA9TVsSAnZWagAAkPEP/ibIlPTO5M4fSfnIIP0D\nNzsNDxFqMf6RZkJWTgAzTl6th92lbD4R/KqH0fu9UlAd8LJ6YLSdEjCyXLtQ\nONYoJ4B4ZMMOigWUYMROw8F5s5rmuBk3kjouCEkM8ZduTn3DxMpozNAoX6yb\naQChofGdxxVNZWrr8uz6YC5HCCNZ3oVCFZiJ3GfIuyqjFWLb1dnhuH9VIuWj\n82eUBm63cE/6Mp5rlXP6fRwptadcmb1ZdRB0v6HqvzD3rNrkPG0YPzCKWpCN\nwziR5dQ3gDXUMEuROgrvFyC6wNyt1pUlft3dvJR5iPeuUxOHRvdKF6phhU10\ni+AprcAkHHDKDcsX4zlSWeR5iW8/Zs6zq6KB/rDuItHGLnVeMEaWhpXVcFhy\nkOTAhFw/Nks5rRivzbLZlLxlCBoAtY3SiT31Gpxu08wBM4oJCA/YVXP09rkY\n+XhgLu4alfTpOrjN2WheWv0d2HO794oXTrztG297Zu+zmFKAyCuQCdYCKrvg\nesFP11gb2btEsMjOKHQp7H2dzynbc4AHpH7kKcUKJpVHAq0qtGxxRWEitDeK\nI8sN5mGge/PfhuSSwGKJhJ2LOMlk4qDPZiCcYXYtaHmxaIu2VlDRCRA8u9kR\nJPGtSlLz6rrUWcm7DOkXUh3+4Mb35VCHqcUHpWE9ruV9QrmZHdUez13juywn\n/KXL\r\n=Z+EF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Redux](#redux)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nnpm install --save @storybook/ui\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getPanels() {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\nThen you'll get a UI like this:\n\n![Simplest Storybook UI](./docs/simple-ui.png)\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Redux\n\nEach module has a it's own set of reducers at `<module>/configs/reducers` directory. These reducers are loaded in the `src/index.js`(inside the main api).\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nWe are not using any routing library. That's because, we don't want to do routing, but wanted to add some query params and use them.\n\nRouting logic is implemented in the `src/modules/ui/configs/handle_routing.js` configuration.\n","gitHead":"edcb85f861a178dc47330c911ad658118659f8bc","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.8.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.2.0-alpha.11","@storybook/core-events":"4.2.0-alpha.11","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.2.0-alpha.11_1547028293289_0.16811839766071124","host":"s3://npm-registry-packages"}},"5.0.0-debug.1":{"name":"@storybook/ui","version":"5.0.0-debug.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-debug.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3a8e3b242ada0f1b5c31263d0f4ef9b8b6e97642","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-debug.1.tgz","fileCount":137,"integrity":"sha512-AyCBGWKJcE2h5yyWAhe/DmObc34jBE433BCNFRUUXcmcDdKlNQ1Sg3JwLXZVyHLXwyDLNaO8uR5xQj4W66P8ew==","signatures":[{"sig":"MEUCIQCD3ZYZhJv3/JF/d78tPJL7CYLkg+Q7FiQdGCI3U1p7oAIgK9XsSQ9/7bd1ybwMOsVoyYUc28F9m1YlmsnyYEDOlN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNdJoCRA9TVsSAnZWagAAopkP/iRCaFO+xp6bDN9JkQt6\nYhGlXWHtUeoj4NnYeAGC8VzPQRNlKQyDpk3nv+U0nC1I/loOsjMTcK11p77o\n6gY6VJLqT4usdKQZn3OEDTwNOMQPzxvyn3ZAtLi97JvhFWZnytF05FpucRcu\nAMbcLF2jP/zw5avXwQsvTH2jlYn5D831oGJFT5rZhr+oyADBoBKuO5rcdHf8\nm5O+WIe6jtKC0hF3jN9kaqTr8GS52sHD+iJp7p2Gir3TaQ8N8YaJV5mDq7+N\nmEAABeORUoYM8G3TG6PrSRGtyaYGK2JQzMoN0amcIgbZEMlRo01ecW5dr6u4\n5UNVJnuD3PLPlIk7JLoZSr9OvlRrpyQqb2hA3TJHiq8JdQPx/L9/RyerJFzL\nynd5zh/KVeqspXLQj852DNLbHNQ9pbGZl1gXNKlslu+eOwGKy4Ku7YOdstOB\ntXrUx1pzorMc+lno6WXJgb+brvhcujOqSK55MSzRb82eymLC2kq25ID9OcuA\ns+Yx81lpzE4ikevmn4kXNLVvbdO4s+u6kMUaPe21mf5v2XBGN27fYAKFaZdO\nvUcvxAvHa3hXEGRFFDRsX4kuUwUA5t5JjZG1s92SGcnto95eVnWxyspdKVP+\n3zvYGa/b8aLeQL1y4yQo1m23y1t+q3YyCqxcTVdFEeoBk/EzoC5qweml+Wkp\noiW3\r\n=Ii8m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"207598ad16237207116f771aa176321f998ccd6c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-debug.1","@storybook/components":"5.0.0-debug.1","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-debug.1","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-debug.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-debug.1_1547031143947_0.4181540264254664","host":"s3://npm-registry-packages"}},"5.0.0-debug.2":{"name":"@storybook/ui","version":"5.0.0-debug.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-debug.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"96c865b890f5f639168e28240abc483cec92ff21","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-debug.2.tgz","fileCount":137,"integrity":"sha512-Dq+s11OWvNhYgADar6nS88OWHl2+f07npKQJpGtZi7Rp2rtHYVIqhMME4Yu1wTxWQNj68XI974PGhZTh2TJUwg==","signatures":[{"sig":"MEYCIQCRy/i/0v5aQzhyhrZckCO4dqZe/d7Cper84ovpIQo0KgIhAMQ3hVTsJEdUQIZTCo+pfiWl/FKtKP9HrQ2hpNSMjdx7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":970369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOXtiCRA9TVsSAnZWagAACOgQAJtyys99gJP421ndn1vG\n7Th+Rhs99ehguQHMP94LcuRNQkXXC9AHnKhVl3mMWsK6tQHziZjfgNGR8Nff\ndFH4RURoaZ2Tb7JUQME2nPRu0DplaQqKJtBpf0JrEjDc+Nwi/CG0oz4ydFB7\nwFm2VkrMIxieMr7sFloX04yZjH+cggxPNlwsW1qG3M+kmBuGtwUzhNrw+qnb\n/l4sYzwF3kn7qKc4ku9pmS7PKlCcYXY3uRaRCNmWg4sgqz7Ozzj6S3yRNonV\n/4aUVEeD6yEHSTHwRy9foCY7KaHCXrj8GOalD5BNnw8fjcRahxv43lOC1mTf\nEhihLhqBZAV9PKEOxt1ZkHxPPDC9/9jAVjiVUut0YLRkLkMJETt9d7NlhKc2\nH5r7aYHpfg2Ou/oMtsfAtWGCx2sdenoRTjz/ZAy6aimWcPHmsXERsFgLHphN\nEurlqJ9OlYfCpukFLrkTk2Mqn4HGzTyWfHxNw7Io9/gRSdBlVzgLK8byDS1W\nFP093Al6eXdTO+eDqeoEbEyD5W2sR3lwGwY5CtS6+rRxfSN1n2q7FX11dPIa\neyT8BHZKnbZJx32NO1gZsPJ19GbUkDco/q/2pDxuXSzH/a4WWE96p+IkWS4K\nOrkuzLrt68WfC9NG+MREzvUOxqG4Z1HV01V4THSAMDUQcw1+GzZccpPjee1n\njQRK\r\n=2oks\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"7d7fcb32d55969d68fec225832168c354f6716e0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-debug.2","@storybook/components":"5.0.0-debug.2","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-debug.2","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-debug.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-debug.2_1547271009949_0.40827432228816063","host":"s3://npm-registry-packages"}},"5.0.0-debug.3":{"name":"@storybook/ui","version":"5.0.0-debug.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-debug.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"817cdf9ab9fc93f5e6831ca8cbb25d61d29dec2d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-debug.3.tgz","fileCount":137,"integrity":"sha512-QPnLKssibhzDr951hjJ019Mbn1sl9vYreOXTKaxkDm+zBW77Ak4fQXGniSrSEhonIF9SfwaVonhrUsMgmovlfA==","signatures":[{"sig":"MEYCIQCjrDPc+bqq1E9VrCKZvijZxuCzE8ob0zaYTTl2j+cACgIhAPA+cInuP+KIy2aMn9rrxsRWV0ofz398NfNjwTOj/K8e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":970353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOZcICRA9TVsSAnZWagAA6hYP/3uhLgJ19i+HGLNnmODQ\n4e2cgM4duw9Rgbwr4VCMtfuu95UkSekNE6iFcr6WVTLhgusM8T+OybuQ/9uz\nT5MLLyt61vPpBCIAyVmOZF8VQOIOuz5Rt4cnkmIbLnoU/ZfN/MqAQSqkX+Zt\nbx2xTJK+cMaRu2lmH3R18b5R/VZ5swAyIeoYaTKYFnHDTGdy9qnKumx1i+qj\nbYTLSMbY5soVeu+VSPiDzbXv0v4bgJXN9fY2aEzjmDpLPhzC5+Ex70C9/jGG\n3Y+d9tKMRuuFZtW0i58ya5gbCXiYpuogPoetHW4nHCBUgWhZleiIgnAuZdqq\nkoOyoYlxRh9XF7Yp6rKs4Ghe4+e2tHDyaaZXTiD5cDA6qHiW/iTl/dl1+c/I\nP1APtD3yeh2RlI+oKjr2t66aGCs9CqGRgmidqaq05546Z4JDSLs7ZSOkN0Xj\nDsyu3tfJf4sknjhfquqei8aQ1xHLm6ir2a4URhk8Z1hZwIsK+k4vQQ2KAUue\nZecQEH9P0Oq8PyEArhzxznQqMrsx8bs3XdLUbrbzurtvCsfKsuFVs/USyu+F\nTpjU/yce4i74svu3ElJWAKYlejDDHEqnyeKDou4bBn1tMYobK7SdmrsCP8ej\nNva/5G7KF4Hr+Js0boTC7MVhPXPPrOJz+feJnUqMdqjZu/jhcHrEArk4mdqL\nBBS5\r\n=p1N/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"7e9669a0ba3a1049008708013e0e43ee6348e781","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-debug.3","@storybook/components":"5.0.0-debug.3","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-debug.3","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-debug.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-debug.3_1547278087439_0.9984186883226658","host":"s3://npm-registry-packages"}},"5.0.0-alpha.0":{"name":"@storybook/ui","version":"5.0.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3d33a63ee937a9ff745bd80c0efa862e53a803ce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.0.tgz","fileCount":137,"integrity":"sha512-cv0Uz/PYcpUgG6P1W2quCgqRpinlW0Tlwes1Fep0B1lIW2e329ORf/BJjEHWreWXKWXA05f6zklNQAknBUO6FQ==","signatures":[{"sig":"MEYCIQDes99LR+yxAiOa+9q2PfC8emIDXJvnJ7AQ42hAL+fP4gIhAJbWHZp+OzYsEM4drowwPshi4KcMBcfx7cnzQEfHrley","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":971301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOuZRCRA9TVsSAnZWagAAYOUP/2IPK5G+VCc7ZaW6alLk\nPHUQUNTACbJQkiJ+Fa9K7XTfyntNLkIyZmStvcaL6Sm5NQtImV3NrMNuMEdp\njiQrOzQW+iYSpAcESoamSuzE1KYEt8A5PH8DLvmKdqETpzyMoinQcSqZpm2r\ndyEqid0ldsOvQq8mU9Mp7mVyIlpi3ZxHmV7ZBZ3LoeYJ6S8GMUvVG7Agy8un\nEXSx/Ms0iSzBSxEdJpkkR4vDNsOixXyYIDbShGtRiVhVxWabh64lDvN3CX0q\nWbBlOii8oPWrUcGoNt0cv9i//0ij6znhsIWrXdczAn9ZTxNrQisSG0uavH+o\nrcjWTe5KQzarYXj1j4xZhbyWd3VM/t1lSO1qK+yfJ5gkOxN3NQzuUG1DMmEq\nexLnEEPeR3EOuEWdPRQyfiQvbtrW3lhu3EeQT/hWGpGcBnksgcBxqERFUij4\nTBSMWJaZixSojBNkFsR2o/sjPMDGTZ98Auf36okxBdnqlwAbOVG7m9zrWyeg\nw4bJrXNgGomDB2zp+ZeQi+FSpbVMs99g/Bq7bp2GyEoEGCj+YwuFm9yb5YXx\nMPGwDiE8s/m8mXZf4In3QEgdL8CoCDZb4MClGuF175o96GfLktwZTo7+OZKJ\n6RaEIx2IAhYfP4LyKRJg1RXaZ+6RZxa8OuMRSzu+MWiDmOXXf4fdSCWxTrtg\nYn9C\r\n=UnQ5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"340df64b9446d3c195ede1c1ba10a09810fe7479","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.0","@storybook/components":"5.0.0-alpha.0","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.0","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.0_1547363921295_0.5600037670128832","host":"s3://npm-registry-packages"}},"5.0.0-alpha.1":{"name":"@storybook/ui","version":"5.0.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b55468e2d196c7de13d987dd4ad09c1a30b5311a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.1.tgz","fileCount":137,"integrity":"sha512-80IxKjCKscYHb5RUMjRpnhwbyRVbBfTKJ2kP23XA9h5isaSiLu4i9iO8gL6q4wIWGOz3NjEcB3PPF7EaLfCNZA==","signatures":[{"sig":"MEYCIQDzK2tQn3leQdFLqnFDQzz9JXfYYFA8q8dXSNGn7Bu7XAIhAIZGsR3qHH12lsVxNQG1/qkceSKSvQmjFrdGnkv1X+gx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":975672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPK8iCRA9TVsSAnZWagAAzJIP+wdfT6+SjGprQcdAVpvt\nkmYBOfLaFg1vv6vDd6mO1ekGcAbpTgw4myDVIJ7u4uSe/n4jvn3AlItAXNGx\n84QLbMnMicEjJy3l9Jxu3Bo2+clHSQydN6K3ZBTk+40NsS5CkEdVuCWzGByS\nHp39jPcvFMtkFBw3q8tbYA2QKEJpwj+r+07srG2iK6QGLx4KLs+mku9nkSXM\nFvOLwrB0DH5L3zi4vP+PBgeTIH4wz+s1+tKo6pptwRxwBEaOMdFVsViYjBiy\nbvK7I9A40iRlqQKWlviH/MA0MeUqNJKRbXi+t8voFOBqHaJebMsywF15qs4s\n6JiiJ/oAVtP2PK600VHV/MNsWoYA1u9wLcMo1sDbxt0Bg5PpJ2tYUeqskpQO\nirlbhZQs9RanR6PUF5RKCj1tO1+4X6MaV+Cb4FHTc/ru8VwVoIY7hJq9D4aT\nDYIZwgK2MBO4vUzJsbS5q86UhMtRxPoEsToadzVwOOgE5CyzSN34Q3oSNbHB\nHKjhEWDxGeGlhQ5wS2XEATy7WRBK7uVyJd2TwsZtI64c2vs8LWWTBtHT0gFF\nUtuibOtCz/FlwDOApv1kPr09HQa9EDKfuhmsl5BW6wrNgf+Qlzitm1DgD8Ah\nQIRYi9HYOiLRa5Zbf3Oteubfjb5o21PN7uQGEx6bE9fnKfGoD2SqcLES1vao\n4AYm\r\n=w86G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"70e528348e074ddee0d9700bffa7794fe5b025a8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.8.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@emotion/core":"^10.0.5","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","@emotion/styled":"^10.0.5","emotion-theming":"^10.0.5","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.1","@storybook/components":"5.0.0-alpha.1","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.1","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.1_1547480866355_0.43346510845681285","host":"s3://npm-registry-packages"}},"5.0.0-alpha.2":{"name":"@storybook/ui","version":"5.0.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2a36720a72358e6d33751dd828759eb35380ffda","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.2.tgz","fileCount":137,"integrity":"sha512-rCW0GWB/bvtoZ1wlhnNhLB5d+J2rrNgLeOLPMY7AQfHN2+3UGzjb4pvwyyT8k7WEqCIwUHvTBBdS0n6YAExIGQ==","signatures":[{"sig":"MEUCIQCjQ9ZsaLAx/EyI8qHPEGZO6+tQlzTDQPepSHgIXlDTkwIga9HlVHvI7NexN9YqU5XbXZPn4Tk+50YXrAhDR9c1OXg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPp1pCRA9TVsSAnZWagAAX+QP/0yrX+euDqmyPyGNemZO\n9C0JxooQtcAbJ5EGHXZXXDyaF6uiceuwOzabfgv8SFj4JQcobmYbmZUh2Vy3\nN19yHI3GuAWmeLcZb9qfjzhGj5FUgzCqaflE3mxuVvYvL7toPy9oay2h9Qmk\nFBxLk97u67qhd5MAO6u9nHxWLd5dojseUM6bWhPZ5HUwwoU61NXTUB70nivj\nIB9/bARvHPTD5quRJUwGwGdSy6zykGvl47Au1QRdr7VliHAF+hlWeBfdzMPu\nKOULPgrCQCqUkYgblQwOqfmkyXsbV91KC2DS4fONI8IKvITTfSr77DAPoQPy\nwhZMhDGneytPOg+TR8DV2kXDgJyVF4n0mKeF9WUWJMRXothRN33Vj7HBliro\nav6oSdeHSP9BAuqvKXuTMiWj86aEd3H5+d9JUY3otpPdfY17rALfULr9DNBv\nA8Guozvt/xEwJG3x+sY3ZL++yHJ8v8jtCiNJMubMYYMYiGQzxW0x+LSdLh0X\nrF1nuRt9R4Yjl4MWlRA7f8jXwvtduTBExoaCYqwi9N/tJZYiy40p1ZrZ/kHh\n4XGnjhRjMBmhF/T95CwRqY7U65oJts1nVcR77uyItzu8n8PFTXFL5jw1Jm4X\n2PneqgdNPC8m7pvb+kqf0K1T8oWGzQY3hnGtHZNxjc/EjaVIE5d3Nbq6ZA/o\nQZIT\r\n=r/U5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"523030f33e64999a314b6590d6b00b9ba937468c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.2","@storybook/theming":"5.0.0-alpha.2","@storybook/components":"5.0.0-alpha.2","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.2","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.2_1547607400927_0.2792980530780591","host":"s3://npm-registry-packages"}},"5.0.0-alpha.3":{"name":"@storybook/ui","version":"5.0.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"84dcff06b820c456b0def2c4f35b457c15584857","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.3.tgz","fileCount":137,"integrity":"sha512-5WyOGAwK9Pli/WwOw8wMdy1aej3xr1PogKhOUxZaEKM8pFATQo6I9AIhxll+lxpLqkKAAiVZSBKbPbqtxgGGCg==","signatures":[{"sig":"MEQCIGbbHCUlFa9DGlXYgRBvpDNkAAdv7gxFKqDEuBsGkLDFAiB5hfaqvJjHCy3qj5jZsdyCdyWgHSifn+Nw2xcfUKTVHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPrBACRA9TVsSAnZWagAAJoEP/3gs8GoPHiUcNGqZbzm/\n+uHfnyEtfNPuSLvDXFS7pVKSjLmMUbbAIREtv7kI8d7U5dze8sgbHGl7chkz\nW5xfwkKGFrBthEfBjDXlG1JOveYdkYgfGp8bRHR0UhpYBm9KKqNJP/kJbce/\ntenSRlkkceiD4TCy4QWXeKIg+m4sd2JeTHxjq9dIWbRbR8OP0bDVFsAYfXVj\nRfEBWBFeCECDStSHU1wwxTiFa9/Ahz9jTePDGyeZ+kjhngLEwdVPB3nPh9t8\nq91B4snnQ35EUrgmmOZyUAemrOSg1QhhmPf4lRSVMD/Q0ffFVgq4mr90iFqs\n5RftZrY50vofHFosAAqM6jq9uWqjALP+5gVcQsZRph359NxF3IXYCuwIn/Be\nL74LcpoF34zmkaOBzkiXGNn5jAx+1v6xRw7210QZbu/FZZt+zjWvuK2LMrxC\n9dW9N6NAGOQ5MVPVqslFVHBsi8Li8yZ9MNTyJns28KyoVAmp7glcvwHzw2wY\n/NFcD8Rc53MDcEAqCdwSWgyXQ2Hv1FyCq5TEEoMOoiEhkt33Y/6L5KDWfpDN\nqv/sstV77R/YRs1yP/WSakYn7U1kbWChLhcbU1tCGeat0mc+NKaq4xoScHd2\nB+K1TNc6TmDeGjDAHpaRG+8RP1GiKdsnlTIrlGXQbZiWl7Hu9ffeY1KxO6Ee\n9Hcf\r\n=xeO7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a1e432fc7a70af5136dd14e3b16f6de0b6cc94dc","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.3","@storybook/theming":"5.0.0-alpha.3","@storybook/components":"5.0.0-alpha.3","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.3","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.3_1547612223394_0.7442938232104375","host":"s3://npm-registry-packages"}},"5.0.0-alpha.4":{"name":"@storybook/ui","version":"5.0.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5119113d570ca0469303fcb6125068263317e87c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.4.tgz","fileCount":137,"integrity":"sha512-Z84E4f1DyTSfDwVu1xptZFCJBpg4JjgH8WgimHvgGwqpu4dDUrNyWDlbm7Arf7xeUEsXpyuh1b+tw+LxB4saIQ==","signatures":[{"sig":"MEUCIQCyBNnnih7s4QMAcDw46V+AcFvKgaVygYQ78phRT4fleQIgC0qBoBWPZsVhfAiuJrO/YhcoDM1UxLJgl8INKm5+LZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcP2WzCRA9TVsSAnZWagAAVakP/iM4vpuo6vnlpXERbw6+\n2Lz39Ec42y46aS10bO/kr66fsRfYLlpfdyd1Xhd6xzK1NbdLHN9F23zbj55i\niBjVW+up8TyO7lvymZE7q8Tal9f5kmfraW7mPw6xJG9pDKA1NfTJs2Y0MI8X\nIdLle+8xqgOZegzEw1H+fMA/0HJ3yizLVq2xzIfZ3rdUSzpjwO2RieOiZNc0\nL9qaGO0ZsvR9sF5bI5KyFUwwOpdtoCrJzz3Ox6J1DRvQqrsCqNxN4RoFP09d\nNbLRinG1HDJcsFOi2f7nfCDUZYrJcsnDmmlB29+OFk+tXWKgJep0FMBg2Srn\naI/SYpLilnIsE6V0jV+miwWkydwNV3EjxQwWTekLeffHdulvsqzNJswszdx6\nfWYQMR1ofFkH1grpS84nbYMpuLaNAE+b06SPuN3Ekh0w0IaDkExh666N7EY3\np4TK/WCmEeAO6szL4rhDhPt+Th4nSc6JRMS/fXnYN3a6mjRHdGZfmaedTeFg\ng3hq0x/kK/JCbdeEaoZJYrqr0tyD831uINmpI59Of0ZVkYgZOTa5o8Bmh8Oj\nxSwuaiEtzDkWKC1Q7Da1jLKzlot6WKg29UmDW9pBw0u3vDyyvxEyRinJLl18\nMVVEtXE8JIv/Lc4S/UP7ReotgVO/jxwf3OR9vfGTbk5tH9G8M6SqeOrr7y6q\n1wqQ\r\n=iVnq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"8eb726c746cd82ed1d7d19989bfa6b4d5a7b2c93","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.4","@storybook/theming":"5.0.0-alpha.4","@storybook/components":"5.0.0-alpha.4","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.4","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.4_1547658675157_0.8793063076506038","host":"s3://npm-registry-packages"}},"5.0.0-alpha.5":{"name":"@storybook/ui","version":"5.0.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"41d1cddbe1111270db05b31d89df7585d1dfe8b1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.5.tgz","fileCount":137,"integrity":"sha512-eBrpTT9g8SwnbUL42pt/V6cFGVhe1PUxbFkY3Hl9U4fMfo54VNCGFyiKOJGsozYGSE5MgKbdP/7eppVcIAIoZw==","signatures":[{"sig":"MEUCIQDFHD21V4cH87rK2hKpXcGvFCCZaOVKU0Jhw9zYinlvrAIgBLdfx2fGj4EOz41PU1fwKOwsZaW6g68ExZ8it1LdAxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQEEUCRA9TVsSAnZWagAAQH8QAIgOWbxvoZaDCCmXh0dH\nSOXGpw+KLse4ouzD0lSY3tR2OfCIi4qoHEPVIFjf23QwOzpXXZrDoo6tspEs\nlR9M5IosQ71aP6D5/q8YTEdevJvUo0STBtSJ++dssbOkfbxObWd2YmtomeY6\n+cVlFfCH/iyF2jeC5Dfbw0+6XU1+0z1fcWen6Jg/BdgErPD+Bg+3L02/vSs7\n3w9HDSXu0GbVZnCzM4nYWD7HxOoz8nz2e4OvIn+VOyZziutgDlQ/6urXA324\nGyCIw8Gcq6G361Wxp1WwyOt6HZfqz/UGdgOJhxfZAw/012f4oQrQneBrljMR\n4LSVRrxFxTxrWv1F5jM9XGPiF6jBGS0Glja4MVGhz0T6tCusFkdJv/MKYJV1\nmEtwvdsnlIIJXneFn3mUgbiLryghUAf4aT6QBZj+T/XZuqgHnWC7vGwfkG4P\noqJ0o/Gspng2MUJbVXSgHtcW2d0Ft83/afaKdFTFc5b3gjX4tSo/t0hlRkma\ntAQ82sqm8/o+qfGplgGz2QjLsT8Z8YDtLklzlZni1/PV0IIAkzeKj8CagD8Z\nidyCcmql8aQ/4UDcUuhaPHtV4n/pAmQcZYKQRSkQrBUYBOYiuahZNXWbBV/p\nhuReRaabUOeL3WZb2SzyMBM+meAoH8irjz5UjLZ3jUuc1wnuT4aTGVsburzZ\n2GxY\r\n=PTfd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"2176cc520f41e8af86ad9c37370e0fc221f0d4cb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","@reach/router":"^1.2.1","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.5","@storybook/theming":"5.0.0-alpha.5","@storybook/components":"5.0.0-alpha.5","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.5","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.3","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.5_1547714836327_0.4623157294762179","host":"s3://npm-registry-packages"}},"4.1.7":{"name":"@storybook/ui","version":"4.1.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b89a669fa4c6bae7f688d7f595d83a0e02acb424","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.7.tgz","fileCount":170,"integrity":"sha512-v4US/NqdlvHMZ35Ftw86+EIDdNQ1vIk0auyJggb9OG0jvz0qIv/QGIUTqHnm2TTaMIPoBA1HLfqEEgARwzDb8Q==","signatures":[{"sig":"MEUCIAzYE+IEbHtH9+OptFwvF/plhlskgyKJMvXTIlhQw20UAiEAunfAneBRQzKUWlSBFn9tBmE6tg/eZy95VKTgxdpC/J8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQI4TCRA9TVsSAnZWagAAnoYP/1U/9JxRGe7hdV85LKIK\nKtQdc3h0tIwsetgqNEp5FoPn36klYpGsZNE20K5mLrQ6nn4Y15t9Bf8Ogah9\ngG7yw1cuUQVSjgylQRP2iCfjkrw9VClMF2VJY5YBD9zsZH3uV1S6uLqDA9jM\nEHOGTOx6POuHHl5b2jNtm0wjr++xD9eZUsiwt821BImUq58Z5MRQ7kXKVke6\n602ZiyALh51XHKEk9wLdadfQ/daTR6V+MaG32F9F6cySNCuziWJDXtRXbbxu\njKZlFflO+v4pP5JUDCyWU42lHHdVKEPzNrQLF48eC+kJGeb6K56pmq0Rp1MK\nw4OQhkatTZvQ2G51hbN+ELSr47Mdjbt7u4piow+xJkc4zs92a+JcTObmSF8G\nSVjtAOiU7Lyo5Ek/xA3lcHbFu3Kw1/lsbG04ZzkR5fmmgHc5XWk7cAOAPxEj\nASpwt88ZbJXdveNv6Xrr0Vjr8PYVsl75pEtNeiDedsQ4F0dLNL4uD2xeSoOT\ntZpaorlR6rFysmIVTRhNDS5bp/+r4QVZK/wvOPQRhzRIfM80IzeI+E431r5w\nElOBEN/cKCWJ5QWyd4w3AAsE060zS8bkCkrF9aklNdx7Pd0JNX45PosiqJCF\nBL5qb5PqA/FcjGNrLrEwpbd+5vpIKDa/vY0Cl4vsLXv62K5ddv+JIWHxOTQm\ngp16\r\n=HWOt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"2dd7af6e33d32b53df97ac172bf5fcf4e8609e02","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.7","@storybook/core-events":"4.1.7","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.7_1547734545831_0.8685441980569806","host":"s3://npm-registry-packages"}},"5.0.0-alpha.6":{"name":"@storybook/ui","version":"5.0.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"576f1b0da8b60502c0071653a951a6934aff91f7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.6.tgz","fileCount":137,"integrity":"sha512-C6Tyst1J7yBpkpAJ3m7KOgLJF3AOmxqhJhMk0yeMZWkPTXaJLbshnKE8dT1gNcNn3t5M323HWl7/nX6aJ877vQ==","signatures":[{"sig":"MEUCIBinVWbixlyCr8FPEg8PIxeyk9GJQVqOInUae5M/ziz5AiEA+7+lRdqdkykSzHo9HVnXquUjXdNHt3rxpsAL7t4u7Vg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQfoVCRA9TVsSAnZWagAAmMcP/RGZmbR9crVPrvEkgAfZ\nla53L2gcwub4gIl22NKnwiT62/4Vny0LF17VwH1KM2bFn4yUv3Q0eiheSCy6\nXH9A0zhVszvHKvOCCdk3LbIRVjo08IJwT2L0zc2nNYA8tdRH1UYHQH84b3jz\nE7IPUkVkPZUhj7ZSY7Eu5e1sq14uCq/sL/EKjSrZ5p57+Alxbsz+kfZau6lm\nK81MDY4mAmgGWfYLcZrXdPDvXbEytWJuepj8eJM7UWZenHepKhNlcGiITCxw\nRADxfzeAYAKANbMHsacFreiYxNb8w5cP7pPccOVBGzxMS1ZTCY03VpbLFDj7\n8LzwBdZSldgQDfbYn8a0xyyJlTtgZ94R72e9sdmJG5tX1RtnTh+DSMxBnfHS\nIPL93s0534B0lw1Wetl72eW87NoagYvW1c3WjCgJLk0ihJSbAbcit8vUXSyR\nb5l/++paDVcTck2vvqlTOgBEFNahfM4GlfxuT2s9VWxcrM5U9k0+VHJjYlFN\n2pZzqDs3NFJbH7q9zYWQaf9ElqnP0ak8Gkvmk0g4wk/zDtitZ3UAGak5ttCh\n79H3hzh5uWkZgUH5K8RgATV2Ho/jRw5bg7Lz2mpU5wJN3HZp4YDlT5JrJx12\nGR7z+cqdS4aJXedanRLHJ3o2bFFzMwp0bwdKjFJxXaw8Z5FJRsx7igCpaJwE\nIgxx\r\n=jQAq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"2d644bc527d066e70a5c42016a1cd8a5ca7c9c11","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.6","@storybook/router":"5.0.0-alpha.6","@storybook/theming":"5.0.0-alpha.6","@storybook/components":"5.0.0-alpha.6","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.6","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.4","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.6_1547827733178_0.7742319045079658","host":"s3://npm-registry-packages"}},"5.0.0-alpha.7":{"name":"@storybook/ui","version":"5.0.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6081b270316a5c282b7e5e145ed572e7e99debe2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.7.tgz","fileCount":137,"integrity":"sha512-zTtZlnghLFR8U3SCC8V/u6XVFzO7jEJfZWA0SW51mQTXoUinq65hAaiAboFSKVQe6SIcAbrsAe6TyZByogh0Jw==","signatures":[{"sig":"MEUCIQCospdsYHwP0dTWRTVV7ZvNrCYefIEvu1zDUfrTBV18kgIgcu5TbzdW9TeDLhrjR6nqjgJD3GI4S5qX9A9FJEkINGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":538620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRDZXCRA9TVsSAnZWagAA8XcP/Rg/GlxWOiJ+P9ttripJ\n4h50GznnKYoPxpcPEQV0TcLqD27hNhww2vkgPW3dOJDxh1BOljiRuckb8c6l\n4UCatfOwUtpEFhkoLaLyR9YKUamdCrgcVuXiMdc5m2WO0S3t9xVbFp8StC7n\nsw/W/ZaO0IcbOOxqhvAgKF8M4ubd+QtaWKDtizXKadjbwUqOsPoOLxEItlbD\nRfAuufJfX/r/A1gHXRIzLoLMnwvLuvnjEOQMVBzod3+tQQnBk6F5tRYwNXzG\nu4Nf5QVvqbP7rhhH5BtxrQH45vXYOl5oEglr/JGdvSvzVNVwBmSZqRw0z2Ew\nEQsJDhu3VIgOUX/hwvqr61Xg5x/vsyMJ8Sg15ln55lJMGu1QvAsfvLtTwqgY\nYefsq7ZfHb7DNtFyokHWnK8GqhLQRlgC5jKfr9Yk2rK5RuoiYjO8VBbW0cby\noaIOsCmCRMB4mnKGHH/HS6LAuApq7/AhbdbtvLZk3x2O9KcMf1DvgHBcyV0n\nFE5D7b5ncsax9znoIGy1bWt/W9ZCGbp/henCizsEfoEz3D1KRAsGS9W93y+h\nCC+ZZRyYurKLBLq5PJqd5JwuHrdZvgeTcwx02o/edyxia+zJ0/WvicEcP2ye\nem7mvqMM/EcyWE806e3Lipyr9YqrWAns/vtizOwnkHSNcoQclG7DPS83SI44\nB0hc\r\n=1dnP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"d262ca75a0459c1e0dbd61a945345cb68eb622ce","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.5/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.7","@storybook/router":"5.0.0-alpha.7","@storybook/theming":"5.0.0-alpha.7","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-alpha.7","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.7","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.4","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.7_1547974230433_0.05285573726678794","host":"s3://npm-registry-packages"}},"5.0.0-alpha.8":{"name":"@storybook/ui","version":"5.0.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0b85f8c96d18edda77af38f4607e803e5e5e9ac0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.8.tgz","fileCount":137,"integrity":"sha512-uf1uyut5qkEEf8RDiTRNHM+zvYsUYSb1hvxamVJBA+plvyibr1qxYrlubS2KgQFh9259EtSKDgV3YllyL8q0sg==","signatures":[{"sig":"MEUCICiyHTn6RAt6f9vR2sYJw5gs+R3VQMgzDlQyaSSS/DqaAiEAmnumfnC70jFXcRO0pBLrQiAC3v4pNMCFfNKMLUwNQNs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":614676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRt7xCRA9TVsSAnZWagAAGV8QAJK4swODBTKLBIWH7B5P\nPf1ZK4gutfaR8Kh+aKZMTFWeNR0Zm77pEtc8rCvZVV8l0kjQ0ky+nwJ6uur0\n6iOZ/aDBh+OWV+bMMWkDTTVkQtcxrZR2Glg+0Oq+C/wu9cpeyh9pVC1SSGR/\nhW/FAXvT+PHsB6GBCx97MIy8KJ4BjCvfbd43plkUtuQJvzEdBt8iD1sm/8ZO\nbO0xrM5MwEJKJ5Nvg2IvnPganWm3DrGWog6vqvYChymw6sQbQZ+nIT0xRFbd\nrEUfdZhu+6dtOLBY5QJj3jRrvxqkDkSZ1VjoNDE9eJejEsgSEIK6et5gPHxN\nifZuZdRbKu/mY3jSOKv8QpJ85gm6lZeE2R1NjSunVXPG13TU5YYl7rU7DSPZ\nJxiiS/+Jd2MTPlklkohNK8BkKDnceQuDVZ2o+T/qmXJJ5KgA1IHZKvyn7bGJ\n+EE1Mq6FEr6EZZ7wK+Ebc5CWJBnaBnvlSLKT2NCK/cVp7fnMXr41oU1qwaf4\nD8PLIva+OoNi1SnDYXRsBGkQ135QHL3p7blugmmKKqeg03AnUSHsAyZLy1vE\npG5Uyn3I8scvDZ11IlLwwKUDMqcenDEj12KXGrg4Ls3Xzo874TXCC8RkgXZa\nK1XLGbc3SuvzkOwU5O9vp8lEpHxbq3c6MwdqtrAMMYKQStRqf5k/2apx09Kg\n8146\r\n=8upc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"80cb13b705105b80c53dd2966be738c54c7d5fe1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.6/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.8","@storybook/router":"5.0.0-alpha.8","@storybook/theming":"5.0.0-alpha.8","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-alpha.8","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.8","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.4","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.8_1548148465078_0.7093329960547488","host":"s3://npm-registry-packages"}},"4.1.8":{"name":"@storybook/ui","version":"4.1.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a90156ea42d335dbb67b2417857f877138f73571","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.8.tgz","fileCount":170,"integrity":"sha512-2STGvVSJVC9hcDtpmH+MnQ8X6s2Qd1tWtOpIpV+36S98/iQn8ZsVLz+AJwaFEyfqP19fUrC9mh8dMeeCZqw5bQ==","signatures":[{"sig":"MEUCIQDgRDsPuoV8tsBHEtFbwAfrA+MkJmNXMfhzVMhPJiRKggIgaCaQ9nMrBAQWpPFG9ukZaFdJlJIgiEXEw4iaYoqwuQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSEJJCRA9TVsSAnZWagAAVGUP/3+a1hiVFipmgu9d+Lfc\n1mWVlQEW7T2UZGVVeq3yib7TOjnTD5UXwFYno4CvzzBMa1sJkoioR0KiDUfQ\nKAr6pSHHy9AI187j7T/x7Y3GX+zM5BZ0xbbm0s4m7KdXoFVxVxcxZsVk7+jX\nuPo93thI1AYOGhk0rGp9s9Aq6RKiNPURyCbbrbR7jidSmBlXs/rBVXMs1s+m\nmJSPNuDdfDveFs+6xa+bZGttuIzd20OK9EneyIn2PF2KUA9EkWFln4l7QpQh\n4u499CQMGjHOrtetFHJJBCrGBWMkLY1GIH3F4CgEAb5q6jIGU+F1KlvRtYfG\n85/8uHv4ffEpdhNoi6INyB1P0jS3xnj2k3e3aJNdZ4jkrlxyphz6/hpUg8vO\nSnewRFgXGZj8ikgyHr0ZsWpJfYaS67sv0CUsR03ZqpCv+SxOj82LkULkCIZP\nr1Wh0Id05V2AVBklM7/RnkeQB3P2aHYBPryQ2BibVWwCVjUQidKzwIKOq7Tt\nd6mvuv3hkYlBqM6lhwwr2l/L+M98+OAN4IZMKxLbUDbNLY+YWF3DrgCy21TE\nZowzimAp9ntQhmy7ATsdIo3NBBpEP0Bvsorf8fSEfI2RmlRswM2MtiZtaDD0\n+rurKRgzKH8dhKeLmR1wraCTEl9j9olUvo+9aAYz+C3Q7IDCOpB82wXrSvos\nh13o\r\n=Dt18\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b9df11de752f31c0cf49d28f7a771e841d670a65","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.8","@storybook/core-events":"4.1.8","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.8_1548239432539_0.6484646701454677","host":"s3://npm-registry-packages"}},"4.1.9":{"name":"@storybook/ui","version":"4.1.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b27a87ef85a02962344715bdc70ef70df059d936","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.9.tgz","fileCount":170,"integrity":"sha512-DFbQoAKfwSnPTE4fy+12OULq1jmWowBqC74PpO8MU0Nu7pW+ADJx+IoFB9FRr2tR9VuuTvu8wVZQmU/Vz9vYOg==","signatures":[{"sig":"MEQCIAoqKdWIM6yVDFGBtOpogYOLEuWCUbmQxwLt20rel6aZAiBtG1Ssu3vyKibaFZlELPVKgRRwy+TTVqTH0Bw84mwxDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSEb5CRA9TVsSAnZWagAAS9EP/AzYJb5EFeXXxBpC3yjS\nKyVZZ8x/ey5ZOmbQpCmI2DaKDd6Z1mLali/35dthma/LyLu0TNMFBaJBB9b6\nBvthdGzMkFqjGul21c6khOrRmj6CTYi/UBlKpGwM5izwY+au+MLrP2NAruCy\n2UXe00XcQWHBo9PnkISZItlGaeVIwMBJRvHkEgC81EPhnVt4JaDTSkVOfwRV\n1HRb0Ra2qRZbkJyNGnvS8p1XG51Kv41NrsNqctt563MFwxBNa6wX2uKozHeM\nnubHeEcNdeKfhfqmsgO5nCeDl4Tn/iHcSbuTFC3JZdsMzMaMrdCMnIfOOwla\n8P4C5a2Il/nrvzoMvPkt+PG4gjMm74QYaGXvt4AI8HTWfsYXps3ChZNBFok9\nS4kbTL4/s9e1CtrOoBBe5cvAU6E8oTUa9A61JUx4dar2BaBZ1m+ryP6eVYQI\n8Vf2djFQY2l6UTF3gezpA+dGpFMFFFVLuxLw7HSrUlJKTflwTLlsG3Tu2XW8\n6gDBl6eNzEVH/rYsdLt19WIxQcICPfYK7ECyc2qURVUN9fRZid3Pr9fLs6Ym\nMVkwBByScOqpzazauNTesU/Kn3shaWSREO5ZqdFq/oaRp++5hp31BoQXTFmL\n8wYx9TLoLi+liFA714shBzwqg5WnwTsSxfnIMVprpOSVGFswrDGoeZ2iBUSq\nmEyi\r\n=JdZG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9d5e7e96725415e06585383faf4d70ccc94a3ebf","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.9","@storybook/core-events":"4.1.9","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.9_1548240632706_0.38674434302612615","host":"s3://npm-registry-packages"}},"5.0.0-alpha.9":{"name":"@storybook/ui","version":"5.0.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3677c311c91469c604d3dfa971147883b96a2aa9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.9.tgz","fileCount":147,"integrity":"sha512-mmGV1ML4zTx6kb/pb8c8UFJU/GH69gyZlzAh+W2+dfwDJCnOaKV3iR9Nx9hJa4acArjOrI620V25Xcm0mNrahg==","signatures":[{"sig":"MEUCIDdu70uJM6yy0v0Tqg7Bf/e6cSh4s4/aVqTkQWIm1/PUAiEA9ywPuNxNnUqW533qmAgaJYcsmcFi5fDA5+Q20rywlfg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":662849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSG9FCRA9TVsSAnZWagAAZecQAIfFPTdESJfoqqySw9Ml\nRYsAW3BUPwM9YDOKGjDGYsKVM0dlVdrFmpxW3rq3Nfo2xw4FGKyebfDn4bJB\nGeuP8wvl1m72jThChxN5bF5ye7gjTJJLFFvPieo4QeFDbtc3AuftHEBmmoEA\nIjVPmtdKhDNKSxw4tUxe3FbHjlp0RqVRxW69gAVLUsdMMcxXZQinyitjLC5U\nbNdfUv23hUaMbbCMSN7RfRKlXSeIf6V9gykPfs+8KlsYq3iipyLV657pefhb\n/djU95DFvfSLo2jLODY/U3ICKceACFCMYofZpXQFSxUBbx8cM2TmIwPBG0XX\nbdWYgH8qr2V8p5P6SmAoXdX71PeS9hCg3vSB8SlMmPZGYXADAR/WptzDKCzH\nBgIKF3mwb+3jXttMAsZL+/FPB6dT69xXEtUXGyVLsOy5cdqbWo2xLzgrFdZ6\nB02G7L5cq/RojY7wYVZbXPKfdD30EpzqwI0byeIZnBYuSTvdjsY2ZspMXgja\nY0ir5+7K7isWKbRFgn+XqdBXQtcmzk0OMuxhX6Jp30PFtJ5ia8zbrIKu0MsS\n7xkZjE0vBRYUg5NaCLLNEG1O+DuBXfWDe1TSw5LBvhJoc5BLzTvNV/j7bvQ5\n8JdCmrGXnUCpJy/e+jKZ/4JB2amkmZRRuncRBeF7naxRP4ew6DOWLSqh3sZC\nUpCJ\r\n=uaSn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"dadd88fdecd88a87aadf528f243ae4df3e835324","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.6/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.9","@storybook/router":"5.0.0-alpha.9","@storybook/theming":"5.0.0-alpha.9","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-alpha.9","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.9","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.9_1548250948719_0.8032118232919028","host":"s3://npm-registry-packages"}},"4.1.10":{"name":"@storybook/ui","version":"4.1.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"59cc5263699999990eddaf70d8e251e0eb7adebd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.10.tgz","fileCount":170,"integrity":"sha512-s9gbkUYQnmuUIIUd8MoOMiZI+h50joxdXvOYyvjXGbpe+HGmJg20gktKonVUSMmvXJCLEa6/Sju3n4jvHKJTPQ==","signatures":[{"sig":"MEUCIHE5EDEWK4bK+Z1ACuAH7tjFLU0c2jFmEMBuNWDjUij0AiEAutYenbjE3S0MVmsJhRar5CBH2wGp0dCqjEx3DgrD6b4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSc1qCRA9TVsSAnZWagAApX4P/R1J4+0x2sUmBu3wI1yL\nGlHdJwRixyFnCp+1p1QUtWU4lhUMUytNHhdCwOITRkSePR257PEXJSBOzdhE\niEQd4YzpY4NShrz+RBLXUdUSaXyx4fCb/1Cg48SOmhcBJp6GkPTMXsee4n0D\nnsuOpIwnuGprUSKjII4C2A4blrZAbfzc3mpkjxryThRBtebk1ssrv2liko8v\nxdlTInfHJNs8czta68wp6GISBW1r9lxU8luo61b64Qw+ACnazuLZvp/fSzT8\nzNhca6ze3CpOaDUzh6FF2f8QuOlNVxTEIE3Tkm85cnb2jqG7IWp0vKLgOy3g\n750oO5wd/bZHjPrMWpBqp/h67q9/oKyoKlP5sCcH4cRbu+WYcR27BCJdShfS\ns9edGs3T1viv4h1NjR19t8zow1OznK8y7j3fLLNSOmK6EM5Mq89aMElMg21l\n6RqE1W2hEeH3RDCBCex/WYxzbjtlGBLNKiyLHngdUxFaJaiy9TqFtq2NXHPy\nYrlmg7BEia6m1O+izqYQoASgu/fJ8TGzWq4CHIZ5fbTsLE40q4HERX5Ehr7t\nnbKcHGsTiHbKmbCDsjG7Sb5FTite6DJTl0rK8dHv5j7u65IYA2YbM4Yh57uI\nvdIwni72Kp6nQyYyfWwRg6/K3gdcTDW4TUgX7QOaTmzeZmVfljthTaxCdeka\nDDz1\r\n=uUjQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5860821b9deeba32f894f6483de72455597c4d79","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.10","@storybook/core-events":"4.1.10","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.10_1548340586057_0.27667263875385784","host":"s3://npm-registry-packages"}},"4.1.11":{"name":"@storybook/ui","version":"4.1.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0c6fc34a8096028ef236a5196e7b91831702f2fb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.11.tgz","fileCount":170,"integrity":"sha512-bgIagh2Z4flGA7jv4JN++ThLwGq8CI8Wq+1/vhCiTxjTE3H1j9VNPdJfhNgxrQypcLRVHl5AKhf0mlSMyz0S1A==","signatures":[{"sig":"MEYCIQDvcIAXLkNEZxI11FwQPL0kmDF3bG2kzO44DPMF97HdWwIhAJMm0yS+FbwDkScAY3zyaBsgTMnrW9QXCYho4KTzcCQs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSdCQCRA9TVsSAnZWagAA8KcQAJHjevrzpNTXwKRYfCq+\nyND/br5JEnq3I3VSbGTLLvVKYzK2ZuA0ctemL7JwNYkD88oNUlnMV5B2F5Uq\n8SOMWx1RFfQgQpUxFEhUKTh8KnNj1iBqgnYTBzNo7BuF8nxXUcc/H9flG7PH\nuGSE/iNH6uYcv8HQCCR/3fQ8H8naQkTi74c8TB8BS0Ns9Dqqf7CPyyFHiNrf\n7b0IfgI2wTDxAeNnA49nAr4W9kCp13nWiNxKwaY0eEmAAzOCFAbdwuNGTlo0\nAHRUn/BmoNqAdy7p7bjvCqJO9nxvu+ZIkLkpLSYelQs9HFX++1PYqfBzzIMj\nY7Thov4D5T6g0VzbPCYVuY/NH1rpvdOn1bEwFqX43rLmOC/YomyL3rR6afDP\nHjTz65F0HqCOlFJ2SorI5bEuFkbE/zewenJMuB0av30RxeOVdSpSwkP3oJwk\nCq/tU5ibbSstGx8oSqlBUiBAXbHuOAHTJPQ0Pf1eOym9B/ha3K2aeX76QY84\nWDqKuBvqBcTum6uuJD6nwbW+7eoyuLNaO79z31o5t8eN0iuPMZa6osJb435Y\nhXjUJZtBHVnfEQEFMoc3pc8ZDzNztEBI2wBljXSHXEWYgbPfikYiL5tc1lrd\nRQ9ZkuceuvSyYuF8b+IausDLO3m+VwkEfriA16wD2efVGZzpWBTVTbTfs69v\nsT89\r\n=SnI9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9f30442098e5350f5ba4872887cf9d1a03146e74","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.11","@storybook/core-events":"4.1.11","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.11_1548341392309_0.9620006852561613","host":"s3://npm-registry-packages"}},"5.0.0-alpha.10":{"name":"@storybook/ui","version":"5.0.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f47c952df266dfb6480fea8d121e4a29fe593028","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.10.tgz","fileCount":140,"integrity":"sha512-KCscyr+s25XoduBRJ5D1Huqw3MR7Ziu9U8DoOAxvNSnxqNDGR1N0B35nmZXFzl67fBOn77n2u3NVLDeJ5WmReQ==","signatures":[{"sig":"MEYCIQDyqRMlmMo5Cdy0cuKIm41R91Fnz2GpZGR0xhaeZDEbSQIhAI3zQrOXysKUb1Nco6lujn6WL+5XFyITgqawMRjJW9d+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":649569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcTooaCRA9TVsSAnZWagAAYl4P/2z+pytNOx5UwwWg0Biz\nCEIRssGP2B6iGiid5K/2sDrNlbDfICzX35hZ3U1WcKUMMDfAgn+qupIqyMap\nlSsqKvGlrGOOEYJ/HEEKvrK3kxw12M1z6cw/kv4vv/4DbCE6j+MJ4qOe+fFu\nQ3ZS0vJ+Isgf0i/VTS3wcse2/wkZS49BDXpdjFG5BuzrNR8bnBkLPZrIWDvQ\nfQH4uJvPCERVX466tuzXLtBcENoFOjqDdvlLwF+3WbSlJik6h+JFjBCBAuQb\n1KgZpJV78hp1b/cmfH5m+Ni8gQ9EL4SCsOQJ963oj4ARhm0KW9eb6l0TUo2H\nW29rcEODiU9soVgRW6M6mXb54i6QUw74yxh0noy3xyZiV8qK5E2FbGCoOQa6\nCliI1CeNi73jUik/8V+jeGtjsbqIyYvZK5zyT0hvbKUJ6V/du5bQQEqZvo13\nZ7AVJ4gU7w5hIXexYXGznzrIDXoCSZ7u8dpW1BHBgWxurw9sGOggfrD/Y3Eu\nYs+7NMRccvwcjUYRd/ZBKxhilCR5AIQygapR6bq2xCkQfE2gXr6Bt/yB/60a\n+bfWfMmJnm9/OR55o8Yxf+N3SQ8aO+A4QqolsA4F16oU3WFcEu2CDuCMtbyX\n1a5dePKj/25lr1maziIQup2RHT384y9YqZ+aekiU6OA44WBoEAi16NjIFZLV\nPHlW\r\n=k2eo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"aed4c6c3c54623433e25133f39c0a74691eb4c19","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.10","@storybook/router":"5.0.0-alpha.10","@storybook/theming":"5.0.0-alpha.10","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-alpha.10","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.10","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.10_1548651033449_0.3957906300254874","host":"s3://npm-registry-packages"}},"5.0.0-alpha.11":{"name":"@storybook/ui","version":"5.0.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6b35f5ac501d2bb955ca1f6770cb97c8562029a0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-alpha.11.tgz","fileCount":166,"integrity":"sha512-4ZTVuIZcFzzwBK8xOUinEufvld3r/PsVZpQrapyptRg9tuFU0Yjy0EzqcslVk9wGAVyV7QB1XX+2ig89FF2eIA==","signatures":[{"sig":"MEUCIDF955jFWR5aL9GUTpfoGW77qH7+Rs+Ol2gXz6bXWYfeAiEArPkMIPJq8m3NyWNrNomkiTuN6X7SLp/oA2VbonT14ZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":898126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU0GSCRA9TVsSAnZWagAAVY8P/1LmPpLMQPl52ePQprv+\n1SrnT2vudnzi66OuOmLmVV9gvl2yemsnFQn6dHsEMgvpuXIWQbtGAf4gDQrI\nwgupTG+uqNNkAqHNvcda4Tn5klNDahRnt4Rdv5wxx15OkEqgt1Lb+hf9pAVy\nKBpQa7O6asM4B4LDIrXTbGDiuSrE8Od9lX0RRBn6VqReRztONzG4Q+b8Tlla\nuBa4QgaFtkrmZ/EN/4i/EX8h2GoGqj2YayrYv/ORJxxFGoy6jB70rjNrNx1N\nXS467BZVQepkFbA6t7KWPu7HPufkg17E+dgeNlOXaG2NGNvIKQzrNEHJ/4bW\nFkMnA1JDWF4uXnh2wOWh7wyAsUjP4QtXLIwcPSO5HXG1ZTFnfF5vtkqjKBQB\n/RaBCnyc3FkGF9OrKDWrSd7Ega0wrEheByJGK9sl/phF1QA8iT6txbNa6970\nDWIkZJdIDaccgLsOndLgz7HdxF8dc59akOcglfrzzUybNX74y+Tavhq55Y0i\nLKQlzrFI65NXw2hJJHx2F9kqipPGbrZdsU4w+q0gxkq8u/+Y0KD4MwuMgWs8\nKjvww7LlfzMwHq9zQC99geJFk4GRqEA5WB/n5ZbG1biV3fiJvEGr9KpIARYv\ntH65mHua8JDK168FIRq6kr2hpHeaT4n8yI63N39+VNOa2HQmFjvjzckutPJh\nHFR2\r\n=sP47\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"6ecf42b4e75b646edb1df40ab7c306288c46387c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-alpha.11","@storybook/router":"5.0.0-alpha.11","@storybook/theming":"5.0.0-alpha.11","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-alpha.11","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-alpha.11","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-alpha.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-alpha.11_1548960144540_0.7325385118815742","host":"s3://npm-registry-packages"}},"5.0.0-beta.1":{"name":"@storybook/ui","version":"5.0.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-beta.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2526f89f74b8c75b6752dde4b909e649f352268c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-beta.1.tgz","fileCount":184,"integrity":"sha512-87hck3VeJGKhkr9QGomr8k62hcIoeXis4gLtvWyWgjFzZ6M0Xc9AuXNAULbIDhvQhfiTXhzJekDJE1nFuQsvww==","signatures":[{"sig":"MEQCIBlb0HH5LVYN3CAdzu5j/cUrledMF5oY4EC19MeWf7zyAiANAr+q5jIQMsqKm8oyiPvTjoV4fitqERoi354DS6fXtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":902213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU+sCCRA9TVsSAnZWagAAmkkP/RDVGsBPXDlRe3VfcKlu\nAK8mjUxUDxe25SRFDVdUvfZjge4ZL29Wo95vTesblW+GwP0FbhOduCRCr/nP\n/bzBcnLzy60sId5FcxK4HAnH3K1U0h12y52v49zt9VxhbVJdfCKdcBJvGDV0\nXVpUxS6ti1PIVVnsPxrnrv4lj9lOaAEPtBozZQnhT8k5Jpr81b0jm+BekGJh\nKKu+3LMpEweOuyJlPPy4WXhwyuznU1fUM+DOPgm6NXn5bhFo8iDlwDpoG6f4\nFKlEtRm7ODcHTafpIvA9I0c0DuiPB7B/e88SEUYUmESZuhzKwFh+4sRDgHMK\n9nXQOWrxEkUjzGvQGwhfs6PzOcNj+uODSIBlkS/GhzR7HWYYAYr778pAI3VW\nocTXHL1gdvNKsnyhvx6cIclOApDQlYlWrD2+8pOMl8OfW/k9yO2hqAEc9+JE\nKSeHqj7w8mc4hd8I1dT8gAGgASzEU8kJGu+HewKfxVimdiVvxTqf+TwUXCXK\n/Tp9r+s5Nd/doFPMjc0E/363iWqc3z7sjJE5WrFlIzn/Ji4mT73R9DSxIA3Q\noieSglymv8AmF9li6ilv8tkBB93LNEJzdAhA2UMRcGFLtwZlHnbJOHjZVT2E\nNU+MiKwpo1RdNz1/LnyFrvj/Qq2uxffAi1c96bd+BedKqpcfxploZUEws+bv\n05ER\r\n=t2f2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a146ec37a28ede67f24a9181a6be7c3df5f7448e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","fuse.js":"^3.3.0","history":"^4.7.2","keycode":"^2.2.0","react-dom":"^16.7.0","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.0","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-beta.1","@storybook/router":"5.0.0-beta.1","@storybook/theming":"5.0.0-beta.1","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-beta.1","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-beta.1","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-beta.1_1549003521298_0.2720783028759204","host":"s3://npm-registry-packages"}},"5.0.0-beta.2":{"name":"@storybook/ui","version":"5.0.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-beta.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"cde6f3dbe69c00df6ed6dc8540d1fddd7137ee5b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-beta.2.tgz","fileCount":200,"integrity":"sha512-h8ycAJ2ciXxzUZ1IHewTr9k3Cin/D0YrUvNuLLi4Q78dg4MErOkPf7idVZMcxqgtOm04+L0XCtsS7wajksJxrw==","signatures":[{"sig":"MEUCIAHs8Qkdp0vc5AU8XKEMQ53nSeA93Hf9PV6jgqIQQ6xhAiEAgSnEkIRT0DEERyQqoypkteRoJCDyZX4Fw51dc3esJ14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1084704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXko8CRA9TVsSAnZWagAAUIYP/iBKCAToRFkONUMvmwmW\nMiH7GY0Uo0SQWketXEYCGpp0xihC5L/2NgsuyN+iNqORiREtS6ZxiTvBUY3a\nbFAfOY0bu4m2DO7Vue/m/lb79YDfL12YhDkvI/2e//JMsWeReTQtFKuyHKBl\nZTfhPp3U0El8aDxxf9yxp93V6A6t+zqPg+ZauWf6KHJ9EELh48zTjkKDxm1v\nCZx1Bemg5pq5H8EtAsGn6RablWfp7Ny6aAF9+F6eEEV7x294lltIV6i9MPlw\nX1vv/ipGzkCy3FzeawEbt32uR5torx6voJEqvnirN13JgHGRFfwo99RG78tz\nQJMGOM/5CNs1mKPT59Ebctqx8jm6EUQxLnRPCkmNN3PLM56EXjV2zvmtoVMT\n4TANGQst7mxnITaVVAoNloyUpAVxe46Suk2sKigY/1uEO6ndye0L5CO8HQfQ\nsAgzi12eSr7pNECCddfZzsUgwmxl0+hJs8oXv+OjDlTjXzLsXVqkHCMowZzo\nwGq3O0CukQd/EYFZOCYEogfiVf8pJM4EqLDddiXgBx1F/3b478Ua64RbGkbV\nja7yqMwB0sAEnZdAYkFjlnNDBiMNiJg1vCnJlIfqRcd3QwkKq7jTLoEBe3a4\nHA8n6uvpIQei+0G3Nd+okuHbeo/7+OmAmShtVzbiXDDlVkjmEdhheuLqYn9R\nUREQ\r\n=wqX4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"025b9f48886bce334035c83f136e06c7a7625838","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-beta.2","@storybook/router":"5.0.0-beta.2","@storybook/theming":"5.0.0-beta.2","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-beta.2","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-beta.2","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-beta.2_1549683259814_0.2823206037838588","host":"s3://npm-registry-packages"}},"5.0.0-beta.3":{"name":"@storybook/ui","version":"5.0.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-beta.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"83678f177d46a1064c63f96182df1ab982827a45","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-beta.3.tgz","fileCount":200,"integrity":"sha512-oFVk33TWnvRAwJaN7iHX27eG8RCUwJNCA68FNW+1aon8t0HQ/yL6KgL0Yq2hJ/DRdMWXodxpiVRg4CWwwSmSQA==","signatures":[{"sig":"MEUCIHLSMYaDZO9yjbsYyW69uzIT5BjiaMY2pYwLdL2sqOGOAiEAyyhCk8Kp0xPSUBAdYGDYb0esTy4IjNwEkKrxth4E+Rk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1084704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY45wCRA9TVsSAnZWagAAGhUP/10sAPf7DXWi72nsSxN8\nhgrgesVkEuDYmCLY98t7tdqBN8+c3HBVfdbP0axdOl9PpbCrFwDEGheBVbcl\nj8wTb4JYjcQlrH8VK/qE0SvxYqKbW7WnHeoWuFZpdf+b0Y/A2fT7KQbVDqSd\nfoxeBA2+cV2BuSq4+BX+gPAIIcMh9GbHMQe3EUemA7fIRumYBlGONHuAuboc\nN244qvR2p3keUXsbPkg/wHaUrVaqos327g2A2zozuIYJTYFd2kOpB6Fa4e7E\naS0HFGok5CSISxtICjonGtxGVhGsfs9KWuv4VlDgWsgbDkWlblfuSVq+LC/F\nqINL+JMeNteYYvuiN1bdMNms4QbBweImrTGSinb2PllsPjU4xv87OAZj+exP\niW+Ja8POpnadzDg+Ka8VP3/+/1SnfRFxKL8BvcwLQQ3OMjiDYxG1oD/xRGsO\noAJKVU1ea7TeDjSGDLokdLoqPnoJZ7pwcbKAydZ5q5meU+n5LzEE8d8mfFia\nZ4XpF1uOQEcQldLGIvkIMZmFlMD//slwYH1KM/1z/WDX3/FHAA92tN1fzGt8\n3cxnKHZTJX7GR5+BM1WUmPsjH8emnWK57xPAhwJZi9SFwrbAkIQQgRI78SvS\nwe+aBq9rGOMsjcDZscXUYLdX+Eyl/16j5FXBrnEmUd2KefOSnfkBxrz+94ZA\nmfLI\r\n=1WeV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"247dd6a35382f432a39166615fba4f3ba59add63","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-beta.3","@storybook/router":"5.0.0-beta.3","@storybook/theming":"5.0.0-beta.3","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-beta.3","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-beta.3","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-beta.3_1550028399330_0.7022388392229377","host":"s3://npm-registry-packages"}},"5.0.0-beta.4":{"name":"@storybook/ui","version":"5.0.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-beta.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fade4069aa61b391d3237bcfa67b2faf4b5a0d9c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-beta.4.tgz","fileCount":200,"integrity":"sha512-MpMltR79CUevWNrMvfH601zMP/UJ4mhrA021uYov9KbHI+FptSbyehemPFP83UYJw6oWWlBDwkOwSeFxJNCiQQ==","signatures":[{"sig":"MEUCIQDvQkt3lMTWMT9KfbSIutaz8410ftKJ2Su8uoc4V2fP4QIgamcemA7bSOqwf1LiBS8o7TwDzS7hm8DmL7GqSorg4BE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1080345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZnjBCRA9TVsSAnZWagAArLYP/iVVYJmNzJFsy9GFB1wZ\nkRMLAaEaZZN+RTvNXr5k2OoV7MEjE5rBHX01PnIcOuhnyU9ArTlmafcvU1aa\nI8NbUBfUDq88foNcKUOjjHrT5+W7XAxosY/yHdLJWFURaZWtERWPGWO5s0VZ\n4jgToeao/wNW4mToHwlo9k4qPWuZqzwIGOs8QAe1CWN/GBR+EC9ZSpVPyTRl\nP2Ok4pxFREOZ1o8WJW9Nor0rMPn+D32MHtzAGQwsMvQxxbe6lHYHhAd1VA4r\n3mVGRpwEnL40fynqwXLxy3yCOj3tRgBwsG6NR4CYcUSubmRlKhAovEf7vQVc\n8iQ02BddqhPXhBlK2Z0ggOWxkJtrAwdcNjSlPvLwCjNtiaUuyiJrGjdgH39L\nm12jTlTgF4L+mpACZmWBm7q3lPmsUT7RtSEpwoIL6fzdPlhgWWjtkbSZLQmF\nGOOA/AAdj7s6WGZX0bAynI1DDojjQpRuqgPJzZR42K7zvqoz7z0lWmGS5OgC\nRd7pBWgDhhiBfQ9SB+wqfYBAgt3pDJpUCMwr+xHREd2TQqDgrtZJ/UZfmxwP\nzCRZ5zByKVdam+FqIzocMtf03wt+sO2VDFXra7tzimzCt2AjfIBDzU+KwUra\nBxO03QYbeKOXf7iC/oiJn7dQLKh4GBKLHr8fhGvoy6KB5t6O6LrkG3F3Vqnt\nLY4m\r\n=s8dl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"9c28b665825bcda33285ad6627999d55c7527bea","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-beta.4","@storybook/router":"5.0.0-beta.4","@storybook/theming":"5.0.0-beta.4","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-beta.4","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-beta.4","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-beta.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-beta.4_1550219457259_0.9026565010328136","host":"s3://npm-registry-packages"}},"5.0.0-rc.0":{"name":"@storybook/ui","version":"5.0.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"31eaa1871c3c251989b8c225a4c77e494391048e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.0.tgz","fileCount":200,"integrity":"sha512-T439ARYhbCbcxqacrCXOlKNPozRr1JLxte0sJfh4c8V/Tj9zK0PXzjKmRoI8dY3HoFZz/Pd4TYLrQtIMkU5vsw==","signatures":[{"sig":"MEUCIGOzJRSb4es0XCCIDcUBSJUCbFtHUe2CnPZ1e4REDJqoAiEA08PqhQXI3brmPThmQ8xyDIEd+9IiMt5X74GFJ1Mw4fk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1080331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaCPkCRA9TVsSAnZWagAA4FIP/1nkY8o/M7ylfPWmS5Gj\nUhyAovPVRDOR7wm0T/5jhkHSS/r/kUQYa6QPSbfm2UFozi+2AuGq0rlspkSi\nDbnYuTTkq7ZZZbbrdDq2IovbeWPb8P6Pi4HHsbkn1n/1iAIIpC+1sL+X07IZ\np13l8SNHjPuXEwaomvtxYWgBYJ6URwOkFhjOUro0ZkFzBX5xUbLTwCiPJki/\nCz5TGf1+s2ffocy7SZ8ehPDQzKJVzSI/95RBL78UWi0KiTXOBv/6zXR+sEHD\nT89KS5am7Pscu3BTtKBwZ2WV1DTBKYaCMNJpuLkTrXrqxNSMzjJ7D+ks47Ti\nxJDFgblVz28n3ddkiHhT0n29nyssTfq/xVG+cZq71qkns2EbsXUgFMnsenlX\nJOgty924vxuoIGzZkZ88wpG5Kt/gW6FM5/hlYdndloPlbA45QpHS21LOkywt\n2QBDpesnpNbgSJC8nBStns0pcNQcHh23ue6Tgp7bL7ezk6F6KfNvzi9FxScV\nyj6LLsCFO+tn7OMBl7IuQxuOGo0qHSm2ycNZzkEk/ACaAtJJ/CXUL9Eclzz+\nb8XX8bh84q9jb5iv9CzB6MuXB58ZZVV8P/vlgZpDS3cEwOzaARO/gxELQdW5\n73Pk/8giR3qGkyJesDk+k8KkDJ9Lxyz1/8LhaaanYVP1tfvlBK7Dlj44QhnP\nmZUI\r\n=C0VZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"93ad5297b92b4dc797961c4377cece1c5b780a61","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.0","@storybook/router":"5.0.0-rc.0","@storybook/theming":"5.0.0-rc.0","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.0","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.0","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.0_1550328803673_0.5461361543769483","host":"s3://npm-registry-packages"}},"5.0.0-rc.1":{"name":"@storybook/ui","version":"5.0.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f0e5e4858f098e626f9290b7db1de2499d2be255","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.1.tgz","fileCount":200,"integrity":"sha512-WaIkK0M7VfI2+qKtIwspTSQBYXqzvfXHzFjIHkyX35CiSotAiSZYfUFY8h8Z18urqn67afRA1b9+4ONy2V3OWA==","signatures":[{"sig":"MEUCIBoNzt/5kgOl8v9eIJ2eHDQsisYl+Yef9X8vkscYlVqUAiEAuYTTIP3ax//yIwzHkpeJwjtYNfNeMayRRboUanq9g7w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1080331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaDZFCRA9TVsSAnZWagAA1YkP/1eGtQLO04Um4+CaZugI\n9sf1Nc6aj3GOMoPAkza97ItNw8wbOgtGJYngTeYXbjl5FOBDTIQjFtJlFzgs\nUX/spr+8dlyhOnpi4nPIiO+KQnBZ/aLlgcz0esq7dQSkm7x1QHIoaqfC+XDI\nC9v0O2ksHMLtcsaRJ3er/OEzMmc8L1yU4dnU+jOCEvrdDxJFBr9B1gdVUO3D\nuNr0QFu66uzF+RAp9PsyRZHnqEZEPZg7A/Fqslx6WrjcdCEXXWS0LAgfRpc9\nQMYrGVo3r7h+pZurloA9s+dtfFQN21GK3yiXKyQldL226BRApqjlI6p3xqcW\ntDoC1/fCbtukLzXD+dgXDd/V7fTa4YwWC349syk2J1M3w5OaD9PrXEIVvClF\nT7UFxjSHMDv0PgrVjoNwnFZIigxk3SPK9iytdsllsHw5fgeIf/vYZrr5DK7g\n1CwLF/tAHiWVGX4Qmbd0xDhgngSbgkAEVFdwczqUxnxGJDOlZQq8kVVz4CYU\ntzkDGSrwu/RriFYwHVDGHxF1oN3hWoLRQ+RlfORrzZRRNDWSZ3TGps+CVqST\nVsyiq88+n+TMwciHPcOQYm4eAQ6ppUYuQP1OIvrSBgqi+gUhtu5seVoLEDzA\n+ElLABMnAX7CfGCmMZXB2hPS0hcyiaXPxkdULLM24yM1ZRu1qtm8fMqFNOce\neN2p\r\n=BG6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"22d3ee17e6f5931234951b6e7df43b1dc63f03b4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.1","@storybook/router":"5.0.0-rc.1","@storybook/theming":"5.0.0-rc.1","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.1","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.1","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.1_1550333508766_0.010217217804010303","host":"s3://npm-registry-packages"}},"4.1.12":{"name":"@storybook/ui","version":"4.1.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fc67abbc0c2d0fc1d0665fd34b169a4bb1c3c409","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.12.tgz","fileCount":170,"integrity":"sha512-LmYiS0X4bwdK0drHkKw3uEzfFe1rrARYmTe67IoWiC8+APihVrpJqgdYa4nbcTZgr1pUr5vKWtk0wXr76jbJsg==","signatures":[{"sig":"MEYCIQCvnrkDjly4LtO+v8drqLAkYykpjtHQUEdtOPN/3B5wvQIhAP015qBzGcl+SUBmB7KJM/5P1u62uuP06XVha+UtbMT3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcan2UCRA9TVsSAnZWagAAuJQP/iq3lFvTN3+EvSV3zHDz\ncdSaPXiF4oX269TrT3A48Jctj8Ylbo0B2ZxSjV/MprpRefrYP/o8MR1ScJTd\nudwGjsoD5loP6P7OfXK3ZQq23Y+zCbjXTHQ/Nohf7abGMxEAW0lfx222ublM\nGm5x995TrBaIvt1DZenIpzCh6CiP7pjOA3WDuA1UcMKJmLgUr8f78ShFAwmB\n1xSLgZKk3XJVlFLJzGp4zG1Fa3rg8uv/PTvbdzc67gKCBNBMKx0thv/f6Rax\nFh0K/QPgYvvQErwfAswj3xznzcsZsFDA1wS7NFOcZjo6l51eUsbWh7GzOrDV\nDjBn1zorJF28NjOkEifxQUBhMMC/wrv2uRgCTQIgrsFPD0wNFuol3OroFJSE\nLStD+vwGE04XW6CxQVrt0hSFtEM9KU/VdUT+3T40PBGmKb2i3HY3qUBVLkMH\n0U4+hY/RgbquTFA40nCMLnCXdG0zMIEGcEBxVdalqr1D3mSS/g3/yKvlhMg6\nVC9ACV78F4QcQAjXrvb/bqzt1Fx9QmAxybGXeQo9Eo6PsF7Bjf8U8W41UNND\ndW3Xa84bfdbpbryCbi5Q6qnq1sU/8JqGfuVH5JiF2X7U9xP4yeIc5Nbqs5Ra\n8T9ihu0IZ+WE2q+3P24O2y6mTbksFmKv6FbkHgIPOVhpXrClZ2V7r4i57Z3u\nX5Yr\r\n=CAqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"fbd7ee4c80df437fed4bdc6e11140733fd450080","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.12","@storybook/core-events":"4.1.12","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.12_1550482836102_0.4669513414591042","host":"s3://npm-registry-packages"}},"5.0.0-rc.2":{"name":"@storybook/ui","version":"5.0.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"826b08dcbcd4c20ad0198324337a39c37dd22e01","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.2.tgz","fileCount":200,"integrity":"sha512-BLY82hdHsaFAyMs5EKZ9DarNxpDGP63Fjn2HxqDcPiL5xGkxgCIzNKCp5dcZqJElESkdpIHU6i5z7I7McCz5OQ==","signatures":[{"sig":"MEUCIDsxiyY38/TIWoCKvk/aaE8j8tEMKYZIhCyuNoQbcAZNAiEA4WvMDsI8fjTmaru1v//YQhR1ExdXkmOdpyZtWdRrI4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca6/cCRA9TVsSAnZWagAAHcwP/0mDJdgeciL/PE8sF4WR\neEwj07svvBM7lSIDyMrk240LOvZzRCUJ8/l4N1MpbGnTEPYpoPk8YV4ISrmc\n92RvoGV1KXjubKjSeA3aDNy5zVsCdeqbVKHDTQ1SU4y3ALHT0uukttpuD2t9\nMwItgVUpATGHK3urbXTskhEyV9TjsjzBI0LmTgo9qyjD3IwkMWbB+xyXoPe6\nmdIb8itT2wgry8QYJv/wJq3NTIIfkCQxfgZ7v9SA0szoYbRYz5sMOtPPUux/\nB8Hudocm6Kij6Mkec0VvJ/SJWre+3IpjDQX5z4JNWzRYGsHMp/ZpUu1c77YR\nQ8MZkGaNDWaOWi70evMS4f4QQoxZi0/AE48fHDQ8LualYAzkrW/k1bsVqPKf\nj3wDAYggCQEKAY+G4cC7pADcSZZlDYNVLIcVHNYKhn2LEjxsnh6jiSGigUE4\nfdbciXD85NIl5jcJMsSdFYdQZYQ9SZ5Xj8dwQUCasWBxymO+2Z0x1O4n6NLM\nDT7wpC7LDCbuHW168nRUY5UVsA1VanirtccgohLtLQ72qPVbGaeLrQy/w7f3\nOtklR/ZkPpp7hvz8c4l0kchCkRablEgo2q4GDRbOQXWOKDChZH8+fmGKI2i7\nHKvfsg/xvjufZlxxmSnQtP6opIA/8xgpYcYZxj86I8Y7EVXX1wQ4UUbgSgQT\n2Tlg\r\n=+JyK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"71b2c9e5798f3768acbeabecb45559c07138653c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.2","@storybook/router":"5.0.0-rc.2","@storybook/theming":"5.0.0-rc.2","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.2","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.2","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.2_1550561243697_0.23492375719663983","host":"s3://npm-registry-packages"}},"5.0.0-rc.3":{"name":"@storybook/ui","version":"5.0.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"45e4c459d6b3357733f5eceb6b4536f8fef83640","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.3.tgz","fileCount":200,"integrity":"sha512-SVwliffY+Ko/fN9XSTNy7bGi7yRnXNRLx6mow3E0b9EfJL5nwRynJ3JaqQ2JH0Uv47nhGcnL7lr6oS2D8eZSpg==","signatures":[{"sig":"MEUCIGpLWX+g7cPTUONy7rulP5RspqxsiJ3b9j84snlUQ+U9AiEA+NcHpoQq/xKsYcx2H+4S+v35cFVDLt1RggHu//XasUU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca+fkCRA9TVsSAnZWagAAxWEP/1Tz0J0kL8xuA7VqXbND\nen2XFNtG2ki6asH0tPCYtB+Z5xwWjhj6IwXHKTbZrEPDec1e7chAd49e3Lha\nYzRdSeFmsnWJQxoKk3AGh2bZTCNYb2CZ70G53CxipGvfbDCdbcJQTDd+KTdT\njNf8RojzZaU552ZirrfcTMdHcPnmK/7kvCfwIP4BYHhMtWxoQ1W55r8dnD/C\nnIhE2wb+dc+tHVL6dArOZYQv1pT5eX54yFg/z3hswVuCLIox/G6cy1ufW4uN\nwMs+PhpkjRnGKFwzn2CAs6Gn/hv+rOPBuGecJFJswK4R9h+ddTD4LJwZ7P6o\ne2/2bWD/wltDAQIuUzuLorrWAj0USJlt8wcftIqcMgs8Izf0bALsbv+pFz0D\nRErCdJRTe7zqy+SQC04EZ+Q2rHlcNTJKZyKYk6bij8lr3sga6Chnuxk3VQoH\nXIVS+GGLgHhx2Sft2z3OP9bSVsSAQV4aFLomNMO1enSEOTpwpIl1HuyH7OcD\n627C5rOp5Pa3bwd9vTRbD76Rg8LtuYY2rrxdM8k3STstxwOyP3sOjc5MtrZ7\nh3isNfCsBTJWelP6wA4UXuh/h2nuTkIgHytNm1RyYnNd82Zkosz9/D6c44BZ\nYP7thkdZdf4xMSduXConFqB214QrRzq6HBwqEc7kgyYjRRWCdojj9BoVcB43\nzfs1\r\n=8X9Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"698f32e49855a5b4643436b693706865329a5b7e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.3","@storybook/router":"5.0.0-rc.3","@storybook/theming":"5.0.0-rc.3","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.3","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.3","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.3_1550575587973_0.9006234776163708","host":"s3://npm-registry-packages"}},"4.1.13":{"name":"@storybook/ui","version":"4.1.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d03cc70af8d42b847a3044389f78b75e54466d83","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.13.tgz","fileCount":170,"integrity":"sha512-GsO9NE8UWGVd5g/Q2Jmw7n7rUQTSog4FcieHwjKb3CmAq56BTgtS+1UnrLJYKSu9UOnA6jV5H7bm/AZ4FQeIsg==","signatures":[{"sig":"MEQCIDCW7LFjSMRfm+/F0ZREONHc0uUuyVtaZE5pxtkOb29rAiBoR5Pzl6Syh5ObTQbSCJ1chBz0eVPtMXqSJHj7jjbSpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcblrICRA9TVsSAnZWagAA/5wP/05JpDFSt3qg7X3RozXU\nN8hlO/fUxhiqXu2vF+Xbpg5aYnpPibWy7T74R9GeA9H0JGKZX32EsVOBReiL\nuVR6YCDpvDFv862BLNY7dGfblLwXRXXGGqtlcym4M/u/yO5vH0EJCC1EXnZv\nizM9oFLyO9JP+VHQ+dzTeH03SwCTGVxee/o5YIV6Jr5rg3nwjDXjDaQP41i7\n/NlVWh7NnMRvVcOhdljjUfCVRaAb3lXOGSStHprsxfihBdr3wQrdw+JF0adn\nXv55Q6sv7kyykz2McnjTOnYRKVUqCKbnvHm1uhW7gT8dQ27Qff63gozMtA3+\nOWpKQP9r2ZazSQnXSltdk2WUdaRLnBo4mh3HwfAwAQKQQng9Sdn4sCJSGOdW\ny2urHAT3yvQCkHmP+7kIE2S9452XkOp9IGPW7JXuiPQWHCqEY1WcKIE1yo8N\n+0HdrfZm3fUm2PwfnEyv1Nyxnbml1TvjZBQUzslwRipOLvU8VkgUFLLhuv1r\nmPZT9MtV6a6zuU8tvGfCiZKtAfNyFpk3QOZwtaiMexrWOEeyfcugKc6ey0bX\nf0CWabwo/DGNKVBfyELpPyXJCJ9X5sZCfl5YjCZPjF2EEtrgu3H4ZwopPwPi\n9Ll2gourf6I2N0R4fRIc2i+K6SWaFN/rO0B0whoFKX77F0rqKYuB9gGh4Bf5\n+DJl\r\n=WFKc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"c521ca3af0c7ec3b2b729bf134f96b87d77ff8b0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.13","@storybook/core-events":"4.1.13","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.13_1550736072263_0.21289490780110443","host":"s3://npm-registry-packages"}},"5.0.0-rc.4":{"name":"@storybook/ui","version":"5.0.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"952d8e8e33a26a7e4897205d30fbd7ec523e3a99","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.4.tgz","fileCount":196,"integrity":"sha512-SeGJSfdhcSnOlYPgZqRfZukjTFzQ4+pgFhHs+rNfPT/6z8BLZZdiap9zy7p+9C93Np9w8lZdEd0g6DwB7U38BQ==","signatures":[{"sig":"MEUCIQCRME9J2y57GncEWizhmFnYDerLh74lTj3EbhSRLX3F/wIgGgOvfCwPeiZwGsb/UgjNxZvEDo+om4Jz+KllQV0TeAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbnsZCRA9TVsSAnZWagAAo3QP/1WXYLu/MXIKCvlwbAna\nPc9aKMUhtCwc1dbNPYmJ66TAobJ0eyanX+COImX20vFsfD/B8HUIO4pP3PiW\nvYmJgS9O0+XtaL3lAsoQc4DOU6JTuput5FLN6EZ62VYMTtnZIlusqceMPdYK\nCz648b5BNCRXdcNnuhtEaxKJg4pA0HvHj79qzilxdDH6qczcJISymz2/KVWJ\nqjqKm95aqCDtI1UnhCkM5hM2IFOSAWVrTlpKEoPOrl/Uj5D0k2OfF21TWNGF\nKZ3iQC2cvn16+cWWR/sI7dgrUfCSHMBcXKAX24xqUVKbwFmjID9ntJOAuQuG\n/0khgx2W/0XXo88iUCRt668JpTBBAgEPbAoy9nJpw9rgbWQmIX4NX8b4E7mz\nyb+45ZM6UhsOdJK/41fJhTFM7dMonRCzKTRpiXjM/KxHWr+8s8FqCcEevkux\nb7sgpVe59Yh8+HErJI7WOEq034cURsNzTQ+qLkxBRAbnicsV9uWhr6aqRkGs\nCa/tbpnbtaHEVKH2k82C2FaCf+7SWu8OoJbj5dU71yG2PH/ev1GN3EqrU4cb\ngBW1c0XL+RoZzkT9d7uL44kAAz+3b48WbTz1jk6b2oJ2LbPF0UF+3KsLDX9T\nEDpqbZ5+VEE84z8PSFkLU5XeLi7j8frWnyenczc+kzpnUgntJGKxpezF6C8M\n55Uu\r\n=/ON+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"3ba5266050e404cc9eccd002b4b9cf9324f6d131","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.4","@storybook/router":"5.0.0-rc.4","@storybook/theming":"5.0.0-rc.4","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.4","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.4","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.4_1550744345126_0.38434348228733217","host":"s3://npm-registry-packages"}},"5.0.0-rc.5":{"name":"@storybook/ui","version":"5.0.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e83b593e3f33311cefd4ffafeb6a8f16ffea49ff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.5.tgz","fileCount":196,"integrity":"sha512-RHoHrQq5g//4M4V0saEiVSxXKQlQzqhTfSRKYaWJgcETp5Tg6NElLtqyQigS8+Qp2GExZ/OmEXmyqPZ4AWUNFA==","signatures":[{"sig":"MEUCICy4IktstRXD7zeEQUPzcrq+YwF464GkBxWBVBR7YijAAiEAulz4GtiRm20BSGvFl5xEQyO4N+OSNDwYGhWsrLNGs90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccQrxCRA9TVsSAnZWagAAhHgP/2tamWDihFMfgyWoWEJf\nabLkh4qWoXgWOZo1HgAub1k8iz3nDRZMVSLKW1xhFGdHzUdev5JzPTtvAdcj\nhRmCaKCoyXq4FxxIgvN75DVSkvgE2JWuCD6J88CXhx1ErMkTwrL3xcHRv8fW\neqmYPzo58rEgT1LzBNUX7SzXtBWhJwN9oMSmx7srMJCPaFN1zvQzHi4C5A7W\nE7wD/eqRa9MquZL3YI9RcRrW7QxBb51G7scl8RrlE4L7qwNcfdfnjByqRC3d\nsTa38vumaB6N2pBCsXxLAiEsxMxGA8/YYn8h1JdLT6vXmr4Vw9lYb0UG7lcn\niNHBYSjxNo+juYB5oq21Q/QKn1n6Qb0Tq1DNZC9sONcVjJenvgKk5MSPtIRM\nlrIf/FTRwfQ2M+ZOMmsDIcstv3jOMPy3kI4STVvv1H/hSJQN+9vNw/HT4UrN\ns2DkS+TnFwV74Jim1eJLCj6A1CFTjka1rPOIWDtWpJOBN2ZEKd68+lzXVseW\nICCPEdUEZqeX6jQIdHStwycFYo4tSfa448ypnDHMOHliSrYdMzGMRkBqd7su\nGdOhxFRpea3iooZWV0LbCjrL1CsXMvgxi6kPpQourD3sDteDylMwsk88rbE0\nJBJz6cqv4Awde1kByJn1A6vDxHKPT+Wh+KDhbO47s744JmvNwAcyDXJRBzhO\nzzjD\r\n=b+W3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"3982959868bdb75696444a25494aa73e9847b413","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.5","@storybook/router":"5.0.0-rc.5","@storybook/theming":"5.0.0-rc.5","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.5","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.5","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.5_1550912240445_0.015232803117688487","host":"s3://npm-registry-packages"}},"5.0.0-rc.6":{"name":"@storybook/ui","version":"5.0.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2feae85109454ad8439307467f891261f65256eb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.6.tgz","fileCount":196,"integrity":"sha512-RM+XP0/cdA0mqdN+DwaFdS7oe1rXbOCAee7a0CdpGMgp5pxbz83A0lMk1puFZ4pmRMIsVqvGwEQduR1PJs+wbg==","signatures":[{"sig":"MEYCIQD6EEP0XO6FyrG6FVOya4NBeweePVe54gUr1EZlguV3CwIhANvDaPPFyKsL9CLmKXZI3DpqQSeT5EOVHVKAfMrMywd5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdBMSCRA9TVsSAnZWagAADRgP/0GUsyTLA7eRpUMptf5y\nGH7jDH3ufxGByuJ21D99wPUFGclvUzKm3+d5q1IBG0bBcrfKQtX3bJl+401y\nZJNBVnSo5JX0XCpRgqz6J6SqMLn3yBSP9TkXQVtwcenMjYdu571c5Jmm2xM3\nOEransrFbk/Bn7orCRQs+KqvWfbqhsoXRQrTqRz/UBc+2metGMnfvnrTNid+\nRIyiREzGVEoCeHO5bIedNPpQ6be9kPO7Bj8OfN/nNJ6S3QXsdpyfMMZdwItO\nVgJAdeQ9TDhaWujeF3ZlAzmgn/hc7G6RDsA6JZyGIEjC6Dpm7F6aCmS2UvIu\nEdirR4OAmkrEVtNbJaYOc0CiaSsM0CTo2/NI/ks4VHHM9hDFFKhJv/k26cwK\nwZcYJL4q0X6YnNd2mz1513LLwbpZPxI30UDmQUPMphALJUZy5TIRFXj0U2TQ\ni14Q6aPfUHyyvG0VRXHCX7FJtoEX15iVqmcuzFgCwFtcuPP6ujVISqvDD8i4\n6210VU6zBxwv+X6KOBy/ZrdCi2wz9ACBU5ekjymPkWQoqEDHeLIqeJ9OPaLQ\nUZ82jStBxWukvB7ZIbROZmJHxIUM6DsusORBVmEOi0zfjd9ApBrPZZe8uwjK\nmk8cTzP9nAhSQclhGXXdUUu+TCDI4VVmFXOuoFLr/A01sxg5drkz0+rH02YB\nOzz3\r\n=j6Pf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"70ab48e02c501c401c15e73630919ff1bd2140f7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.6","@storybook/router":"5.0.0-rc.6","@storybook/theming":"5.0.0-rc.6","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.6","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.6","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.6_1551110930164_0.3263446125576821","host":"s3://npm-registry-packages"}},"5.0.0-rc.7":{"name":"@storybook/ui","version":"5.0.0-rc.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e4b11d7be1e7415e9ff7c00919856f1e83573a6d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.7.tgz","fileCount":198,"integrity":"sha512-uHPkJRXo97Lb81SaQ0xs0gCiaRt2qKjAxbVXdwZe2USSLmKAad4UlpI/+AiJGicxT0YFuod4vHd9rArH8X74Kw==","signatures":[{"sig":"MEYCIQDGaoIvszWMNTjud4MNbNQxk56TWI5p6LCvwqYsLD/a9gIhAMlEVWpaSV94RcvPJ8bEOXJd0QrT8Ggom2zc/nEe3Wus","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdsrXCRA9TVsSAnZWagAAvtMP/1ntcbZy9CVHocEoNrOG\nBSqK/aQDZNDFtfad4JV79ONee3L8cCAdBG3FreGb3zgvEKEEQD8M6KJyvKdE\n3ynF6JMzcCP3sSnbfTGC0d6KKMvAiVLZUjCHoDidz5ps7zPpMJbfHHoFqTv/\nPt17LZ1VZttdR2KOLwnWqgMfRUnxBrb595ji2NmHRtbGJxtScClEIJARxRp9\ndV+HmWBkozWLQgBg9PqaA9fcWVathG/5RCEkcJiXwLjyd4O/5xZoKIdNrhw0\nQT+y1Nkb5/ybMFhkj8YTfnTH7g5yd4cfGO00NNKdQjaN/je8R60zftftRTSb\nqciiziRORfKVE4tJSbGjMB/l0H7qTLjYEs/PdjeH3s2XLTS10Z7MDbKAu0wl\nTC7JnWEzypJi0Ej/NLy26fqtX/2hVCn7ln1eAey8X6m+4z2iLtkXK1UK4bHl\nISmePwwH4BSo4c+y2zQoYna/AZmDcOQz/t0Kz5mHkxkYhKpYNvYi8OKao6Za\nHlWiwa5iVazIDfF4y8KjhKoJbafRVJHlaZgdGNoSY2vaDTP7OuCZAiR8NoNz\nFbpns1tq+q8VC5ghk1+Pzn+dnOPAZZY198nUZCtHAMkdmb85DbhJdcA5u5L6\nHm8/c65SLu5njwvx5uOjL70itUA4IC7xluASVtUPJW7nKPOXtrz3qG4lckN6\nNG29\r\n=Lihm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"163aa5b5f386f3ad07d27f2112c82185c150c8fa","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.7","@storybook/router":"5.0.0-rc.7","@storybook/theming":"5.0.0-rc.7","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.7","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.7","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.7_1551289046674_0.10001734993320244","host":"s3://npm-registry-packages"}},"5.0.0-rc.8":{"name":"@storybook/ui","version":"5.0.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0335d05d187a0e042909ab2924f2961bcb64e0a6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.8.tgz","fileCount":198,"integrity":"sha512-2FkkteJYf3E4xLWAMtyU3vtI0k5nmGF5X/tNOdNZqByNwGqszR3B9YBjOh4bwpRWYQwu62OxpfRWCSQyAtiuzg==","signatures":[{"sig":"MEUCIFv98PCZ9NSmvzEdYNPHDKTB+6QuzjSvC9C9m4zrIkN0AiEAoJRJCUXP2oDo1ILux3F6LXeTtKWIGQm4GocoVv6bokQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1142656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceWrcCRA9TVsSAnZWagAAtYsP+wUCxqAGHHO3WvAZaxvs\nePc+VYC91Ge/Ep5UrAUYguR4JvnLljN1T3BxSrbcuZmuhFmmOL5Jy4LMFike\nYke4fQBt4YH7V1t7D5/6r/RdEdmwlUlgoqaFq5f48p8WPY0sB79GbmoxG5rv\nsBm+DT77QG+/aa6LfYnRfn7qBUZ30ybCyTu5IpSMuD5gq0/jp2i2LTDAEPJQ\nN8QfiA+vlT/n54WvFGDUPHQhalVs9SlU2KSUbazhK4uc7GGR59PdggfjROmu\n7eRvxnTY4ed5MexsSW/KWt7Tj/G45bu/tj2yXq3gew4FfVU1iVftpwnJk3Rz\n4RVXEC8uNCezZgrzufYvno+YRg6RPX+g8oc6vBGmuc53spgiMw5s0F8kr6GU\nUuBpmzpVu30V1LnqWeeQvMlqhyEixlDfmjdwJg8SbdTEL5CCj/5OGHFKvl5B\nx3M+TLvX4xuGbwmoyqA3cI3skY1vCse2y7VwQxzxNLdJ7uFaJeI3ciNeUqFg\ny1si4YTvgKSJLhxJxp7tTyoxCKHITL4K5iApesR/wlUC8HweFyNpELwzb4Xz\n4zKGJIkZUZHyfz4u0huD3i+4RFxCsXdS48gd0M42u2ht8dE3DJJZM1hcBLHf\n52PJd7oNvDLHIE+JxyCZF2JFKEXYWEbL+mAC3XEPCgEG8NIAlwHFPjuSv3Jw\n2t1b\r\n=vxmp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"6c1d4183d3608a3af6328e6d4aa706d2689a0320","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","to-camel-case":"^1.0.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.8","@storybook/router":"5.0.0-rc.8","@storybook/theming":"5.0.0-rc.8","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.8","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.8","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.8_1551461083604_0.7844656642620185","host":"s3://npm-registry-packages"}},"5.0.0-rc.9":{"name":"@storybook/ui","version":"5.0.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b1bc216c952db60c8fe8275b8390c2bd5a0fbd74","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.9.tgz","fileCount":198,"integrity":"sha512-UL8t4vFVaaF95acNEBq4vshoPklE5WjSoIJ8MKluMk/n2bWnXEpIv41EBcdmiI2YptJoYmtv+NbdZ1D18Z5wYA==","signatures":[{"sig":"MEUCIHQZpr0mG360v6sfN7stvZi3C27EvY2wHE2cKRn/I0wmAiEArMHQF0/QwsSzNUGI+Gp6ZU1gexnPV3eOVwEoZH4s1so=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1142444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJce3RfCRA9TVsSAnZWagAAyiQP/AuCwiGkTvP0iQZ6eOa/\nN/6GdNqCMvQB5EPQGFMb8lllavuiGME6kWRlguHsAMjzrr/e7QPxrLum1+OK\n3mTFNDanPX+qkCpIAFLwhEnQSDH+Nv8ph/S6LP+Bj6yG/sr470WvnyGV3RTS\n+L5iLtx+qCnEkJ8TPW/KrfEJge8ehAfeyVPo/tKSwtdelCxSg7SlljYOCdCL\n44ybwdbc+hNzcSXWfGbaqQUoyUfDTqPefJ1OUPj2OiYFjB3Hh5rqhxzFqj2g\ncKj8IBl26fHfioOQQKkPqH1smU9lHJkc7kfNcp6HlufO4YPGMiuGoE3CttMg\nTHvYSjehwJ9gfinLKIGEtdEkBscFqTM7OUB1GsMzw6E/u7PcO6v2k9oL2NPs\ncl9ra8lT+5IR+p0K4YCqnDw41fqwrMQVdd0z2H5BlLIMHa36Cvtyiz8JNAYg\n33Jm8PXAiN5A1DT0RofGpc0T2Ge+dcpAlaAUvtspYOueFXc6+rhN4HOs9lZ6\nke9GQZqVQ7uxZkO4kTeJBWSkuuaurOEWQpJt3l0leApwIt6iLlGitP73oJB/\nH07BtyyRiu2d7A4htk8nI9woEoFJaNxZAWcHj938a9pn1aTTCq7TGZlsSEHE\nBRZMNPcY7AY4/Ely59jFLnZdSK82Hx0mJ82xgCbCYg3Qr398Z7eaxWPtqvkL\nkqX1\r\n=vTJq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"d782ca1260df341cc488bc9a575c17c4e9e6e0ec","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.9","@storybook/router":"5.0.0-rc.9","@storybook/theming":"5.0.0-rc.9","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.9","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.9","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.9_1551594589185_0.3303147241596178","host":"s3://npm-registry-packages"}},"5.0.0-rc.10":{"name":"@storybook/ui","version":"5.0.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"86505558bd9716c37c8d1f29e1f6a0b397d52a8c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.10.tgz","fileCount":198,"integrity":"sha512-m7D0EMDftuEksCEmIfnePzKWOz9A3Th0jUejgDW5rPxkrE18tbuqToaDHM6hewc3bdboVDk/0YhHjhXMoT0gdA==","signatures":[{"sig":"MEUCIBgYuAFZm/j/2aWLFXLL5D/Yi1+ERviA3O0OQ0I8P72YAiEAiMthjL/PoQOAXaaUn+b8wYa/eoBZjLb5FplWJEXKsBM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1142451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfMaICRA9TVsSAnZWagAAat8QAJl3T8FrKhhD8Hhh4Qs8\nFvI3VQPhvqN++NvxJV4+uXMgSPpLn0gZK++FBRJeLYgdV2u7orf2ZhGptaQX\n1LhyUStBy3d//mWG/UhDzb4r/uEdfXZzu2+5g2voK3w5x50rDLktojCQJLfG\n1xKW5na0ZSSW2UNTIoBmhkY5xmNUrXJK6Mbo7w37DxWUKwXv+wU23U1LYGKy\ngRg1+CRFKUZzKbgpzmygIiZULcMnFF51hqUmoWQjZSqIwMJPwPVlksFD/J/j\n+4GWzQfa3tZP/q6EkIL/3U1wzmRZ8KL3D+hbIA25tvKhwDPaMEmWUtHBOqlT\nj9WHxeW438f3mNdKDOQIG8ndJctgFwpjeHTfXHQ2+SdRjiDWb7KuTXtHxFc5\nTJi4QDcaTPlcDndCou2FgL0Uiwy+b005faiUzwQ9TaA5uHbVQsouFJP0HO2v\ni12Nmqwqpt9lWaWHEn1CXoXz1c0jhq6bI4u0e/SfVU0g9IHXiEmGeqXDuGrj\n6OSm85uRsNQgsc3twS3Z3i7ZcVJ6QaZMC9aqSIUcWdVcYZxwzPTJc0OX85O1\no/0AXTs1qnumSG+7ETEIP19woIDgivciEq5Aibl4kDfodsrdBGQKHAM4JwCd\nI5giztpopEKxledk/JetHt1h88XZFqr0GyIKXW0OctNj657R1NVuUuvTAGFV\nv45b\r\n=aN5h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a464c6b23689223a452bd6fcb9956273d9b56023","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","fuse.js":"^3.3.1","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","eventemitter3":"^3.1.0","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.10","@storybook/router":"5.0.0-rc.10","@storybook/theming":"5.0.0-rc.10","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.10","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.10","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.10_1551681159598_0.6121401942177684","host":"s3://npm-registry-packages"}},"5.0.0-rc.11":{"name":"@storybook/ui","version":"5.0.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0-rc.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"dbe36ed062256e50b5e5c0d8db6e8ff14e49f433","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0-rc.11.tgz","fileCount":198,"integrity":"sha512-rt1uBfseMu+3zE3ofbNwPmctsmnusvROi4SkwqWrzMeeoRWAZqjsxA/3waaOO4EokwXs4WMKJVWjcZzjpVgdXw==","signatures":[{"sig":"MEQCIHuEQf05apBoDijJYHzTUqREihRSEo/dV4HX0VdrJNk1AiA4/slnTrx1oAgqVJoz8wZuogbkkEUzwhzWooX2HmXa2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1144697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfdx4CRA9TVsSAnZWagAAi48P/jCB+Y4a7VElb/P+MW7I\nVurlsTw32gDx0r4MycQ9KjCJeN3gd80PBQpb0zIyZvaG5bnK/2LF7PGHu1B3\nPu02OOljc0xuISz3s/lPzGjLtawi2bejDdx3MyPfdRDdhPvXdOaCuDTpd6L5\noAhmV4IEduHtkXlJNdlRC54oCrVM39N/ZI8sg4EPd7wNWoNNgve7RQywtZq7\nLjqC9OGOsC4CuDmrwyU9UWfQIbgTkRo0j9Y1Py0Hr0J2tlB6PLKAoznKQtXl\naPyJ73Y5rOQ7RlNUGzDcKu0xdbxkCTToxjPzMY1HoejkUbFDIETb7+FdIDwV\nnsRcr9SwcsUThXPXhPKQQ8ro44aAX6gbpompxVV2xB6erzCPkWs/Zgdjt7pR\nEMvosBuMrKBt3QiqJAVz4psN2KfNA4oohG1Isltit/ueg0Njg5vf30anc1RA\nSFV4/EX9nh2741V/b3FVZooK/se6JSNVmDQ2kMsCpe+T6IWSJnqWgVw8XaYU\nf3J5BIFdUmiWR7ODjJVP1kv9R+WgDewJ/nc2sgm5PHi+l8C7LOTCFTHPVRoM\nqy4Ymko7WL5uL1lF67xISN9GfnYR4v14whpWy2cxXEHcuVHu7Y9lHnyOi5Bt\n8mTlZOf2qUy2+1ll98XKxyg0oic0A01PXg7W+n9DyAinut6Qj4cWwZOPltvl\nQf11\r\n=Nplw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"2724eb7c21d0d28e9a5cf0abf314f2314f32d594","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0-rc.11","@storybook/router":"5.0.0-rc.11","@storybook/theming":"5.0.0-rc.11","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0-rc.11","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0-rc.11","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0-rc.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0-rc.11_1551752311353_0.6436739139420422","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@storybook/ui","version":"5.0.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a8e5bf56fedcfa4851f08cc40880e4bcff565070","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.0.tgz","fileCount":198,"integrity":"sha512-sZfdxfpVFNVqyMjaiG9dxpwqcfyNYWTnycADvYWR0kgVZx4sSwaXmcirqES9h+CJSXNpuSI4npxhDV3WT8qlvw==","signatures":[{"sig":"MEUCIQCGqWjW4CVzN5BsqMEmwGorO9xaGf8mHSJbJF1V6EIrhQIgOouoqN7s+MSpjNobL9v06xBM0bh3i900DZJoVYaBA1I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1135455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfin7CRA9TVsSAnZWagAAs0UP/2tYxFN7JfT+KJxsjlSd\nTqCCJ8DtG5CTiGKv//SDD3clVw/Qyc6lMp0DNBllbVF15fylLCTHpREwnq4n\ntpDZLW6nQlQuYQjFZaZAaI00WQQI7X9KH989xcN2Abom7QHt4ZhlEyvOINcy\nTj5YF81z6ZilhuMlv8srvRgvw7gtRIzyA1nJXmFNP86Xk8u7FFzLj1yDvx3C\nrNTa7hgAnFUZAOmwa6w5uFWy3DG5v1yAXY/GwioTxjnVN/cRKsWp4Vu73K65\ncqMHVUYSoZ8nvhVU87Hq20pPHkKvPlJuMPhm9g8eDLD+RLMsizTiQ0rBJX2b\n+dOG+FW5EgI8MxdOv04BbLGttAPHkbs2yBrvRTkeZX1FilaDghXYArly5wNe\n1bTqxYstfPuvpiie8zVRL/tQQ6wEMYi99Ox/+cX0gpywRp5fBZIz9+6UpnJJ\nspeCK2mHzCC1PzjdwMpBrR7cv50GNOWz6vlCppapnAdUbp+QDd2FtCVdy/w5\neIrzY3wOiu7R8VPbfkMH7HJ0Ay/CZ/phZGzpfZVHVWHVhx0rfwnbCnVPHPLA\n8mB6HaaxA3OJavuyqh69Ioi4jCaCI7bRmQto8r8scAon41C2aef/ZV3ydj5H\nMgOhsit9d0kDRoXLfYeSnrW9LsDlDWzrLf9XWwd7gYXEUgHxBR/qQrreHy5P\nZ5b8\r\n=zSYr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"670a682de384dca31c4ebc5c61a824f4d241f720","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.0","@storybook/router":"5.0.0","@storybook/theming":"5.0.0","react-helmet-async":"^0.2.0","@storybook/components":"5.0.0","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.0","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.0_1551772154575_0.6421284601927677","host":"s3://npm-registry-packages"}},"5.1.0-alpha.0":{"name":"@storybook/ui","version":"5.1.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"8dbcb06e806f1b50546d167e6a01d83998db2fef","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.0.tgz","fileCount":198,"integrity":"sha512-7v9AgtyEkps427pmUO/UL9IazzgZ8ajAHtfpKuNxjJtkMRtmMHkebWhl0Dznlki+Rnma9zH6pYQMEXI6FG6njg==","signatures":[{"sig":"MEUCIQCvxMIKfAYhNGfWq3CqGZc2fuu/OhVZhpN6J8f9hhZLmgIgPmTZ0ZwmJQcG6aBgVbLSST5o+PXK0dO2DNT9w6HbKs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1151032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfzQJCRA9TVsSAnZWagAADFEP/imAxut3ay4t6FsebyYP\n6nw56GRK76M1QLpaOD7dp1ra6w3zGA1sgGlVebuvvodnwkGJ22E3ebVYDFT4\nreQcx4CktFqx2wNhi7VbaEvJwhkL47Aj+aHZtwUMdvJpTHOgoYj7+TPNVtC2\njhopthDJTDb3BdbbZazSHsDQ89YVb68tenM7fLkVTL1OzrfpJQE463XRYgaM\nKtOUdRUE4VmjTHingOMoOhPO96OFDEJ9xOfm2kWOHEq3/YsjIDMlKu9QoAtD\nElFUekS6Awa448yGfbFKm/kB4HnniyZ1pMn3wftlrtUjPZS2ubaTgYVe9muT\nIr14vmr9AMV+RJT8N82q1L42sGQiQlZbIPZIWXexbs3BpjyFo5iDfrvIUcF8\n1v8PaSiCCi4r0eB9k2JvcmoH7skuiFUbf4yG68+vjzWMr+rgAVIZcPPRndUe\nz43LZu+ujbp/D6eAAl6jHOGIAFjuZgXd6ChdMFd+nK7YqIgkCg4miquqLc63\ni703jh4NtLIoOO125jgcswAx4VnNH71i5KuR6eLFKfH3Mgf93zJ0FVcddcCy\nUrS13YAmpR0Wi2gDrIJbZhEB52a3Lu2HlM9tQjsFw/zo+y1vbSBkExDym8LV\nxX9JWDpWNhA+SG1Ipxa6/uJ1s3hz8RCHJWPz+/itJNtAciNrmmEntm8iv21R\nY2Gl\r\n=jKe4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a05491b07af8d56addb15a1b7599c960b423af75","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","semver":"^5.6.0","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.0","@storybook/router":"5.1.0-alpha.0","@storybook/theming":"5.1.0-alpha.0","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.0","react-resize-detector":"^3.4.0","@storybook/core-events":"5.1.0-alpha.0","@storybook/client-logger":"5.1.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.0_1551840264708_0.717258783758242","host":"s3://npm-registry-packages"}},"5.1.0-alpha.1":{"name":"@storybook/ui","version":"5.1.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4b3a15226054704374b4a6a27bd46d6beeaa598d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.1.tgz","fileCount":198,"integrity":"sha512-EomnuzL+Jy2ebNNehsbncdPaEv+8CjLSP50Gyr0UnEjA12V4etJEVeZshkrRGEZrJm6eiIw0XdYjZAJwVKKprQ==","signatures":[{"sig":"MEUCIEDA3vTcWycrJX9IR66KJjuc4S7fSrfpKtJAYB9P+Q7YAiEA8/2gQh7ltEItR4uCAA+GTdLZ5UTrbSW8ruFAXvcZ9Js=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1151032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgSgMCRA9TVsSAnZWagAA6hcP/R84pdj/XJLt2ubXUNs/\neE/nkTL1klAPloM5s73jaMcT8cIsmJflbZVwlHNRWl/wO++uX8Wb1pvukzmu\nVVkoWi6Mufnnf+8xzddt2AnY34IHrPO7T0dQPPYzINw7xn/f2APbpRE4AVUO\nQWTk+VwpElQ+PAKDMT/48mWj+beKe1c0Lfp7sClAbst4aUVqOUQssy5X9tBO\nvtXZEXIpFEAfZquIAKdnjKHV/1MlZ8g7T9ttWRmM2VrMrDZ5FgpUCBi7+PEE\nzZt0UB7TL65OIDBA7fSeXlxMOml5lm7tPgHPCa0i3yH7W518KjbalWsDpNL5\nvDRq8HwH2iJLeGwMxiIZOQigZpde5UwmdEHWOEd3IS2wJ6FPwKUad3r7EknT\n4PMM0NK1ZQCh5e4r5f8kbl+0phBF4FjHUXHZrOLb5L1m/tEewpz7JJylmNzl\nJUohjLPikg6iMtBjXAjnOBtNhbX1g5ce1cuZROFcSsCB7F0KLuVkIuaOeKX7\nty1ByML4yBa3ZnZhyOGZzR6HKbLMwNy2U45zBb+VVy7A0qoyLor1j2SfyV/s\nWiTt7qyNACVUl7AIU0GZWhHfpdFJJCG1HNL/EpJdghowBILc9/5hFMKsombM\n1YL62sqJdpVTKsV/y4Bd9h1/cuahhTLIkgaSokLADyODUBU7T2XiOFhpoNHH\npzH9\r\n=tt12\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ed9b342742fadd5005f84bec846c0537bc13b4d5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","semver":"^5.6.0","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.1","@storybook/router":"5.1.0-alpha.1","@storybook/theming":"5.1.0-alpha.1","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.1","react-resize-detector":"^3.4.0","@storybook/core-events":"5.1.0-alpha.1","@storybook/client-logger":"5.1.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.1_1551968267259_0.13023513699416767","host":"s3://npm-registry-packages"}},"5.1.0-alpha.2":{"name":"@storybook/ui","version":"5.1.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f8736f9fca902a4781a69ed104e878009a0b357b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.2.tgz","fileCount":198,"integrity":"sha512-kYQ+WbXp7kGovE2k8LY1jq2akAXs5Tc8rJrqVnZKtTB10Nhe3qvY+vDwTl+GTHYzBmURcdD6GQaO9hBgbDFN4Q==","signatures":[{"sig":"MEQCIENf9hDOZ9+Gn3o4XFcC7x+uRoiGniMzF0m0cwqBRKRwAiACtxrk/jWgSxEIK4upt5Ms4cEtc2n0DTZKKWpTXhhk2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1151057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgkaiCRA9TVsSAnZWagAAPkEP/1ErGeuVVkI0ADWzzuSV\nS2KLGs9X+Rk0TWLcDmSs/KDuKu2WPG3axQwoHHjuzsSgxzzQwHIbmfusk7Oe\nfOhtQEzspsoS9m2s0BEG/RpK/Ad/6gGkAIduUYvkdiPaXWIjmOvDOcxdnO73\nkaz5+3i5l76DLHSNr9rER3qX0LHEBYVcqmvjsfkE561GPuJrB6dEaQlAhwmA\nglXz0HjH5uENUrfUUjVhMFaA6SmYd3kicnSSo/nC+m6hzxrCL0hd0uhnawdI\nNIeo6Q5wPe21G4CBRm7As9Z59uAy92Fe5hmj+52uYHxizT5XWsmAV07wY1+k\nlpM9YS8Sxn9o53NCspukDYni4n6ZhN5a92Zhu/ftzHoO2iDHOg/Rh+jRgaaX\nj4FgVilAUJk28zqpS740cKShXl856Je4d2BtGeevM2aX0LM/sOq9GvbRheU9\n895KeR6ZMCF73d+kdh4/5/UsQnQgydDcrhFnJ+YDpx1FmrsHpjvNkivEHr3D\neMmRttMhxm1cZWtG0YKx0vA9DR/oUz+gM6gPbMUlicdQqPTZOTeslWKu5AiF\nmhdyMMsh9sdt7JCbqKFMRTI8+euBW94/zI21X74Z32/PS7Nv/1c0fTSmH1Fw\n27hPgtatL4tvEgohwmb5y6Ls5ULkFtTgzsnaPD9fCZZ9mCabcL6Tcv5exSx9\nALOu\r\n=O5CL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"394cc916377ea71bfce7f3d9fc1e4c9f154f02bd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.2","@storybook/router":"5.1.0-alpha.2","@storybook/theming":"5.1.0-alpha.2","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.2","react-resize-detector":"^3.4.0","@storybook/core-events":"5.1.0-alpha.2","@storybook/client-logger":"5.1.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.2_1552041634034_0.11732376978902126","host":"s3://npm-registry-packages"}},"4.1.14":{"name":"@storybook/ui","version":"4.1.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"5dd50490fcede29d552ffe4e0870648a35f0c997","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.14.tgz","fileCount":170,"integrity":"sha512-GV7MKjcFkfBmr7odrb/oJJ2VlDE1kKXjOo0Fk+3jYhdOd8JHv60Xj5z7Q91xqxPLwThNUZkCMUeWdbvyYRykFw==","signatures":[{"sig":"MEQCIBUynqjlF3CEjZ4xvblaS5rH8j/HQJPhQvh2ZP2n9edsAiBdQvoRs6pRou6AImYKj8WsjZ82LEtrqd1yA1y9YuYh/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1003360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgodFCRA9TVsSAnZWagAA284QAJAHvbpI+pLHe5lFuJW3\n4DlrD8mFfMSGWby1sPbXH9qchrKqJWryFncErvoeuiyxrLqiIOzQKGTWAWjz\nmAvRpvljgT8M5fIeXRvKbhhtoF9C88U/6Np5rycvzc7mgGbeKHIC9pB8NVIf\nxijS0E76SUnpSkkTUYu1qF6mOxKCOGkhoH8QtYkcgcm/spQJ9No7rplY4lSs\n/h2zKjdKVZ8AAagEdxXWWrFtliyoAvj9+orhld1j6j+IVXDZNcDU7bSTqYmJ\nUKp70Y7eM/fDEcVn/KRGtVFSTWMpCcQ4D7jBGnG84gopBos4vfwqco8UzPe4\n9C4fdmZkWfaJ2aJ2+w9DwFX0heQ3PAzHWsnHSHDAYqMhLjP1+zAVhWBtkdTR\nWIXRh4yOEH61LZBVnoPMF0wHctojRUhty/Hfm52eyrhgNJngljlhERp50JRP\nhR0T6ZqUpOOJq4958vVkUJ9RPcWNdCkzv7KG2l+Iywpndc1HRloaOb7D4jhy\nWeVOv0chu92j7vN8aYeWQ/e97r7YLq6peO8ReFJU/Wb3Jk2kwqIEFsH/1KbJ\n0F8v9fjR7epw8wWY9fAayre8sA+MDYd9wmz+Ubg0sROcw1xY0J6s2It+f9gf\ndoL8ruURZB0yMu+9mvpvdgOIxRN7uMHVbV1ypfvJdFuVk/77wFcBVF7UKBIT\nnfuD\r\n=Z1ss\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7832101492d80cf343d0e3c2d5a062f96eb3f2ea","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.14","@storybook/core-events":"4.1.14","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.14_1552058181133_0.7796829397433847","host":"s3://npm-registry-packages"}},"5.0.1":{"name":"@storybook/ui","version":"5.0.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f20b845d02418c13ea2f84b11e8fe06621f24991","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.1.tgz","fileCount":198,"integrity":"sha512-AxE677O0gfms5YIHpBwfNoDluqWOtZhyGEi9iNVOn/Irp5K6GRgow/Qf1/OS1XsstN4BMhOGeWlenr/FDnxMlg==","signatures":[{"sig":"MEYCIQDg+7uy9AnAoVd05aytU81uNAbH72QAqdpW7LZ9YhQvJgIhAKpXsQ7m4pmBNJpyMDh1tSOzgHExdWpZjP+YiC2mYeTF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1135480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgpgGCRA9TVsSAnZWagAAxa8P/ipmJTn7ihOgWlcwpopi\nhWvj7LjKurZMvHTDd9WKGS5qc7pdrpOq+9sPBdspamy4mO7e0QF3Za65ZEMO\niaENHLtE/eOnumYhbn4obm7Hz2qn36dMdlCVoUJf1Sm8+Dveyowivnz6kHH9\nxPNMvlh3KRvXbgdPGXL1tkDzC3w9XnVvxMF6pLA+DnRGCePGirQvReSAlXIk\nvYTDohNshWK3QUyZgJuBBthjAkC0Kim1EoxhbM2Huw4GG4CjfCkQbEBQzl2v\nj3nSwRiIOVL3Lh0aGztqkzILERI3Kh18V2d/wlC29O/n5n3U6eMnjf4R35Ol\nnNxfCJsqfQ9tpuEbxAz5RR4emAMIorxCgSLh4NbvvAvKZYMrxbd1uxaj1ko0\nQnJFUyOkWBUuMIhYao8jLLAnsZRkEdPErSkg/ASEda5W48ZiwpQq7jyNhH+G\n0Y/NROzlvucleQexP0g7CrhdMio5w5kEFQiMkRkOX81RTJVPMePaWRqXJ3FV\neoympiVXBI66CS/If/Fy/+ReVesZ+HMea+GwndAB9mQOpOuM1SOnUqdFHXwy\nXRXQfxK92gPXABxth/kFOyNpQUfkg/dBPRe6hGtqT8g/wOFtdzodHJosQ2So\nzI3jSEjTrqe5EchuVikJfL0PIXhVgLSp71u8YLmP/MZsCTeVowEon/V/bHKV\nvC3d\r\n=IXMf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ae7a4cf0720cb9d528163f9411ade78aa379708a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.1","@storybook/router":"5.0.1","@storybook/theming":"5.0.1","react-helmet-async":"^0.2.0","@storybook/components":"5.0.1","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.1","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.1_1552062469297_0.05530025016764073","host":"s3://npm-registry-packages"}},"5.1.0-alpha.3":{"name":"@storybook/ui","version":"5.1.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"fe7ebae0538a393d202c464faa127091f26ae5e2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.3.tgz","fileCount":198,"integrity":"sha512-XVTsZZ4Z0CsADNqkfMAuA8rb4h9TOhsm4dw+bo+XQZ5gsF+VgFmVzyXPOJ1MXMONSoSlVTebATyQwtI+0oQs0w==","signatures":[{"sig":"MEQCIAF1mM6GrfFs90BPf64tIX6rem8hSrXSyhFHBd7IgB7yAiAopSexIFTBCHBYYPq9bR1BW92lUYeGmLfDEAM9Pd9XDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1152746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcg9vaCRA9TVsSAnZWagAAlI4P/099gGRosMEzJjBPVPI3\nkr+tlNEOAkhdwgNd7/iOGlj2Gp1v9r2AyuUdSmQoI19tEXpydrn1pRGH26Bw\nx+grKX/6UHRY8tibSb9BVoIaat7fwzcWIc64oY57GpK8VLZHbuQpq1mRZkK+\ndKuIq6fcag8gvBisUF6VPazqTaiMyJt8jY3XFVZn/LOvd6kMItYv9uQLeRGV\n6HenmjwIbHoIyjJgra1qyi2QJvr4Xqumd3zNhlqaPeoyIpAt72dxmzkLboBa\nYFDQNe9wj3/GZ0na3sTLZcvIagZ00wrjq5bdEACxzTnRh3FKRhNsUNBXcAIj\n8q5mTfCZ2O/Cscx1hktUFA7kAosahv+iDHdJ0haP4rETIWjkYpdHYboA0xXB\nvlOBTqJZF6XyqMDr6LphhhfPMx7+8CE8+mA1HRtUVT5G3PlH2zgDxUlNitOO\nXXCjRtlviYxEU5M9/jjn5XQ1KadQ2Zkntv49AOR+xl5sikxy3HHmbEh1d9b5\nIkI6TodGaq+6Ymx6qfc8Og5A8pH+Rv2WJS6q2Dfvq3Y8KOjNrCiFdQ6KJs76\nHweJGi3rluKiuMKnNbrZMtG7jW4LRVUP7lar01N41Lh77t/Dt8O6rch0ncQI\nM0IUkTBUX5I1TXV7WXsW1F+AAa6cl1k1y610asXMilHLpyqPL6PzNT7dTcnE\nRDqH\r\n=8rek\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"978caa74502fd06c825dc78d6ad984e3bca79ff6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.3","@storybook/router":"5.1.0-alpha.3","@storybook/theming":"5.1.0-alpha.3","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.3","react-resize-detector":"^3.4.0","@storybook/core-events":"5.1.0-alpha.3","@storybook/client-logger":"5.1.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.3_1552145369350_0.7315826136792678","host":"s3://npm-registry-packages"}},"5.1.0-alpha.4":{"name":"@storybook/ui","version":"5.1.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a6c07c5af70a17bbaf658a067500e4c88d47f3ff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.4.tgz","fileCount":190,"integrity":"sha512-MKs1d+0N5uYa48zNJt2+6Wpqd2ylymrsEmHdpfcBJCk7Z/JgAP0nrg2EfuGTLRHm9juJwwpe6p9EBmAJefFXkA==","signatures":[{"sig":"MEYCIQDD3piPy4J5xchF3AtCrr3vrk/lKlHHUh60A9US/fuenwIhAIL9NWA62WDl260NS7eWUdOVBiAudy3NoEQm0+qIDQ2/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1008814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchnHqCRA9TVsSAnZWagAA5XAP/ippsh3oMzZAu7e8rzLk\ns2FHOB4iACRkpta1DR3xegWef8BmEQQNYAKhZ2ItANAtyhAODnYBTCKwU3tE\n2JMSlKJXgf/NY+IwYgU22v8UsjOMy9dFgG9n97t/ETqQIpo5TBzjAPfwORxs\nMByPNljB0a1m3wji0dRJRuF7oQJKsUhqA4nCrXtXdp/AArO+YQWv+b5WzVD3\nu0B1UZR7Vufokkrts9reX5vqyQ0M1FFWFdXUbI1DVQPoIAjAsz+BP8Z2eckX\nS77KCbZJ8zvFtUGupYkIYIlsZfTTl8frmEyVFtvbduLFIhSeDIYjzBQRQVpx\n+C0IBsxBkZPG4A5trjS5XtlHoViM++wFRfQRhR982hrGOFbgruLhixSCNKhk\ngbkKJWiF1Mq8b0x8Lbf77LpD9bKGvQgOtxaWWr4XBrqMSqzLP04JE+a6nMg8\n42xAHW23L8aQn6gzZbo5x88EYWCvuWvmE/1ldeO2w3qdzn7zOhIRQ/TYx6+U\n8H5kiMBTY3xQzQ+cqE0j4DCukjG3mTj/Udd6o0ThfLEOjWto5ltMUVH88hFB\nN+tOL2rS0SO2MWLm68J2+edvwB9eIyv4mVxm2aKctQJ3Fb2wGwQnlEGq72W6\njOcOC1Rx34zEZSUP6dbqPz+Kyi9t9eDxihMSwJSgCcIOO0MBB3T27K/YEr0C\nh9jI\r\n=vZLd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"aab869c4d8665b2be3ee99ded272ee2f68825fe8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.4","@storybook/router":"5.1.0-alpha.4","@storybook/theming":"5.1.0-alpha.4","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.4","react-resize-detector":"^3.4.0","@storybook/core-events":"5.1.0-alpha.4","@storybook/client-logger":"5.1.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.4_1552314858009_0.5104481088989077","host":"s3://npm-registry-packages"}},"5.1.0-alpha.5":{"name":"@storybook/ui","version":"5.1.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"58a1def766a60241bb343dffbef652c9a5bf6421","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.5.tgz","fileCount":190,"integrity":"sha512-l6tgagvc2O53NYo51sigtFxoulWoiLcmpk9Pew0ZQaK8ltA7AiVQ/8eEYQtpn1YfZRHzSNJ9zKRwV1U6VOmcOw==","signatures":[{"sig":"MEUCIQDoMRrMohNxNe39wdHnL+iCTyqtahRn++cIejE3ja8UiAIgLa1yXS0KsOrsA+ooM+NVfp9+buUI7pKSEaNE6fhDeKQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1085277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciCTPCRA9TVsSAnZWagAAjuoP/A5afIOxLMW9Li+e0XMo\nSGnYnabJpDv4NLwZG1iCcuJUxPCuplwvMJsuHn2n/el0chrm2kZZyAdiLHnC\nxyIicVxnTV9PxI4WMLp7FcRoGueIMfX0IyXPiD30M+9cav4yl7XBf7f4TYnU\nXFP36CclMR9/KwN0WfsDZ/tfCEQMRRp/Kb/A6jH0BAiaejHF0qtPXTCgQq4k\nOBT6SA7zmA6NgHIdwJx5a/hWWwjg4Go94i5RtmjzfFMfeC70p/365SHbFVgk\nYVTr2UqrPda+r5W2X006uY3jZNOAFDSyDdVnxXIPloHVHf+VY1ZsjhL2Km0L\n13I3QwOqCRARPb7iynY1r8iprzLN3sluds4MYj4gb5SmyjNQNHrl6kpaqAE/\nEZqr+fhhCBnqnoEjOSgLjeFSQa+wBE0+LD8E91XDAWd3lMDX1NEuN2Jhzyjm\nSTRoHXDUu1sDnAcb+m2VQUvyDm5EgikvcgcQpOZLjOv2le+Mz9tOfbfG/roh\nS56ZYhzaKH8DbQP5V3vapduOaq8aiHlBjenfU5friKtlCvrlpGFsEclpryE7\nNPA8zlZETGTLNhudwvbdODzVQBnqJ4A4wYcCCcJglhGj4xqRilPN1XksZwyc\nmy097aGkQm9i9WfFCcgYCgCYebRtT+d/SrHObcPzm93u7ZUkC3SA7h0LtTn/\nl+cP\r\n=9zSD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"81f7d94fc5e6f9487eb61f7b75e5fc4ae8f9b0fe","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.5","@storybook/router":"5.1.0-alpha.5","@storybook/theming":"5.1.0-alpha.5","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.5","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.5","@storybook/client-logger":"5.1.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.5_1552426190129_0.8624183736928062","host":"s3://npm-registry-packages"}},"5.1.0-alpha.6":{"name":"@storybook/ui","version":"5.1.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"573d1c64f083f726011dec4eff2a88ea54766727","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.6.tgz","fileCount":190,"integrity":"sha512-+7VFpqHn+wJISSl0s2mKdGJLkGiIlqjzW+5VsqUd1Bl6EJ0UBsdIZ7rLU0Wj49cYlkHfXSd/BQVUr3Ncocfyzg==","signatures":[{"sig":"MEYCIQD0FnaxLyUoLeVJORxCuSUhcLsQRgO3aQpN6qDcqktfsAIhAP8H+mMQkWlYK+U8zWKZI03av5E1+NAiU6fkNoMr8dRI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciafiCRA9TVsSAnZWagAA9RUQAIUc2838fzfNXjWROknR\nbNyMEj6skvRlfrVyycOerBM311vU+vsbN43xGsm26rGGpZPbfeD5JwOitjV4\nzKEVUN+j/yqHT3wDsFuu5DXXZPUvDU+nKOQ2dDoecfV2ijdO/+YcQFn/vo0o\nVvruNuwCkHKmnuU31aW1PUtKR6HMfIhp5djqRpYpWzI0EoVvKP5jLXFzN+cY\nZs7vVO3siEFwEvnFLQPTRQ4igi2/19rcbu+LP+Mo6Btil7yPSKKRTqZ/+tLs\nz9DNHf1EmYH2aejj0x4P/pItY7voqEMUUWzVeDGGK5tWQAlXUetH1wKGqBOS\ndLZVCuBOY9EhMdfPrd4Jv+SghA44kXSv/htslgUXoq73LWrGBPbb0vfnvCWi\naULqpiy7aK0NCYPO9MhDT2U0xIzZTemwnp9aWFVeNoHCTdtBX7OnUSDS1R6d\np0KHlAW5Hh+lCB9ILyDJRbdl0ZosTuCZ9dSvHpJd653MfpUr6UrymsVAlweD\nLhuVwbUN8ocup7+P0HsLlkwoIVbsV1FQSUNRCKCKJjNxeu9yhJGIBESw2K4y\nezGu7aOpZDtEeonwbxgqqh3WjL7e1mAwg1yBWsi1nP73CpIQHazHKbuX72pS\nlv6M2FiRoaXbGpaVxkaixtvvT2pXCa0baFyM7XrXQvogyrWHcRJISJcP/ATJ\n0kNZ\r\n=rVJA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"daccff8919b470879539a45de09f22168f666230","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.6","@storybook/router":"5.1.0-alpha.6","@storybook/theming":"5.1.0-alpha.6","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.6","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.6","@storybook/client-logger":"5.1.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.6_1552525281625_0.7531739263053048","host":"s3://npm-registry-packages"}},"5.1.0-alpha.7":{"name":"@storybook/ui","version":"5.1.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c29e63283991e2f6dbfc282eddb12b9c090c2c44","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.7.tgz","fileCount":190,"integrity":"sha512-JwWC8tJ6nn8egTBe40gY9a09JUANcWXcMbKC7HhVlPC/8nv8Ti+lNtUqDBe08md/GRQEkVpWClDnzBG/cl86iA==","signatures":[{"sig":"MEYCIQCymKTreNdwTaKbcWKu/C5CdmKeuedswZ1K/+RIRIVuggIhANhmt3MVHsvPOJHezgxRBdc3VsIavxhpbveIa/Q4ybcY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjKNSCRA9TVsSAnZWagAALKMP/2sTWl+8e7tibEzg8hEX\n/lQOjnbd8GxqSx44EPSIDbypBEmrF/vVi1WEple8RW6y2fyk3bcqvKs4WVHD\nHUE7OxMIxEm/5bwe3wSoUgBYRz0EtBFZ8R29k9mveRuetsaEBSvA5nmsDUo5\n5guEdMB74gXEa3YM0GUD1DUJANLctRQSNxIDzs0WG/bQPue9n6xZ9wVqT8Td\nJfxDNuvjn7UejGkS6C+0pqxL/A8A7kpR7oFPvkt606yUSEZKRAHIPie8hOXN\n0oeh66UvPHC5GAyHByN0kL0ZO0xmqdjD1SOzUlLuIXYuAcHXr0yK+KVvsla4\nNB4+lDrmV0VfIX16uSXBUqQcy5lBo9bGaZgvpO8yNFr6StNbnzi27JIn3Go7\n4EN2sH9HP+NqeRpel4/jVabyiRGzfOKZNIY7GIIO9jSDA5PgRp285Y+Vtqix\nXbvD3U6ji15MjgZCgW0wpVJEyihiIKZeg2R3vm/+z+wWSDSdk1W09oKlLpug\nMS9akrvA8hf2NH5AGimbAcTxxGnwh2tkB9Ness5DPn0pEF7/XZ8H0DJ/3cKK\nC/B889w8uGGDPZs7km2+3WRh7jUAdEN05DCQN0YFI67VGV4Dnfl0BDi15oWw\nMBsyR+gXNp0YyD9eV6CxchOExaHh3NdbEXQFl7HTN0mOS9UCDGpPrOTJFsjZ\nL2Ec\r\n=ojk4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"76e5df9ace362e3d6b8b8198c03aaa2b0db3d48f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.7","@storybook/router":"5.1.0-alpha.7","@storybook/theming":"5.1.0-alpha.7","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.7","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.7","@storybook/client-logger":"5.1.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.7_1552720721528_0.22618096410504962","host":"s3://npm-registry-packages"}},"5.0.2":{"name":"@storybook/ui","version":"5.0.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3804e8ed20bc8130c23860efd8bbe7af773ebf8b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.2.tgz","fileCount":198,"integrity":"sha512-Hbe0BipjNf+fOEFXoorPEf6yj+Iy/SN/zFk4kGUL8V29Q08jb+vhGCIRgP6WOGjj1a2EwYuL0sBlPVPBljxzVA==","signatures":[{"sig":"MEYCIQC9/HMg352AiSGZDQ5TNRqA5FPFR+qGVdYke8nohlHdHgIhAP6DBuKbd4kpc6sPdg521FrcxqChPxM9LpdBG5bVYTKv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1138343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjdVbCRA9TVsSAnZWagAAXBEQAJA5ATJf/yB1HX8ptp0f\nWW1IqQcDIO40SqCgh5ekeYOXNqvv1mSw36p35HRXPddXYIjzVFIjvT01xa5x\nFEyZC7XAFjX/83YcRp+WfxmNj18QGi6ENqmj173VTAbR04kgg0hW8EYuNx/t\nzHkz2NkHhufpWx+xw/Z2Qn+vEPKXjj2A8P4yxaLkzzppx8+748nvSXnxPXIQ\n3UzJMbb96zDtwg2ILg4K5AGOGKeNHpFSyk906RH9HJlRF2tnGohiM2CcN9GJ\naBrD5AXi2BygRLohdNREITgsERFlGNVwn2ZuMBsggvuFHG1UwpfQaOpv6mI6\nfJvnoMiVkhekMPl6GMmePAkfc73+1Ifs1U3Cek+bs8eFi3Re0P9XHVDI+Zyn\nO84Fr5rgoSGH8B0Za3Za+ki/MA3pCR+Z8/w8iZVSoDcDLVdWcU/fCzkAUmzh\nYeeE/FejhTs7xN861VCZyl6TiZ9xoO1xn0yapLAM2RS6RVQ/7qfkT2DOeoVB\nW4EcTTg76HRRlpKThldnEsP2iFzJiFFHWO0lB/EUd4aNK9kPStVq2ZR/veV3\nlT3PimBS3CSoBZBaBtwbEMa68JYK6ICmPMSNR/WJbLds2Mki5nhtqvFtQOFk\nMdL+ILEgQD8CxfUlnITH9bZrLAEdBiA6UgELEB9Od/O2hmsYrlbtW/zJVS75\nnKx0\r\n=a+ps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b23f97ef2c32079cffdb9109f8923eb654f4efb6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.2","@storybook/router":"5.0.2","@storybook/theming":"5.0.2","react-helmet-async":"^0.2.0","@storybook/components":"5.0.2","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.2","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.2_1552799066793_0.6458264274209986","host":"s3://npm-registry-packages"}},"5.1.0-alpha.8":{"name":"@storybook/ui","version":"5.1.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"101021aebec616cbdfaebde78576cfdd3ac9eded","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.8.tgz","fileCount":190,"integrity":"sha512-E88cnwJHzHrA1mqsF4Lc0vSRKefoNm9MA25cAd407/1GwV7GTFdTKBfbusAH06Cbk2FonjGGUhlK6ciGrSI/Ng==","signatures":[{"sig":"MEUCIQDVQPOqieu+w8th0se5t0914+GBjwuQXzUtgI9GRCjlnAIgXxM82A4bY6jf70MCN6wpXxeFM1zntW+OxqI7UEE5q/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1087070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjmiWCRA9TVsSAnZWagAA54gP/3vxqxryxP0l0faqCxpT\n6OMlEJ3RdokFTyz0JjLwgWgJoAeWJr/jBOFWemT97002nGI8v2rPBpIliIsH\n0LmuAilhm/leJLw00luiLjbKMykClZtp+PSjmBL75iqhVlGmndWLkgsPlxGd\nlpBXPqedLcZkMMw62ER8DooxWmyQ4Joy4+H6vprouTFa01UTs/f0wpA60oy6\nzD2L/pmaAtsQpojFd0Ttnxr0FtArR1/btZs5e0C5CpHKdbxLql/FagcqcEwS\n9RvXWdzA/e8jgh6jcdJzQ/A+mXF5JWUuVlzfzni4QJqWxHhb2JyNTyKukdTm\nMsb8DVL62WNIkzuU9cNtpJZmeG5gt6ntt7bTkRd9cHnT7Z+eYU1g25aWzWLX\nZEDQn83Ybs8oO2OqfoU9gwdfHiWdSMqoyjjsCcgw3j9hraSTbBIgfowGJD7d\nwTAJk2rSoAQW+ZnZW6oTaZ8sk58ZOCfzgDhNVjaxtBBgDmJ8J1zAi2z1FH8q\nP7cS0m/exAM1GkOEyw5ld15Atv1wEdoHoluRNKGniTqFNuO1DzZ8wWVX0HH1\nTb0XLaC/y4rHvD2KdcH7Xvdw0zmMesDv6808gbkwN7Hpo/+VY05dNgPqTyRP\nQiWa+t/n4FhfocRoribQD8q0jdEX12JTfZaICH/+LIE/0SKEYq8zV+N3HC3f\nuPtf\r\n=WQr3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"eb9be1fdc49a2e80a744aea9b54437a2148e33db","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.8","@storybook/router":"5.1.0-alpha.8","@storybook/theming":"5.1.0-alpha.8","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.8","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.8","@storybook/client-logger":"5.1.0-alpha.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.8_1552836757908_0.4977247435544849","host":"s3://npm-registry-packages"}},"5.1.0-alpha.9":{"name":"@storybook/ui","version":"5.1.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d1bc4e674728a63e0d548b9dd16445e972042d3d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.9.tgz","fileCount":190,"integrity":"sha512-t8rDjSayS48fXWv4E34kRrj27v0j3sRJDDg1qg4VvyuV0M8t7S8YTJMN/XyEwwSo80Zst0z7U6uamVnyh0LIBg==","signatures":[{"sig":"MEUCIHgo/hac/HmsVfTsXYTRFSWGZYBQAwdxB9dKMizeMg69AiEAmQbC30nKnkgfx0eLfSZNya0fMLbBzBqtZDmG38lcI3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1091208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj2YGCRA9TVsSAnZWagAA//sP/jk4+xsmv7XEP6cM+pxV\n8F9/T+srEBl54jvz4Rxmh02Wh2ZY/V89A2xNM3D0pd3WM03QIDV96WCah9+n\nOlaQGWAKKcp0AKPQfgeotD2ZuMXMg7G+rTfMLYC0GCvsgR5Gr81rdY5ig6De\ngos7PgbHIil3HPbn/Ml3+C+T9RKgwdf5uYBX3oZl+rZ7vuefXiKB1y2zWDKl\nWuMtHAvA25NMINdIJkbG5kQt6uWR1ngGDmsQezzPw/500921zbrFWiq3BeF4\nrGF06yfy3bkxxW5hmhbFCHfFKO5sB/tNX6rFT3E17A8TU6/9LgZGo+G2uP7P\nLUecMgjbFSzG5X6NDkX7MVfIExiOafvO2xDz68grpgR367hKgsUiVl8zWB3q\nufC7neneaO5L92EKpehusMNz++hKnexxJPzi0BV1fo3Cd4T12+r70bso/IZ4\n7Y/+dNYwNMvHZ30QpX8i0qiPslxwEZMQodb0HqnwWPmGaxJHa+DWc3IXvrIS\n4MFDdbdMkRRX/JaoWUyEl1Rpo7KloamgM8PYCRuqwTwbc1hk2xjfd+mdJC0h\ngNLtoc1v4aM3iTn0ip8RuGUxTHFNBz4gSCMPtsz6A00yis+tsLhBpduHXqML\nSu/PGTLjaNYmkX2zlL3EnvQmNh93S6198YoGWRNJR5d+G+ds+qTC+NLvPMqH\nd+nD\r\n=FgHR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"b51a247295aca9ae33eb98b41cd52abc6f77d844","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.9","@storybook/router":"5.1.0-alpha.9","@storybook/theming":"5.1.0-alpha.9","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.9","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.9","@storybook/client-logger":"5.1.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.9_1552901637848_0.22225659761881267","host":"s3://npm-registry-packages"}},"5.0.3":{"name":"@storybook/ui","version":"5.0.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"81553d32bfa10ca901caeb42dd336e9bae13b417","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.3.tgz","fileCount":198,"integrity":"sha512-3r0CSgv+yZye0yFUUseIya4FmQiMYO8AVlAh9whA1NyhI7IQ8aM7er3FUoMiBP0LTySprrVMV+1Ig8ZD54xrlg==","signatures":[{"sig":"MEUCIAzrSKxLVwiRtKQWXJpmDyI9vrezp6WS718e9hjvaJNCAiEAgBF/CbrZSNiUnZzDghTDs38/Hy1qqIT2urYajSBLEqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1142864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj3z/CRA9TVsSAnZWagAAHi4P/39uKa0fZJAlsA8dHRE/\nobzXdGZJjfs86NQklXnkz/AH++267OESNznk1fTmD0+++7UKAb5Y1pIRtYGh\nUuYwHxgCDTDR7ylufqqvnlhzRa4SNJHIDInTz7jnp6huo9VFgM7vo6iH4J9r\niXI+GLJcqTmsXasG4O/l08hfZ5apNXl5CN/JZ1kWvKB8EIGU+FOH5R4SdH1R\nM0SOg1rdH3UpP77+dR4ZrfeljSAMmIw/XO4DCsk3tRI4IXuETKXJiULdoDrl\nErCl2TGNYoLbsTZE/MXCTTcdFpSZiAWOJa9F1aJpg9YDWr/WrgPZxcY3ESDd\ncsTzM8klu692kBZVrQjtDEUEtD48JTYhlxROE+BKFi7D3lgtLXank81yfrOk\nLAB32xSrosqvo1rNR9A3qwh+jVAfBB8AuRlcDoz5nM1r7UBHxPFUtEZbsFae\n3bIH5TMxLheNuxoWX2VPlgbBd1PtZGWT6pOcm4vm4zws3NhfCLD/EvRR57XV\n19ST2tUwX3Eb8oCp2K9jN1Uao49TXtNzz5DZ5xOk7uXcflWxfkZMwOHgSov6\nyM8iKsyIzhqd12E/EzK4zXIYazK8oXqFV4bg9kUv8Y8OA3cQUSdcWmr0L3CZ\nsc7ZhAVw4VPHjHIdKhSTqPxiPZvUAF79k9SjX3cg+isWEdoYw8x+756jjvYf\nX3W7\r\n=P0UA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"22ed36243324aaaec6101ec422a661d84d19a59c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.3","@storybook/router":"5.0.3","@storybook/theming":"5.0.3","react-helmet-async":"^0.2.0","@storybook/components":"5.0.3","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.3","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.3_1552907518542_0.8267927992342086","host":"s3://npm-registry-packages"}},"5.1.0-alpha.10":{"name":"@storybook/ui","version":"5.1.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"bb3edaae6ff8dad40fff55453f96e96128674042","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.10.tgz","fileCount":150,"integrity":"sha512-AJd/fcwUhrOuKPO+QQTkx6Hazg7ieNLdVcbNlxQd+D0lRmcxxsBRQfPfLac5q+HmPCrtTNHrQBbIXEVwl3ys2Q==","signatures":[{"sig":"MEUCIBrM/6zbGuDNHgarAfCmDsaKwSeM6S+vyf08vSIx1O+FAiEAycQ3+NGTJme0T8aabwf9aaj1l1FsVv9nABHo7oKtvJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":883102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckPFzCRA9TVsSAnZWagAAKaMP/0a2Y+I8gAeqBQbGY6ro\nNaz3NLTcNKzCMql8yHi+TdJ6eEyzy7+CIHVyHZcQ3/wlnoSV7VGEv8S230zp\ngy/ng9DtNHlZbw5c+L0gtF2sj+Kacx1Pj7rbc/3dYBITDvZFgP8naLcUPnqZ\npAFbkrMbi8CoQhEBl3UgJ+ttSh44CS/P80RL7MSFG0cTTvXfjzOVgz5BI7lt\nO4z5164TiBSaVuqzmwiPDHAsN0z1ruPArCEWUCb6riYpUMIZPf6q9i6vewFL\nO1H00Arpqzrgy+N2Q/Z3os0N1DW2J4Qbq04e/joNzGCVgWapgT1ojFvUiMS6\nIVd6E8LBveNqt4jiwFWh5Q4PiQyksu3znp2TBT1wlDCL5cdioqWKVi3ANqjX\nAqnlgI/I3V8hWfB7v7rax69xhsMMROgAupYDP0i95Kuv2I98QKjUZUS+Az9a\n6HtLZ04S1XzF5yPhWNEQSylJsqOsBjpchjqwr7JgHM4B/KhnbG8L4ckreOqD\nLQ1W9gyurTVdKH/JmfB3TRdO1yKxaR1K8cq7EI5/Tsd3pztuKIZLsOfriwwt\nf2B6Jej3O4Xoh8fkoj9IKaTg7mHoQhq52u9cJtESwPSh0slM+MayM1WUPtI5\nHRVehySq9Rv4hlJVZhky+ZjMu+HtNOcnaLxs4cG/eSi4g14l8LINQq3dVOvP\nOJvC\r\n=wF94\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"5cff559d907931e817e715d0a00821993b6bb00c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.10","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.10","@storybook/router":"5.1.0-alpha.10","@storybook/theming":"5.1.0-alpha.10","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.10","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.10","@storybook/client-logger":"5.1.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.10_1553002866511_0.9264045992395422","host":"s3://npm-registry-packages"}},"5.1.0-alpha.11":{"name":"@storybook/ui","version":"5.1.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"acffcdc943319fb42c0e2d9e938bf132117e20e2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.11.tgz","fileCount":150,"integrity":"sha512-Oqin2iG948f8GAjLkpUk6rrynQgWgL8aGF8mvxHUgDagzsZZeN+meS1O3zqcN2KfEL1BPIV/zlRHwLleaHtSGQ==","signatures":[{"sig":"MEUCIDAbwKSiqJHqolTZBgeCdV2j2t6dPWGSC41UwdBpLsD2AiEAtViGLSjLkAHzK2YuivAqJkDrIPT+xRKgafjXxpGsRE8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":883102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckqSkCRA9TVsSAnZWagAAeOUQAJv7ygN024vqCvpaAB2e\nw+xOJd194qq17yJmqWA+CxtS9wZGuWCK4xbhJnraQfaFcij1UXu1tccsIvl0\nnHNlFCcX3U9eR9SkJGPAHaiJUJOn5I7OXFP53J/DY7XyX379SE/E3SFilRzi\nJS/VA9fHjNwPh36ByzJE5jqRgl17cTMfN80Pz/dkKlczwkLtgcbjueNRpX/V\nI7sWFnVGJndDmTWxEYuy8D0zuwlET+cwGGGgAvcEpiAZl8iYTLbguDXrs9Tk\n+iHb5Mqd5Lf0igZq6mCxMhpe1kYSAkIHHj+qWqhqds57Vb6V/IxFMJIPNs9j\nYvXbXrikIcQog+sLYmQo3+Q+bfuL6z6qEZfpnktc7MYDUNu9pyxWQjhcD+6B\npvMMhbX//VRM/ZzsonV7S9Lrf4Mxtf1yfXBqMJ5jLsMjRjnxhgZJMtJuFJrw\nCZRwTWhdSWfpwqDMhQWE37hwSO+72TN5BTzpzqXDSQfeQNpX/7GRQVYO6Kce\n6ly3lEx0cUZzsh7NVjOz3a8qsSq27FNOWraARCp8veSZOLvrbsLomM2WmDk4\nfCnbAh44pq7d/tAc/tj1PABXs/vFVDGt27pGpSDlJD6ksyauKNlYx3Osmysr\n+g+H7bJGK8qRUJgGO0k/HnC5VEiomZ18BnXznVtcuS2SkmsT/mHibSdQ2U4j\nW4DI\r\n=gYMX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"0a81425e86aaef666146b1e8e7797fd6ba7ef9b1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.11","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.11","@storybook/router":"5.1.0-alpha.11","@storybook/theming":"5.1.0-alpha.11","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.11","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.11","@storybook/client-logger":"5.1.0-alpha.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.11_1553114276022_0.5109631656298754","host":"s3://npm-registry-packages"}},"5.1.0-alpha.12":{"name":"@storybook/ui","version":"5.1.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c4c5ad1864d0f168879864fab2a5d39fae20ff4b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.12.tgz","fileCount":150,"integrity":"sha512-ZUykFWKivvFswNuOSjdwGLEzWmgypCgJDP+oEuWqUR1c299kHqA6aZBGm/vlrc6GW6Bbgq73o6Jgo9RUMo1svA==","signatures":[{"sig":"MEUCIGkGrAXV+T2QDJAmKl4DpyAuEayaPv466NBD8u1ki+6JAiEAkAdL+6h3ngyvdn12v1ynsJbnCSYV0OVNXNAEAJWZbu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclGV5CRA9TVsSAnZWagAAEnwP/jMQdRFVmTP6shpMaFig\nTIA2VzLl0kncHBkFsQyuYZkVhzRqdXAs70PrgCh2p1aNsEET0j/biqqav3tc\nI8RMzKuT89XxWR+2rZVn9rQNZXexD5F3V0mspIQC3SBfW96CbyhFRitzuBh1\ndrNhFPoxOs/uaDCrJo2bH2I+STsomWVEzrIMOOgq1nDKsA+jKDlU599b8S/3\nGmcPTsZk5HUhHxaA1j7QsSWjuLx2RpIuHxJgqaX6Y4Ck4jASN2kvcm9QBow0\nRkbt79KKE1j8NS7ZEXwAMI0QNI1HTz3AZTbRwlY9OVXcFNVOFd7LnF/SixBc\nUy5ALQeXhv8Hv5lvmv8zOd8N23BJKpJsm/Bm4zZHaJszb/FF5mtH2IUYHgAv\nv5uJNdv2caHtN1CrfRYjkMAGuQgjlqZB156qbQo+2v2qnNN1Et1vIdEMsuGM\nAXHz/L0ceFi52Omr7iDWVfQk6forkfnbP64RuLPCV/KnTWLCTgIkYEfqJJdV\nFghMovJ8tdZvTFTy7Uz9AyEEMPITGdtORwtsoSJiavSKukGQYQBxJb61hdX7\nPEJpY8HhIkeDuFP8gUoCGPCS02OyKSOYIFrdOPKgGhevAhu0tvLipXMuLr2X\nbOpvyTXZOcfPPqDcvW5wTmCFV2cYrvPK4QDX0oTHzwttaNz7PHTyqxQo9I9F\nlV/7\r\n=PnNt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"2c1fae398f887fdad6bd6e8037f1a6bf96074289","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.12","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.12","@storybook/router":"5.1.0-alpha.12","@storybook/theming":"5.1.0-alpha.12","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.12","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.12","@storybook/client-logger":"5.1.0-alpha.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.12_1553229176742_0.17478048908893085","host":"s3://npm-registry-packages"}},"5.1.0-alpha.13":{"name":"@storybook/ui","version":"5.1.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9ec8af940498827d260ef65ca477943ad8dd1019","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.13.tgz","fileCount":150,"integrity":"sha512-JhWDkXMI9K6IH410rEPDT7ocjjziRCHT4rd8La/hXmEYzW4leICAnrFJsf03Bo/W+t6QotZRdTXqH3G0yfOUww==","signatures":[{"sig":"MEQCIFM3G0dvjWHe0xqe069aA1ABYIrO1HhVc+b5n2TatMFqAiB2S+xguElhIaAir86rrfyBDC3WGwPOnBR2Un26wv6w8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclcLhCRA9TVsSAnZWagAAU+UQAIB353th57CdF5lZZywv\n1hgtgKyCbPxqL2EHfafFIszrX0yrc3kNnHquGLEq5/ui+HrlKVWzCvtc9DQC\nSpeoKKKaM8W3fIDGOZFYsY9UtGFeRSGh44T16C+3fP9Pf8O92WDeMDhgty/F\ns4s6iLk51RFbi5ffIkeHBSaM8D7qSqkT4V/ELz+gpCi6onb4fsrAksTgu2UR\nEulrWUe4QfPomS9lGiDCCc8pS8gq4t3nGdTdRXe6NpnT+fjFMQ2SbRKozwI5\nNKx6P2zDSQtdOtr6eC+LDkutWB8WRFvBRhO/NAfqe7CugoHu+WPx2RG79haH\n68jnFM3Ic1FwjPkff/ayd7yE22J+l8cY76DZTTm/OgJaccpdzfZrpcponAcO\nVunQ5qX62fAueC2/FImdSLCNrBJi34PmURJj9TgoPJmYY4de+NvCcCjn7r3j\njv0GfQo7eF4fATpq183pEMa941VqsOKrvDqAYaX887jOSn5T7uOoUnuAnK2G\nHsesUoejLcZloYqr70rmhyTRsX08dsb9XCaJbyhxudyr/yGy5YK1VU5yFN8l\nWE+c+m/ryKJc/LX7rDo8nY5XIkJvweZVAXllcDVl90ONrliEaLFWVZczgQBW\ngMEKUGANGI5VClkRvCB8DZgaUmIzokqiEuYKV/73kwhETbHTRrNq+V5Tbm+X\nCdr4\r\n=hEbw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"15871945e228a6b15bcd553f8b97d9a3a1997233","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.13","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.13","@storybook/router":"5.1.0-alpha.13","@storybook/theming":"5.1.0-alpha.13","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.13","react-resize-detector":"^4.0.2","@storybook/core-events":"5.1.0-alpha.13","@storybook/client-logger":"5.1.0-alpha.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.13_1553318625267_0.5460603102582375","host":"s3://npm-registry-packages"}},"4.1.16":{"name":"@storybook/ui","version":"4.1.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"a36c92b77c9f2408fefd0dd797ef764fe8f39a89","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.16.tgz","fileCount":170,"integrity":"sha512-uBRTkSYapF/es2T0gIWZHcbXOt8gq+xIWvrEdFXjqX2diUC0k//6dN0k/+y4DQ4zdj0+g9SkiS81nOBvw7iTBw==","signatures":[{"sig":"MEYCIQCqBs2UGq9B6pvyrtqaEJDjvMYOCcjcaGhDCfj5NkuJUQIhALOUmED8xQQNhc8v+6dggJHB/e4bgpxUljs0oRXhP66u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":995786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclzIVCRA9TVsSAnZWagAAwD4P/A2zk3bpJQySoPsbnc2J\nbNUjmVa/0SBHYXpoQqIzBob0z/K5qRv4qAPzCee/bq/SsndHFHocm3awKuFv\nDDlAYiHUXCHU5V8mJiNXG/ArupEU/tb3mQM5v/MPu7Jg/DOvJaMMsHfbeDqt\nkhnUUY3r4ci8AT/16Kz8kfYwHEjypkEmOP6iBB8NeEgTuX7NBsUX33TC0Xjr\n4lFX3hy/T1GpjMn88nzVvx6hkOcgKbSnmpb6YgPGmohF3Z8xQrplk7UtckCE\nfJB9iDO5mZRT9gKveoGqFxSjwSTOa1jHK/aY/nxrJ2rtRSqCUi27F2FTYi0V\nRZtXYGJ2HmvDFn1VW0dPU6VydLb462y4HsHITib9wHJf+vOrPJVXlbe2Diut\nRfXo6bttYySYaL7cBk0585knFWDc0HqcRoMcASVPGKKswXn7KXe7zUek2qKW\neXQj5IK0ywIlxtOngRJPZAGa/Dt/eOmxnhbQ30Kc/59ECyiNV/h5Ndvwi9//\nWfnv+RVNVfjhA4oXFvV7C65X6y0SkRjwsY6ZWH5HtT3PDDOhfoBnnTI+9WDI\n/4H/IaaPstkOitpUmUVSDYOWpnjTg5h4U47bwkXTxc4qn9kSy8eHdPViONo/\nt6wkkoS5e690wj+YGOgruuCJbWN0ojAHLsZE96Kp3TfXu1ScfbEHT2VyqtRX\n4l5i\r\n=FstN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"58f39274ad8e12a8dc1621d42849d862b7e31586","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"^3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.16","@storybook/core-events":"4.1.16","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.16_1553412628589_0.7803080730584546","host":"s3://npm-registry-packages"}},"5.0.4":{"name":"@storybook/ui","version":"5.0.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e8c88133b9306cb26c08be67f2c22cdda059f459","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.4.tgz","fileCount":198,"integrity":"sha512-drFGEK3YXHVyOk0u4Yo8fKdsL5EMMREZHFdPsO9n7qRmlccRmUAF6BC+pSwSFvRIo1bEVkzaIJM5ZtmKoiBQMA==","signatures":[{"sig":"MEUCIQD2R7NfN4EKddOzOBMexGulisVWqZQhphoJLD2cPm2ZbwIgQz70D5HRJyNnqE4hs6Z5LO5GmUq7cXDFSU7aeBY4a9M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1149798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclzuJCRA9TVsSAnZWagAAaQ8QAIr4EJ3M5o1Mtg+iSIVM\nvzuOCxdxjXPfFhsEy3KIz4AnSa7v0MpNM7PqjRxWt5W9ebBVbsYrzjzhTS52\nBu3Wnkrs0rxKLS6R3rjmUg9emE88NcU/OoCuEQ7CQd6KSEwJP0oXgZ4MicgJ\n+0ZjT9Ur8BRSOcC25ZrF7QuKuLXpZFWvWf0dGDUrXeRUDfAl/Pz5H7/cDgmJ\nDs6vm2FrsSRcnPysz3uB12zhiHgNGfriBLipy1JwIkOHEgaeK1Xe6tskBDRb\nkk8ihIbcVVPBAq5qFyr/bS6Jtd612fQPKrydLqRDAoOvK3o8Jl1+BHpIng+w\nbGoRmWS0zhpO4MkvhCewNCkpXFbupL3SS4Ry3JoYExYnbw5qMkRgTD8q0xi0\nSTA5i9LTK60Afq/D4XnhNHXv49qUqkI1YuiLWDaypVhj8LjU4OFU9/18tG8C\nFXTUnay6R7FOd2DF0sxdqbDW37lYt8OxM8ImWFHtxq4oF95sLY5tO7JtI4gU\nayJt3t/1575iT3BRWqxWsgGyIx5YtLAFrNg3RVAwDZ1Z32IZqbcjRdwo9jXZ\nRQldwEOwhmydbt+g0JkHPnuGSXmb9IfjHW84CijFnGjYI5BwocsmE4gMFvT9\nZUDS9SklC9UN3aNXVwFrSFAM8+yrx2mh9xlRi7Uo9UvAjYazyz//LZRnkz8E\nf4Sa\r\n=YFCr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7e70c5f06fc1f8d4e533c7e66f7222fc6e7285ac","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.4","@storybook/router":"5.0.4","@storybook/theming":"5.0.4","react-helmet-async":"^0.2.0","@storybook/components":"5.0.4","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.4","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.4_1553415048908_0.8596552561088409","host":"s3://npm-registry-packages"}},"3.4.12":{"name":"@storybook/ui","version":"3.4.12","license":"MIT","_id":"@storybook/ui@3.4.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook#readme","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c5d29c66479904a6af95b5d0026b5bc44301d11a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-3.4.12.tgz","fileCount":147,"integrity":"sha512-I95bIe6AJZi/9tn9K37aepy4+FpDsAmAdsF6LiIYsN3yc3FFELEykiJRv52y/+QRiaOUqOAdOOTuBI63wLqyaQ==","signatures":[{"sig":"MEUCIQDuVNclPeigMgHy+37lxTOVuoViYQWJzf/Lf3sJh3CeSgIgWB3gkLr9rmkcGxDtPp362uhmM/1Fhi53OZ8h0ivW+jQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":870183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcl32ZCRA9TVsSAnZWagAAQX0P/3EXR/SA5mbEzQyRPxei\n7tHQvsuDCG1nN1OI8MYlbdNWejP5Sxm8UlqFfPyDBY1wemXOmDvEB+aV3TJH\nXz5xkMrIew2VY1aeEoULxoTrHXwOedjG3cNdPzA69CY/PoWRc2prL6ipBUfz\nOxOldc46gzhAfOHgY9l9Qm+mgWoyK0LJ+N068uZw7EcKBhqFefB6KGdzUFxk\nLKwc4t71tC/NcVbhtLgbDplbU9WCMqZ6Z9CG8t6KknFIulHHi7HjFzQ+kdxO\nkDihYd9qqp7TKyAyGVOLTUP2ePBKmEFNOkd4ES6loNGrFvk0sFfwjvuNJT8Y\nUhK2Mt61HrNv14brvyM/nSezHCvlNKRzLjW9zh+RdJw/pMXpON//xn9rJC52\n3NS1JHzmqT9Mw2TvDT9sUeeBDwREcatdOyISSbNi+5xymzAAEGiJkt7XZTMe\nNkWoD6J5D4Chd84xBlM8DaKPlAt5izBEYW60jS6PhKKZ4ltLRHZFS05pMidD\nDzc6Z0ZOs86nYe4VHGj66Wa/olA/88cwK4uuW9Zf+b+oU981mMHml13aOMr9\nUtqZ4wPbruHGaczvgpqManZn5+tOWOIpKMC79V37Veq+5WSQJEqN1CKsrHH9\n4nyN/xHIbVNnbt4s5VMLoI3gazu+/xyK1t2uEKrdlS+VBKNPCis3oOI21TJZ\nRDO3\r\n=0azR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","scripts":{"prepare":"node ../../scripts/prepare.js","storybook":"start-storybook -p 9010","publish-storybook":"bash ./.scripts/publish_storybook.sh"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"5.1.0","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.1","events":"^2.0.0","global":"^4.3.2","fuse.js":"^3.2.0","keycode":"^2.1.9","deep-equal":"^1.0.1","prop-types":"^15.6.1","lodash.pick":"^4.4.0","react-fuzzy":"^0.5.2","react-icons":"^2.2.7","react-modal":"^3.3.2","babel-runtime":"^6.26.0","lodash.sortby":"^4.7.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","react-treebeard":"^2.1.0","@storybook/podda":"^1.2.3","react-split-pane":"^0.1.77","@storybook/components":"3.4.12","@storybook/mantra-core":"^1.7.2","@storybook/react-komposer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"@storybook/react":"3.4.12","@storybook/addon-actions":"3.4.12"},"peerDependencies":{"react":"*","react-dom":"*"},"_npmOperationalInternal":{"tmp":"tmp/ui_3.4.12_1553431960800_0.5013328503060441","host":"s3://npm-registry-packages"}},"5.0.5":{"name":"@storybook/ui","version":"5.0.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0013ab58334c6f86a63663e61c92ca2b50758a0a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.5.tgz","fileCount":198,"integrity":"sha512-mkZ8tG3RK9rAgAn3zKdeav28/BFaMJWK50qROzS8kXmTqirGXB9HGG5YXAtw7tszCrIzM8Lv/dDaW2XwzB4CmA==","signatures":[{"sig":"MEUCIQCFYTBiRuHFFKp9diGXETLkhwOgSDhLWxhXMtzRmD+3nQIgZN+ga7c0TVEcOxlvpWaqEaEWlc2teWCoWSWxNq5TOBQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1149798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmA18CRA9TVsSAnZWagAA82gP/jbEdZuiDBN2bT63FGFr\nSI1Vs3CF5cnQWUxPRf/J0l3wsSVFX5XFynBcmHvn6TMf2jrIaEMjw/XhrvRk\nZub7FZ6zmsZffe3EyRn9PRP0YDNCWg0bg3qLu9/l3zE/vPqGVt8FNZv+oMSB\nTKDKl6dr7/g3Wi2A4917CQBPGIMdHSXRebQA1xZp/8pvQwwKokJDZ44UapGN\n7SmYwDP0ruFT3uPxICXuYe/41wTG4sVSJ24rLyhfmVl4nbMgy+z2hCmc/nq0\n4AcIteJLbPQ9ksYpDPqg/iAKPuPGTsjYIhj/D2rdIj7xYFiA+ebHBpcjjsUT\nQdY9lAazA/kR1cdP65UqdEMbusPd27K6n8xoBWUu+f6I4gvVbxV1WTpcliq5\npoL08PQIeTRntpOTmgJEEyxkxf5guIQRMazqkSmiO0/goPgq7mn6Np3WWB7F\nFupr/gtLyvHpFREqJ5ddpaH1jJi2YcD3KzsnqTbd2QYyeRYt6f++AhYtQqhe\nWhW+a8ZHdUSaLxOUmSI2d4s1IrqVhZ6UUQgPvC7eZjOiwrztZ0tcEDC9TXRB\nbHz2Ca3LQZLfivtMyQihel+0c8HSzyOPcZVUb8uxY8UUuEBZ8iapIIwCrwTy\nznnbl+1Fm6ur62Q+7w3PDobWyaRvETHnS9ZmNd0DgIkKofoKT0/kgGWGpKCO\nwR0P\r\n=bCs7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"3abc5928c99acd2d364e1e2e901d19e89f5ec16b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.5","@storybook/router":"5.0.5","@storybook/theming":"5.0.5","react-helmet-async":"^0.2.0","@storybook/components":"5.0.5","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.5","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.5_1553468794763_0.027408359792906234","host":"s3://npm-registry-packages"}},"5.1.0-alpha.14":{"name":"@storybook/ui","version":"5.1.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"aec02ecac9651ab5ebfee3359f3898bde29f2829","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.14.tgz","fileCount":150,"integrity":"sha512-cNpQ5T4y+bcqpOM8kMAjyosQ+hJgN75/ECZmF37+FpDXWU7njzWa0g5c9OjT2AG6/DGG5hZB03bfAfk1RQvETg==","signatures":[{"sig":"MEUCIEksvDuwputzAEqBjCGTPQ+YC9xOGUpGbQEbrFMvs79xAiEAvoxUSna042mkhvRJRd/v4By0WLFhJU6PxQiH/msqvqo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":886082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPUkCRA9TVsSAnZWagAAcG4P+gOypPqc2sYlCJAlfcXR\nWJVbes5o/T4FrUxF/d1fLsBP2wiN4uQfC5FwTPyjQHor7Vsn22i+B+aWfV8E\nLoHHCaqF77eIVv5v/KC+GONmseXxzUDoZtt+4VMis66O+96eciuVoW10CGEH\novtTZe0vwx73ig05aCmJe63ROKIb80Pn3391wxekfIt9qNkWmXVgCRQHIbqT\n+FgmlslP23uixkfh0k0FhVbatgQYUUcL69rIA4Kn1b1sDXvTMCRk7xLGij5y\nb1UyBg2+qRI/Ewq/xl76XpzYcaWTAm/wZlqF0h4rJ+XAZV5W9POoQx1xlC8z\nxH/lI/kFp/CJLLsY1H5MEiILkB9K5BxI9+f9vWSnmK7mK+sp6XazOBiDt23r\nhOsqJKnOXDCuJRIt/bU3mUh+B1qVWDm5vtFwRyIE2L8lfCRk45EH3aaXfjjG\nI94eARLIDTLGYIdlfLTdx78qgFBFFhs794IswTJBcFViPvbfgcLEi+U96XP/\nvGfr828WfnZTuzDTt9HmQtSOulTcZLsmXmcXN3fIhxccCpBsHQl1I0Y1gu7f\nRq7zkFoN8EvWeAlgdh09SYLcfsF6tYbQtBTtWQsN70VyFKk+6yDCtYA3/Fjo\nKS14X8XjjVugc9w9/A7Ayc5EZ+1rk0zUw420ccf4n5OyOKOly2sxkLhIKjhy\nuxq0\r\n=GOFO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"8f95620be5838c42ec36f6d26b9cf9ab2a2af6df","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.14","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.14","@storybook/router":"5.1.0-alpha.14","@storybook/theming":"5.1.0-alpha.14","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.14","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.14","@storybook/client-logger":"5.1.0-alpha.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.29.6","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.14_1553528099572_0.34129818336547335","host":"s3://npm-registry-packages"}},"5.1.0-alpha.15":{"name":"@storybook/ui","version":"5.1.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"063bab8c7d2e732b43d7ad27ff6efe309e52addd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.15.tgz","fileCount":150,"integrity":"sha512-MsU+ESoJWqTuDIrnCi9vRSfrGuB9+KT14ghYMQLmAAr15IySPAm/9EeoVTjWyllm3f5pv5w4jmAZLsrBQS2vQw==","signatures":[{"sig":"MEUCIA03zsfBiJzU4KBfa/bTivZTAjej9rrO4+QJEAg4P1BOAiEAxY2/5KQ+fHII/synV9W5Aua+XlxLUlGkB4KHmLFAD9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmZh5CRA9TVsSAnZWagAAQrEQAKRGXRiO8uPLZCPYWvuv\nGd1QHNZRLrYCTwh9UdlF5Rb41QrcMYWLRVz9Lx8Mbd6bIG8WswHV+hRqqYAY\nzyQB6bDavAiL/8AYzVbH0iaqogEDwBQQTGhRnEVAVBYFUBPIz4/HIXrZUxLv\nIFi5xGvPDi7GAksREmuyvmWlWFGrMO8RPPs3cAFhnA6lfaRiipcMTGqaeOSV\nu/B4TzX6P/iWDDU+vD1vJkjcRvo+oEvPDPRLdywaqfwT35AnVyYUUZ5dCKP4\ne6NF81lGWxVk+fD7chQFnKxCM4lZEr1Q3TTac8LD7OBMlPojg7x8crT4fog+\n0azsx9NpRjwx4xLBDY93q+pj+ppAroAj2rFg6oCdXMJbulBY08TyjlLnbTF2\nDBBCsJq+YjLW37TnpMGRYerhGQihsWriKHjOaPcnaXcH9AO1EcA8PwwtNFCc\nIexBJKv8SagT/v/YsHlkaqRmlJ/D8IWd689UqmvG9rdlm5/LumVq1IjCuGmc\nDB/Fsl7Va5bia8t0a6yt4FO5Y0rmWNHlZLXpTVz3JOqvaaO8ijK3WcP65BCm\ndVm8JFGRtG5qwZSoQuHSEovD+zWGxvCJ8EzwohfGVHmuBJCcYEA+SUS3ZEY6\n0H+xDh2keVx/73xV/p6hBVtkIKv5WjljJJj2yw9eZw9d48FxTKWGgIxyTTD6\ndRWd\r\n=CkEo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"7550a437a261abf4d80152287fbd591715b627e6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.15","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.15","@storybook/router":"5.1.0-alpha.15","@storybook/theming":"5.1.0-alpha.15","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.15","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.15","@storybook/client-logger":"5.1.0-alpha.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.15_1553569912045_0.1229842180371854","host":"s3://npm-registry-packages"}},"5.1.0-alpha.16":{"name":"@storybook/ui","version":"5.1.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ecc1235f25b74fee176e6b029f339b3b6e716903","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.16.tgz","fileCount":150,"integrity":"sha512-fS9Vo3Mkf0wT905AwMJaW9qsUukC6mzHv/xn1Wbtp8sEOcDYIKnUngSjs2YstBdOFQ6yuUKWtfvIk6vSsTDW7g==","signatures":[{"sig":"MEUCIQDxPNzNZpAHtWxF5tQ0SGxX3uyFwlPoUR/2HlTBBrFO/gIgfx8gzLfi/5dvYpwjMkzWrAct1mnXeBhLgn26LGmbdQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmgLECRA9TVsSAnZWagAAGw4P/2MGArKFn7gFhKucHqrs\nYvRQKl06bsZms/LPzCaMu4GSb9kx70z1JIe1GEaK6Q0CIiRkSy01FJq2jaPK\nI0K5V6/Qpkjy7eJBSYShymKKEXQH8IdX9DruwB/vGSeeMvSFRa23Hm/mqfwE\n8M9ZoRF6pKPNBX8cP00maOok4VsZtwKXmZ8uoN89WVKs4x0E4+hz/5ePShl0\n3egU0gbE57NYDDp07Y1cx8NiUfXwFRS06hB/a8n7V8LfHkNyknOg2yVe7uZZ\nzjH8CWT9evLKJ1txweyabCssnCGhvXwtMMsAQ7IpPY9g6WgxX0aPTCd7YQIN\nQaAqGkTLZ02FJt/tUbBY2CmvDQro1i6JvE3zlSE3JgoP8tKtl8mYE0XMtUYV\nWPIXvoZNo1N9YhEoGlL4CMop9h6Ri1CJYB/mN9UZkvh7hWc5lOCZ70MNu1iy\njgIUnmfOHiKAks1QlapNCJp5aIBNKEJHS5rCkP3kb22wCSPkuUufT8ejmjvf\nB3cGx4qizvIWmWv9oIc4pF2pAEc3mpOcZXsodamLt1P7k9cPiN/jOcu+7OxS\nu6rWbhwHb36IAZFz4Fqimwt38iPsX9KZLaVmP9g8rhDr2rDxEjq9G3Mr8dTg\nCLZSr1oOL3hGYmSBTAX+Kkt5ourxkO5GMagdLhR53xG5KrDnASy+FKqFxU20\nqt6W\r\n=6K++\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"988679f4b28cc9b4b0c12bd7cc975dfa84a62743","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.16","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.16","@storybook/router":"5.1.0-alpha.16","@storybook/theming":"5.1.0-alpha.16","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.16","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.16","@storybook/client-logger":"5.1.0-alpha.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.16_1553597124065_0.5627421530217853","host":"s3://npm-registry-packages"}},"5.1.0-alpha.17":{"name":"@storybook/ui","version":"5.1.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"7ac41e0b6885028ce91e8310d5192d789c77ec50","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.17.tgz","fileCount":150,"integrity":"sha512-07yz1eCgJjQagU9MV2pKwG+/f2WopiKAu7fxeXKKGTvtNcqtgp8LFDTf9E+VxM3rEb0bYk91HF071nzeIcNNzA==","signatures":[{"sig":"MEQCIEAdX4N8A/OMH+tgGtDiu5cdaHtSp2n0an84QS5223rBAiAweEbGPwrQd5Itg33caf06AzjD0prfZzBH4dvKVIguWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmiOeCRA9TVsSAnZWagAAAeoQAJha9bK112ysm6rovozK\n1wbnYUnMOJLSnDA6fJfD0w2xuY+TWz1a0gqVksnRLyIuq2rBiVLL0cc/DTgT\nizQ38kn34c+Ce2suUJai6Kcn18/v29p6wNZ/wurvQ7qoIorAJvH+uss/oUAN\nKXLYNvpED5NC9+iPVITqdqZI/rKXvapKJcK1pV+DhT/ZsF4CUh5VmzvkjQhY\nY0KRlf7tO8moNDRyhJXb39pNdBfDUSCaG+RlwzmiO5f0wrs1dVH61BweUUp3\nYxi4g7ZjCdhxpFQRPaFQ++rx2ep2Lh0H6QWoVuVxbaqEgS3lFlOj+jfJDx4T\nRjDvPlwyIztnz+330z85cYCRofii38IkOhCmVqSWWTEw16fDTFUMRQqixi/o\n4bUD7QEHMbdbYc1yyYn1ykMfItGog6ynt6f4085D//lW9TvPgk3vowwjXK63\nh46DVJ8Ey6HIN1TxFubefiyivB6/qAvpoXsQSiWo6q2D6sgK/PTJW18WGGDA\ngESVL+ieUE7ZY+qDtYMjfFOs4pv7uZj81aJmdJFWCXiEEMXRiOFCpuo6yihk\nPv0ZzCP2Bj+1zEerhaziWNc24VMHMrc2pU5ohAUIo6MeZcMobeA7Wf+47MEm\naOXlutKCngZdBUfRG1DZsSkmtXh810v6VTQhno0yximvl4U8oNmJLmNKPXsb\nOpQw\r\n=95pF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"99379542434cc556b2c063056c3fb6e3ab0bdeb2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.17","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.17","@storybook/router":"5.1.0-alpha.17","@storybook/theming":"5.1.0-alpha.17","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.17","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.17","@storybook/client-logger":"5.1.0-alpha.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.17_1553605533447_0.2146031037695193","host":"s3://npm-registry-packages"}},"5.1.0-alpha.18":{"name":"@storybook/ui","version":"5.1.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2c87f7ca4d6186903b7d8da62444198453e8e531","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.18.tgz","fileCount":150,"integrity":"sha512-hwahlSLpCKduq+bWN5a+jCfvQd2EOwjGMEXHfDB2iTMb7KPLwbID/HaieYVBPCtPSdDqMZwalqKTVvfNsPXK9w==","signatures":[{"sig":"MEYCIQCB5eN3zWH4qed1OwffMkhWm6wRjYsk4d8vALNwYbBhIAIhAMuCWAYXB6PALasZPj30U1H8tgLtzJmy1czwTrU+L6ym","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmrfyCRA9TVsSAnZWagAAvZgP/Rto9A32ddhhx4/s0mTx\ncU0unF7WEyEuMHuQ/JYVjBezkaRxUCS/IT8YbUpbP5dNtrQj4SHduJ5MnaJE\nkultJkYdicuLgSL0kNOWmZBODAWZVl/NhmG5rw3u0dBenZhauqP28xecVfMO\nVt+Bg9MhPghKz3O0H4064UG1/E+4+UNAc278NNI3gHJ+NLCLJ8iBgcjCrXpx\nVLNMhrikrkaGRJGTmiPAMoOtbzxM6Rk3GVz33JbY1Zb/vu7M2bwr1g/xO9ka\njyLXbtOHAmGh2C1LJEMi+lLI/vVI+SvbR752htmp7HisvK1yKu85I5MKIBYH\nY8eHnIn5JTd/oLdYYva5yjHYQO2u/2lGpnrvtdkODMZR0FG3oToa7RAMZm63\nY/JHQodB89384GkLscaWoL/xCLO208S9MRsiRKf8PI4ZzoRZOM7RXs5GlgyF\ngM8n9quKSi5ecdji/5iR9nMCMusC0PeHZi4B9DtGAeRJvtUMMRwyOjmJoSzn\n65tBnAbX4+e0QkpNCf5ELpTpiQcbCkPt7vyLwR/l882Q5y2MVS9heC4nCh2E\nzCVgGz1WlHVnEb38GxHoUDvYC7gRvXj2AVhCAal02rBQix1ImF2epgy9AOwO\n72MuqnRKJgJIs1r2TwjPRw9lPqABf0sVCCBlaTRoY4f+n6lcNQjPp3PHfatB\n2WwG\r\n=wt2D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"8941e4449a8a4525472e45255fedc4ae068852a2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.18","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.18","@storybook/router":"5.1.0-alpha.18","@storybook/theming":"5.1.0-alpha.18","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.18","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.18","@storybook/client-logger":"5.1.0-alpha.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.18_1553643505788_0.13411874649243916","host":"s3://npm-registry-packages"}},"5.1.0-alpha.19":{"name":"@storybook/ui","version":"5.1.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e8187b91ceb5f5a7292e85d876d563459851903e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.19.tgz","fileCount":150,"integrity":"sha512-ya9h0RfBG1ny1+mlFXPSKO4Wre7hUtsqDdrGgEUpwvtUMTfZKlvnlLxdwWS3GWLXUXabqMG6I2H3CHKqkcqOSw==","signatures":[{"sig":"MEUCICv/8YG/Q+MW31VOYWn2LzpeSQFfudkcBGXGIKZJXhyeAiEAhs2TPzZncpxMmfvwEMvQUWbwjJS5ivNaKNJ5c/7le6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnD52CRA9TVsSAnZWagAAvn0P/isWrjMNXzVhEE5SQMqJ\n/M6U939zmMXVWMzgNS6tyARULjrP3tFgCfXxk47zc52ODYfv3CUi9Hx6RtYZ\nHCA/9/usj3tM2h6SC139PbOgEwbHf+Yr4sIdLYupzLRD+vHkfsDKMrigUJ3X\n30HBS0YLICJnfKGtmc6W9k4xnWzVmjLxhtiVZzzJlwJaqZBFzsnBt3fZb2Ez\n4a0PFY2UbBIy7Kjjhkp5LBBHuQaMuFyKm4DkmGZz1rnMOt9Lijm8plRqHnJG\nlGltGyeBvd3+no09hm09krJV3D1IOBQWyS82OoRrHKeNdZ+petGF6TsWcNHF\nyjlu7GwqiPjECndximt0lRugHHM5zTZCWX100/SSv7YpQA3rONjiE5ClIxHS\nsqQEkDqXnvO/AdfhZiGqc2g1ngWXcaWWz19te6PeWtYy5Dbs21g0PHGhQrV3\nLhuoYeQ0/iUCnV7cIxMgIdLGvryPtbzOcI3gBUMFPbFAUWd3+pm6OswkfT2L\n1GR4P9T025JZWJ/6rM/FCz44xpbS8cFseahF7rd9wl0lXsPVseRsFIcyZ7Dj\nEAgMjnkWPUVb8LQMUKz0DCd+4VMKoE73m4GMaRiJCz24QQ+bG7s7+iaBzSDw\nn1/R/6uSJBpZMxMJFDo0qJ31h79ehIsJVoITbuWnzTAD77JyZ5NByewkzt9W\n7LI6\r\n=7jID\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"c628022f9cfcce5b6bf048038ee9338754282f12","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.19","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.19","@storybook/router":"5.1.0-alpha.19","@storybook/theming":"5.1.0-alpha.19","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.19","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.19","@storybook/client-logger":"5.1.0-alpha.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.19_1553743478152_0.6531628097991264","host":"s3://npm-registry-packages"}},"5.1.0-alpha.20":{"name":"@storybook/ui","version":"5.1.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2e2f30fd480041d01eff0cc9f5f8bb535899bafe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.20.tgz","fileCount":150,"integrity":"sha512-bcX5p3YBfAhFPCwUThmTEymCjhe2DWMlPK9P9ByyzW7QNtrVPbH0TvmlX2XTOE27nnuFReP60I+7hSj9/kfidQ==","signatures":[{"sig":"MEQCIDg+dht9Pur9PDNPAFy900dMT8uITZIRXjtRzIOPL8lXAiAgwsjkS5B0K/S8UqKXeNQwiOIiNP8mww268S68dzHLvw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":884618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnX23CRA9TVsSAnZWagAAzSwP/0Pa4oeh4NsFQMvmSC9G\ntGkHxBmNUHZod4oTmIxHAYyIKm8iVW136Q1DABRHbs1lNS6lqyc1d538yR3B\nuNIsBhAV+ulHwbozJK7LMAP6olgJVtHMcfX7JN1uK/sZlmANibKYT3O+HUI9\nSAafrye9qfh2eOXuKO3+W3n2fkudJBMDTX6+EAblyFXWjfgsyuJ7OrBE3SuM\nBMjeLwmOypPcva0BjaNsnaRTB82aXI23BSGhAOM4GrkFFltvFmnFGKYsWvki\nppu4QOkJ82f6kxCZarBqIDDQxAkJFslkNNoyOz6P1zwiouPv4GezHz3vRJde\nN/tjcOCnXtUxxnlOyJ4OZe5mhYowH0iH9+reIGHsNLJlCKDf86PlrFis1F6R\nXuKGxXmxbyTaRkACXCYHOQRzzYE9hHuMAd7THio6Hzwu5riyc1EwE4lT6jvT\nMEDN4vVMC65QNsFM0gZPZn5snmoSUdWGOEmQePHYZQ0Jt+c096xKMHDPFx6T\nXJ0Mqg4G6UG2SIs8J5ALjUbFMhnl+SditjSEfEENPiG7X7vPFavMQEK3zx4X\nq0+jM5W3c6jEDWp8drDtDZnSjYNd3AbUDjRzUJLmq+h7BDc2CDMe0YQ/VaFd\nPtP5ntQJtSBj/PHOeHwATRlPYIfMV1ww4gk5C2rbzaRiyLP1CK2lVdiTJ+iH\nxe80\r\n=lZfi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a57917a19ceaafd5f5c42bd47821568f9dc26390","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.20","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.20","@storybook/router":"5.1.0-alpha.20","@storybook/theming":"5.1.0-alpha.20","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.20","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.20","@storybook/client-logger":"5.1.0-alpha.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.20_1553825206429_0.12093692680080603","host":"s3://npm-registry-packages"}},"5.0.6":{"name":"@storybook/ui","version":"5.0.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"954b1284d0a21e8c0154e56c2f76e58e66fe09fe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.6.tgz","fileCount":198,"integrity":"sha512-XmyJokPE7gWKmZXAVXnlRZgU3vQKyUMt6KJrg8Q6GqbvyaPN6p5OlLVDZMgPA/5DpCGfMUEp3BMbJpl9SI97tA==","signatures":[{"sig":"MEUCIQCV0961UM8m97UyUZgvmpdGC03uoa3SLcXFMwpVLps/IQIge4tKVVlVkt1WGXxeT/REsdBjui3o238fyGcTTau8kkA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1144230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoZeLCRA9TVsSAnZWagAA6wIP/jy42Lzbt3Dc+J4Krfh7\nibeQ4vBhd/2rFHh9eVP0x0gH2n2odLHB6pVNGyMpEGRh7Hs8TKP3HHpYUTv0\nGs0+lgA7R2TdgmFbnDJ9gdlni/Iyp03w7I5ef+QrAGfna4R5ak0XeyFtb2Lo\nJqwD9wZfaa9Z6KcA0vaYSSbfAq5ksg2e51gMAnx6zSLRjlBt7sfSexB6Fi+j\nIqqB1P0RDGIrrCrB3iOAaVHD79KWIoiFsTVg7vgRrPjhH16brCrUh5ikgfwi\nj5AGKKF6LXboDQs7w/ySoImzKpzlBkqpVraY49g4IKqKAg9WlCDTuvuVdbP9\nmWPjYXMpfI16FBCtsKY/xD8vFxHbrwYCBv8hJC3UQq1j0xujttagf9usiCmD\nlBroldxXcf8i3BH8LNcS2PC20v1U5ai/FVOVs9fjN8ut41dJ+7GXRn5eHZnW\nxnwXJeAqluYGmNUI9B1BCsEw3sH5SN290BEdwFZFWtC0nSn+J8Y7ziF36q24\nobetIuMZO4lefcNtGww3ArsyZfuPsEyrs7rnN5Kg0DIhuTxJPEZL2u0PxbSA\n+t8f7uCZn9rQgAboMRjkHXgO+wV6+coLaQ6o/OagUADVOoOl08O3uzrNTRaY\nyxwaBvGibIHfkK9bJIqT8S6TkzQsLu6W7T6NAEUTfazisMi36DcP1B2OGRD+\nkGTr\r\n=b9Do\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6633eff16e5980aa74f862847a48fc6305c876ab","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.6","@storybook/router":"5.0.6","@storybook/theming":"5.0.6","react-helmet-async":"^0.2.0","@storybook/components":"5.0.6","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.6","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.6_1554093962713_0.07680430264941251","host":"s3://npm-registry-packages"}},"5.1.0-alpha.21":{"name":"@storybook/ui","version":"5.1.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"38fb1080fba4beed0254c6f25dee0794396f8e18","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.21.tgz","fileCount":151,"integrity":"sha512-zjGYR0UHXprgQw+Wr/Eg0MbC38EDNqUlRwXP0mH1/iFDqn5KybhmhwCLCt4OYrII9tJIsQh0UziRNk3CXgiLMQ==","signatures":[{"sig":"MEYCIQCG5+D3HqmnWRWRKzJHkYDXmLJ7ssLjcJgkIc9Xoyox3AIhAKT2a8urEVLx/l5zDqgqC7RIQ/8jUklenSfIG84AXHoy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":905546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpiTHCRA9TVsSAnZWagAAAD8QAIAejHOyAhOjgBchtvOq\nVSp+wFijkpP9G7fW5vwdo4KQ8MJN0sQ3422UdfxjETK4fUEjL7zEc5JFIuUe\ne34BI7eFNnaihhKuQ2WMed7kD/cJEzX3kprKQiW4PqFbWAUruGCDXlsKvsqX\nUwYebjonJsaMSG3UDttIQmW0MGEo9a+JRlQx4I5CMIpptGi9JUywJnZ7VCvf\nHskGIVXFhQCELg53WSbsyUFmDhXhNHClfG4ewD7i82J7tklqZ3VxQmIoVM8Q\nkxlYCVjPgpG2LJq/GAqL7l3WRvdFnVNJ1ph7HfL7NLLXlkIjPTRKlUvNQs4V\nA5+JfqEIXNhnlB1lxK/UppRzhMyCtiHrilZDzVCGWo4nW4Jxt4EGnK/tUsaF\n7rW/U74xEk5nTJkHxngLNWW/giPVfCrbQHXWqz8N9JpHsiMy/tJEmp+SLUHn\nwQzSMre0yNbgFx4OseA/8lGsDn2eZ/3LhY6yVIjSYi1Tt++pdzlxQ3P3AEZm\n5zflegc0Ynlz8UVA8Phi80u2a3DTgXDyz031brDNDDCOwsHJxipY0L2w6Jw3\nkBnHEPM/aB9IvN+gPueT89UD8axuWVKNxwWpsy9vNx8cewaknim5RkwqQJ8u\nP3lIUDcVCYcsBB3Tmblr1XGeVWwpy2mM2N1lghfOZth+pDfk4LnNld0VBgH7\n44tj\r\n=oe2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"99c262545d1c106802ada148883ed371901f971c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.21","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.21","@storybook/router":"5.1.0-alpha.21","@storybook/theming":"5.1.0-alpha.21","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.21","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.21","@storybook/client-logger":"5.1.0-alpha.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.21_1554392262775_0.6833265302255178","host":"s3://npm-registry-packages"}},"5.1.0-alpha.22":{"name":"@storybook/ui","version":"5.1.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"430ad67dbe639919fefa1154959ea21be31c235c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.22.tgz","fileCount":151,"integrity":"sha512-o4pO0uQ27Awp3ikhMhauZ5LBYAE7OjeUcm67J5az7M4x2UA6yoYCQFBH0O/1s61+zsrb67xV3AqYvkqaS0lAKw==","signatures":[{"sig":"MEUCIG9CzUSom3242kVn+J64iNaUJ5JdLO7c/0fpProTjgXCAiEAuAnxj3hs6BUcHH7mwvnReO/v2G5p2AkAtWiuobvo4xA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":908517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp1wVCRA9TVsSAnZWagAAuXcP/10yXOsnqsFwcoedcJ/W\nQMhtlWm9vj6VB5YdA7yoRa4kmmhfTvEiDfeOPflUXzouWpXdzdDeeaM3fY9E\nv8kTt90L3MaJLDjQvQ8kANoFqtbtMnBqLSneAoCwy3ivrn9QJLzOdgp5vtI7\nUVwlK5ixwe+mKN1IAp5TZHDcVFwsQJ4dAbYRcq3ciu9MyaNL6FDhkZyqWqg0\nM7zfhQPeOyCLfD3R4EdbQdFkwutakAG7j3YRz25v3twwWw4pTsm9xTTt0jgB\neXNABtDAPiIbXYcCApdvaPA64OJgDcFzZe3C/1JU/Z3sz/PC17nhkJ/OkHMB\nBcn/VYZ/POVp8uWczXRU5Ii+ZooriOsvDKIEUv8UuZhGkl/8SC/kV1mIBmpT\nEqlrarGMTsdUc3G4l3FthQFhIFLQe/30YT87g+o00VFBEXuuAI/cFEIMcPrd\nbiWmUj9W35zihozjj1MkqVr+PNi4/QWnXDnewUacwwTW+PpU9KQHZ8CRgv4r\nLg9fiLFK7W2SCfhSnkc814MM8hMl9Tb13hw1+9kDX6QseUGM9Tp97MiS2NQn\ntUMAbNqiqt9RKe6ZG2Ia6CZbdNNRW5c2XZYpajuVt5WLdSUC87W+5+QZaQil\nWmWTgeC77ut8wfAgGcJ/b817jAdEUxk2bu8YT9O9FTyfE9KdKzs7hQdN6ub3\ngfBb\r\n=vwn4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"daa8d43e0e3975d36bcdbb6b488d6def33f5b70a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.22","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.22","@storybook/router":"5.1.0-alpha.22","@storybook/theming":"5.1.0-alpha.22","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.22","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.22","@storybook/client-logger":"5.1.0-alpha.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.22_1554471956443_0.20618626325517098","host":"s3://npm-registry-packages"}},"5.1.0-alpha.23":{"name":"@storybook/ui","version":"5.1.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d1e2c453ac318fee6014b5a2dd753391434a05bb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.23.tgz","fileCount":151,"integrity":"sha512-fK0eJIpr/c3AWTQo/KfifRRmVvEmrlDTScH3lftTz6EadI9xWg0nSghriqpc+3AO+ZKiyHSdqsKkTVwX8tX+ng==","signatures":[{"sig":"MEUCIQD0ifYSIrDK8FHH0VtGDz2VEq5+PcPywGzO5IzG8FfxTAIgG0ZORjmzTjRVSmHqHj+moOQLbQDBgMTBxaB8UKaeVGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":909028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqyI/CRA9TVsSAnZWagAAphEP/1wauOxLGXlyKpSlvmaS\ndlveRtQ5k5AIkUmpKNAEvU1f4aVzvbSZjNFB18u5YPcaCnHydP+bOPYqBWaC\no+2hD0nJkR0rYfwVJgz9eiqJwfW6Pvql5d62n4ii5+Q24Aj0mYia2lP5EEn/\nOmidAmIrdYW+dwd1pJexrFyd75RH2MvaCu/TE858SA23WCjKN/ZIikT/3UYk\n15z3rxtUrK70M72vedlhTqRoOfso53jVvxl/Lz3pM3Fr1TdTaLB6wdxPrFAj\nXsSODtvuM5HUkk1l/fFDuBcqp5odBE8UaeUHWuSpEg9Ev6KEulelEPyUJQ0s\nVXW3A+ZOWO+wd/yJwogRAqsKkzoCSBW44xeHhmuzeOifofRfZIWGHRebqtXP\nkvbPxQkPhfL2/PVm+lN2Yi0Ymz+mGDiIJqMuDomDvKUgL1XwTHwc3A6qDDf2\nQ2TlZJrpTBjm1pzWBk45isf2l5zj7VlzKkfKs5pgO/CMCfWfjdMu0vHhcMHs\nkloT+1xWsGp/dOqsFiH81aKpBIZOruwC0I/64T6SUTeWekxkoj4BTZ5Iwkit\nZkk66pyvy08FXggZ4ek+QO8hyQqLEbvyouCG6uGlFVykUeftNbnJL4Lggw/h\nIp+nCpHImUndWKxdn6oJCk2bl5nnMno6H/U3IcKYgbOWHVVr1SaJ0yVU2iIA\nAGPh\r\n=+o0Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"3cb0dd5af98b1941324acbf47db43a6498f6ed59","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.23","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.23","@storybook/router":"5.1.0-alpha.23","@storybook/theming":"5.1.0-alpha.23","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.23","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.23","@storybook/client-logger":"5.1.0-alpha.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.23_1554719294965_0.4120163891846591","host":"s3://npm-registry-packages"}},"5.1.0-alpha.24":{"name":"@storybook/ui","version":"5.1.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"861fe10f8ee5ab1e01a4031338fdfa1b19240c7d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.24.tgz","fileCount":151,"integrity":"sha512-4bf3e+y0wc0nOqNsMMOVkDyd3P04vmNjX/kkt8kI66enLhjZuLACsEbP5kEOqmk9JMuReFLR3IktU/h1AbG9cw==","signatures":[{"sig":"MEUCIAlATRH/MH7+aY2YNtT/0lYdCJ/kNO/69tJF5QqasEInAiEAsS8ggjKGSXTySH720V+pqT6SNzMlHVjQCP11YVYoEpY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":909262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrAB9CRA9TVsSAnZWagAAE34P/3kuGGYnbOE9ozltV1Zk\nCZN+23OGva/rb41tQ7fTXrkamvG+6/OXnFDc36m4COmU9FGiOUOHKav0HsH+\noRlKdlq8M32LzO1Qxuu9TjNYQyeollddOyT7AFqE4PSTyDpO2NQB4gTAV8ss\nT8UYYpwWjQrTU5Z/H28ZO4SxWvwbVnyILQS5a2hMFHti/Sh0brtdXJ9+Wksb\n9+hxTSzjFxDgYZBoA04ews5JQps9lXJnWe/9Yr7zuGCtM/68qUaWOuJPxkwi\n+x4XTt5so9PcMTZLe5ghQdvV6VJT0rA6ouLLztg23U86KAn7Llu0DYE0Z2mt\nkCbPOUZmaMg6L4FUXIxifGElGWip09d1V8MSaOTjOAWxtEbPhTdaKzb/V1Z9\nLgNmeSsbyFSUALf9IO73LhDcea6kYjHHoDqKT0KFsYumDR+Fhm/cZm89HWQe\n4bmgdu9rxK486cSLRZCLWgd9w6aqqbjwRw0K4KT3nYbkuj9fuAhCDP/Px4s5\nwcrGHszIR7uRAvWRieK79Tjlgv57Ka534fJIH3pw4MEhvoF23mkqtL8gTH+S\n/TjC4M/oVMdkaA5hC+i54ui63bxXFCeMx8CrFz2HSU3YiKSOq9DRl4LUOyVU\nAZhrFDsN4o6hm08hX6wIkyCjQ+Ajjpj6iKBg06mV7RRkQYAauuIRwcozi+f+\ngpvP\r\n=mMrq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ea8b7217c3114f979ed18c7da625f72a15e6b2f0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.24","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.24","@storybook/router":"5.1.0-alpha.24","@storybook/theming":"5.1.0-alpha.24","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.24","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.24","@storybook/client-logger":"5.1.0-alpha.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.24_1554776188255_0.8651030198530161","host":"s3://npm-registry-packages"}},"5.1.0-alpha.25":{"name":"@storybook/ui","version":"5.1.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b2bd0723f8d665686027df845e1bbc89faac2005","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.25.tgz","fileCount":151,"integrity":"sha512-HvuvaRgxo8kOBSoFHKmCRida8TEu+75Li97tFNzt64XsdGodMmbNxiTn6jJtDkFNnXBdtqeE+CnZ2Hql0bA4jg==","signatures":[{"sig":"MEUCIQCeaeSViXsnZfDpDV1nXH93V1gX/D5uR4E7oLG75IArTAIgMdld9Mkfb9QsmoGFWlQUk8PIZpFGskSAbAQ2fqIhGrA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcr8adCRA9TVsSAnZWagAAilwP/ig+GzHPP7yEoKIsBaH4\ndGjbs9nvuPBK4ZWw7J3l9sByyJuCZEWyhYlFHQDBiXezUPUru/Sz7wpvU5PF\nHjPRxU8b9DG/AAqc6b2xmiLNXXEltTDd3zD2hEsX6EBXfc5K3epPFBAp1pZo\nhthFDDn5pjbSEiOBf1A24EwWn9mX2IP8DMUvv5hlXYTnUFTynup8xc9i+ziT\n9NiY7dZjeBYjO7nC6rTYxJjmO8WbpvmqsXSvqYzXJ/mkP2j+bHFf6EeU/yKJ\nNCou4a2l64SKO5TmAdURcTFSHpsN6mpgt/mNUlThCyCKgrl4VHQ7dLbc5eTV\nGJ+DptoUp2IJJ1PjiZ85UpgpBnH1gvHlDzDtenPYgWTahb6rdr2wjfIKKuwV\nVcy2R1lsS4bj38RTs3d/UdJ6bRwhf38eDRcNyqe4yAUCqMukDCaHfajFB3UQ\nO5DpkVTEnHwBanFHg5KFmJNFjJ3HThX+jeY+9/FyQP5i3JUifsXxSS/0RN+P\n++a+vi+JEerj40Ofk/IeepEvrocKLjduXxsX831sWJN3VJ5WJ8oWikTJhmAh\no7k9vwjB8LDjI3cNqB2BAZ8I75/NxMDU9D+Yc8DvqCv03rQQL9y0tfV82pSx\n6V93A9BcRcts+38pHgSuKI7MobvZUf9T2o9/owaDRwhib315ALdrym5Cbz8l\nvpQk\r\n=2jDr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"eb7a36ff07abac8899979e7953b34658762cac78","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.25","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.25","@storybook/router":"5.1.0-alpha.25","@storybook/theming":"5.1.0-alpha.25","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.25","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.25","@storybook/client-logger":"5.1.0-alpha.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.25_1555023516198_0.45593200362247854","host":"s3://npm-registry-packages"}},"5.1.0-alpha.26":{"name":"@storybook/ui","version":"5.1.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"00cd752806d3901d7f1e6cbf2c490b1ef84fd8d2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.26.tgz","fileCount":151,"integrity":"sha512-gBLjF8Xtv27kwKduBvvoryd9O37CgW1KMUKtDMaNX29o2FkZzNStt+c4jAACm4VFaxUXw63wVZpgX/WHqJZFGg==","signatures":[{"sig":"MEUCIG6wAt03oa5BWp/nhbakxCCqRZ1R/0ZfY7rrqtIXSJRVAiEA0bqi1nbri5dmlZGmzQquolew8tVoGs9nW2D6+ayr/9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsTYTCRA9TVsSAnZWagAA90QQAIwFPld0wxNFNiwu0vP0\n1DP6gQ9bPAaJgmKXNhdHn89hY9xxHmxYkE8bumlmHfmucqM1HJokOKMf4K/Z\ntIvYyZarZudkg0lPzoqg6CS1oK+NL7NGK2u0naws8Q84MbGiHgOcc2AGfNCu\nJdVk9wHMkRKHBoTqZFxbBPCgxDES1kab3oe2hPI6NY9s3X8plDPAdkq8eycY\nW0hIOR46nKlNPQOvNtlPl+TxzWYyFvJACLjg/YnC02KIwWX/s27WUpOWo+lD\nGrE0tyfn9S6h9pq7dsVtuBm4f0f3ZmDcouz8NKlpe+SIEr8rT/OV772KrUtY\naa5n7WvCIxp/5aln47OTEgc6JaoV9D6ZOCqweJX/5ImwqbsHr2GsV5LtWwnu\n2CKdSXL+9sAE0gkvPjL6TZ8VWdKvUS4a7/M6DVPF/44uf6cg7c99gZIyn7C3\ni67zzoWBzXowPLnQ5Ow87THrZuiIa2UoaY8ueyXaKAySoB7JUyB3+jLIGWYb\npRfaGgU7Cz9WkF7gg9/gT/E7MafkicUlQ33e68LhaIyZb1XTUnCpIR+0Z7IP\nTxSCvDKfT9C+Xm3JUI0lZmeIK1vS9a91HRz717oBmQdTnQWimzT1x6TJMWTY\ndIj8eQTuqoK6nbpUGuzfuPvs/8hP8pCCAFKDtW3p4ofYaAW/2ZDkz3f/6YPY\nEVsR\r\n=PLob\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"17b8fe98b908b8b6923e6d97c0689b25bd1bca86","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.26","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.26","@storybook/router":"5.1.0-alpha.26","@storybook/theming":"5.1.0-alpha.26","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.26","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.26","@storybook/client-logger":"5.1.0-alpha.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.26_1555117586390_0.6384980781707625","host":"s3://npm-registry-packages"}},"5.1.0-alpha.27":{"name":"@storybook/ui","version":"5.1.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d2a74e89639e016536153db8b208d3f3c7f4fb80","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.27.tgz","fileCount":151,"integrity":"sha512-CdciJrQnNyVCZSod5dypcK6uKQuynD036OrTrD4wn3qauaZulNBQTQ9ktdBL+JYS6BPLgo9XsBjYFOd46riHXw==","signatures":[{"sig":"MEYCIQCSS7h5QgXBfZBmpKP10gIwIfyPCRm5dlAZNzoh+GySgAIhAPqG+fAIod8PEOurZYdq2Yix7glQZ682gBkyAgEor2Im","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsov2CRA9TVsSAnZWagAAhj8P/0QNbHiT90RLceJ109af\nYY5t1DGXbnHsaAvgR1ewm47GSx9GKrO1+KNQdLQ8QcULD6IUOaz69NzXi/jX\nA+0PuytyMGM3YqswTBOe3e/8TfVxjNwBfVVFOhadghTQPeK5e1OhbRCoWgJx\n44dN0yc6RH5Ufrhdl5rt9q2JoXC5ZeuOX0WHY4GgHK/q8dApLVMFbpYJ7sn2\n4srReCGxjZ/oIL5sGQbCOxGjd00/0YZJ+Wx+w4zcSN596wgf8PgxStEuVqJV\nQxJ77RxX0J8t6uVidnQPCXx1J1YmUT1TH/CNjet9tEHNskceflNmSSAItFj5\nyu1taGC7OIrLgUAp+YcQKXBc2DS7WBagZtjT0CIEyNTRk9q//i5p9LIxzwgg\nV3PQHfo5DvQyNX4RjGyJH/v/7M8QiGt0tlN610GVAcbJPHvkIqtBTdD8MyyL\n0JRDK3UyzCx0N6ZcQp/dQTZm1XVrVUq8gJz04f7DyeT1DhOI1nhLhMwaDVvn\nEzADOQf3avsLXOo4VPVmZadPXuXt7Umxh76kjqPBalUKvQXrww+1b3cBywQz\n4vOYKBBixKH9jRQvCq7W03dXY0Gw+Acle9pze3FYXUiUkqOhBEeDU++W5qk0\nncUDVxSHnC4rYyCKcaMvL2vxN5NKIPj1G+lij/fgGWN0wD7L/aO8LkY7GPzh\nTQ8c\r\n=GBM+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"f506e15f54e79480816ec633651eed0022641533","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.27","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.27","@storybook/router":"5.1.0-alpha.27","@storybook/theming":"5.1.0-alpha.27","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.27","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.27","@storybook/client-logger":"5.1.0-alpha.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.27_1555205109199_0.20133404101866348","host":"s3://npm-registry-packages"}},"5.0.7":{"name":"@storybook/ui","version":"5.0.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6e7edabd83d3d17b1df5c4823bd1dcaaf7848a96","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.7.tgz","fileCount":198,"integrity":"sha512-AJp5XCKGBNZSooFw/ZxSbj86uSWCxGYC03DDAt5Pon4Uyia/jeI0HFFjTsMv0EbivkRyAbIpGhXdsaQIxj1ucQ==","signatures":[{"sig":"MEUCIQD5R7ZuSg8ugUtFlP+9OH2lk42o4AqI4dxDxNRbcvDJVgIgTYr98Q5QnrhXSx4mOzhQGYPSxCKpHAD85jxMjViygSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1144990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcspYKCRA9TVsSAnZWagAAVz4P/1Bld/IXNazulbxXY85L\nC0s5iliKtaZwHVZ7L1R8ekvzcCWD7uhkpHFz5hv6197lUGhdYCJknn7zRSPr\nhq/LjDP3lGbsqVDqEdlysep1UFegvvPh2BtuhbVbKDBa3XiV+4rSQs13UI4Q\nenSJU4YYDsAdqpaBLFO3fCLxoGO3HTF1WKOjyoQs1d+m3szoCiZb/xGIkU9p\nnq+QWGcbK+3NnQgZ0o+A2UoaW1dJuu4dJ9M2/7b6RQPc3LPpxUARXv//nwH1\nRhFU4qXQHxkuDOfMOlPlNO3r2jYAYAh3EOG0YDhDULbMSG2HE9io91kth+Wu\nir4FiRcewjy9cmaqZGUcr/tG/YrEWYQFRee/c7WmcVjUixL3Cuv0VvDJsB8q\nuzdc4+hewy5eff6Ipdhbr5J+dgAn0cFLGxxi8sACLmBGvFdI15yoK0HCoRQP\njA9r0zXFEk7pSbnj1jyMd3QtRW/D4b0mWEYk4IwJ+2rIvSzo/BO+rJzJIt8j\nf2PmE685yyDiBTeT3awWIWYmzTIGPg2XG09iSPHwOLoLo2kFE0exzpdPalCo\n9oWJCObBe2MsnjR2p38WSum1aF8KjrZ/eyoyJlXAkBOMhYqUlOuZLbIIwRzd\nCRu+QA6PZuuJjVVLkxLm+vmS3eRCKfNFmZ2SBOf+PN1fPwjbnQ/HwHO4GZLz\nuMow\r\n=0J4u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"effb88f7bc652d85535be04c2e6deee8d88e33bb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.7","@storybook/router":"5.0.7","@storybook/theming":"5.0.7","react-helmet-async":"^0.2.0","@storybook/components":"5.0.7","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.7","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.7_1555207689117_0.29049911502106696","host":"s3://npm-registry-packages"}},"4.1.17":{"name":"@storybook/ui","version":"4.1.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"03b6c84bbe92cdeb38b8638d0bf6c14a110ff54c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.17.tgz","fileCount":170,"integrity":"sha512-ZXM2pPaOeE57nwoqtTKFxNNoiyui705qzJdzpBgIBvBW/TfnCwaB4qNwsQPXSSHhS9kPk3mM5nKDGFtkhbbxMw==","signatures":[{"sig":"MEUCIQC91dtQqE5nThXp4JAMI5cFutuuzbGwdxeVFdkZNSGVlQIgc2pW6joGkhv7odjvCFjD+oBRldpeWQMQ7YTFAXE28HY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":995785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctC3xCRA9TVsSAnZWagAA5gAP/23hYQTPpL4ukQknmY97\nQaDpsKgtSiT8gYQOE6jWdh5ivXefNjmD1uy/il5nxRlIH26M51RbhMwr/Goj\nqQmafM8zo450bPOW0JYZaLqs36SP4JNfPKN+zIO2P4DjzDPQaJ6J7ZaTpfqR\n9MAgkDe5gHA8SNujFN4FSyLmXd3IzwVMD/bJ5PH4TWIJVEI6Ez4YbwiV0AHl\nEI2D6d27L1ZNTzFjWBdxATL7pEWJ6vfa5oXNySOddwl9wBGOxGeOxbsCpeMs\nrl2qdbSI376AxcGxAOt/ofcc/cpnAvy1anbR8L05o0Q0RWZd6RvoDz7qVpY8\n8h0sz1FVjRIB7f8ThcZCcyEMpl63eoxL/ZaIYngq6HYJ5O27K7ZhmenbwKbZ\nVyCS1+IQ1BXpKBV0dulxe9AaR56N61uRpDSjjL8LvTe8oW9A4AB0gWVR+f0N\nKN9aIeltM8wI2/QVIdQ7g+i0CQRD/BIe9GJz3P5nFaR8DOcwYtSxWKJMwBO3\nxLdrSQIJ93OoC/ve/3BDqaFt3Y7P551XgazTDzBTedobyufSL/J+q1DgXj0D\nWC0FKnqpG5qFmLUCY/DjKiLDlKX6P8QFPvElyiY0jo81qo1ZDjBZo2BIULGD\nD6ClDN1wuBbVIMsZxZEMfCQw+Igy/vkvZwQqd0W8ctrKsuoq24WHYYRUiCdI\n8kTB\r\n=wdtg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d6fa84ff729802ce556cd1998645fb2131fa608f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.17","@storybook/core-events":"4.1.17","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.17_1555312112084_0.20866087635945973","host":"s3://npm-registry-packages"}},"4.1.18":{"name":"@storybook/ui","version":"4.1.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@4.1.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"72979c99e6a4f01f847e2ea9ca2a29fdb57c4d8d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-4.1.18.tgz","fileCount":170,"integrity":"sha512-4RfNLWN1EoLXIQ1AAJ3Dg1Kj9ZiJJWk9vTEbnkzPtHtoAGpneIuwmw2ZD+pyNALlF5g4bKccfHDCTVofiwZzCQ==","signatures":[{"sig":"MEYCIQDS+qKrB6QUCTBKrRN3DH6q1eCYuO2fx8tMF+Of68aVOwIhAP+8N+hAPcQk5SolHX4a2UomQK1D1zAPBW8qUZJIHdwP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":995785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctC+3CRA9TVsSAnZWagAATpEP/0yBPrx8no53t9cLmgHS\nPmEEhTq59m3xbtKbrDBOIs+zmw7b/FPCce39E1V3D32a7/guoEKarBap/qG/\nCjWXOx3ositwNJjjMyP/do1xqrNgC3eXWmfxSAtD5qxJbUQSY3cvXhaF7CUU\nzo0PXku4FdZ+xPD8BjW5Cio5+oPtkaqO0k1UzpiKY0iI7/N0hkRdOMm6yIS3\nSZADTC9YttssQttDaq1Yp8HmKx6LjlYPS3IOGB23q8IwXuArrpjhn3hd3gx3\n8sxfvijXBctTVeikL3IloFUf48m3jsllFHFqDh3gyk4lTha4uKZ8NY2fkqb4\nW3kwG4KXMXBoYjazLqpFBi8hyyApWhWqs29hbuZ9wkmk03YOjVQZzEREw87B\naFFC6E0X2HeilCPNgb/dhH00uc6oUQKP+SmlM4ixz1llHAkuXK8lwKvN/0f8\nCjoQRI9yXpyJwHnOLNmQ0GHRIO5qhEvwxj/xe/3R9hY0MkBkKNgULTQJ44hJ\nNytz4brN6qs8d2bWvwAEogUOmxOBegtokJm9IZleOYlrZghAE3IxLVOfTFWg\nOJ5Q488aoRWuoNNABWxi5sM06nzFF7+8NveXG1a7VDDN7+pDZ2OD/CLgPahF\n9yZe/BaBINpDFdmdOpDPQH29qAJR6/55Jn07642N0CuUpnyLiHR9yMfzlb52\n0atH\r\n=Ca79\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d88a0bc5c71f06d5dbf023efa58b9f3f0b58c0ae","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"https://github.com/storybooks/storybook.git","type":"git"},"description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","dependencies":{"qs":"^6.5.2","react":"^16.7.0","global":"^4.3.2","lodash":"^4.17.11","fuse.js":"^3.3.0","keycode":"^2.2.0","react-dom":"^16.7.0","deep-equal":"^1.0.1","prop-types":"^15.6.2","react-fuzzy":"^0.5.2","react-modal":"^3.6.1","@emotion/core":"^0.13.1","eventemitter3":"^3.1.0","@emotion/styled":"^0.10.6","react-treebeard":"3.1.0","@storybook/podda":"^1.2.3","@emotion/provider":"^0.11.2","@storybook/components":"4.1.18","@storybook/core-events":"4.1.18","@storybook/mantra-core":"^1.7.2","react-lifecycles-compat":"^3.0.4","@storybook/react-komposer":"^2.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.23.1","terser-webpack-plugin":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_4.1.18_1555312567322_0.7346106598908166","host":"s3://npm-registry-packages"}},"5.0.8":{"name":"@storybook/ui","version":"5.0.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2c3dd151a22c9eb4e78d28af3910b7533b624742","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.8.tgz","fileCount":198,"integrity":"sha512-Q9bY9zbxn4oDQ2eT8AxUj0O6eDVWHOZYEuTuijFSgJ/5bUXZmhB6aMU67QvdYJlAn07k7zcR5k09Q4a4kqaKXw==","signatures":[{"sig":"MEUCIQDuO0XJ9y8xcVKWiUHfeDxQnAgMW7lpePjrTAEq4squIQIgCR45JidnFnPH7ubSbAR+0VwwcTSndvAW8vzDl6vzZc0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1144990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctDVFCRA9TVsSAnZWagAAOIUQAIq0LlaQnRtF4JKtXXJ5\n7rm+4kigMV6bli8f8UdqmSz/jzJ2pjwWlqyyRsn5docgbwo9REVvW5I+O4nT\nI4iobYS7rBNa9eTI37tPfbMWqvUgjN6hAPmSOxctbV4YC/evK0lgUCKFZkrY\nTqExVpoz8zWjRu2qrBQriA+TMvsjmwvU1lvltdPkiqbF/rDA2xMsci1/A7Li\nIOc5fLgvO4SXkFN+uLWdtW7AbKxEWOF8yVy6T5FrubzLjgYELr1w4z0RZkZq\nGU2NyDVJFiMHd+10ClhOI6ryzMHenYpoD7ieMcRzV8eLEdUki3VRca1IUCyJ\n03SD1/TFLUEaCfiEXN95COuI9RYZQkwuiK8+oXxIYTtu6tQiK2u0CmiG6gsH\ngeF8tMjsj0FmoKjWGDOkZ/47OsjP9gJbLd2zxpN/OGAzBRWTy2r8Jr5+soyL\nglH3Ixf+cnaWjAfchTjUuUVV25uxW+8tp2nIbaDFGoYiqNE6qaULKGt7ULa8\nkAC/HUtorFsWM+fU6ptX4Z1GekowJpolHgudd9jhMhLWvmX2g+5L0PT18RFO\nvwFLDyxMkGq4V89xp7FEt8ulcXwakp3RyeCJtGkyd6WlHUsCzPmqok5/+szF\nRScKKEwOdGc1f9SsbMHEfnkVlHcoUWc+7z01Pr3jhPCZnMG6ZkiQFiqx+IRS\nskSR\r\n=CjL/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"1aeee184088d7e446d2733d4109ef7ca7826189f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.8","@storybook/router":"5.0.8","@storybook/theming":"5.0.8","react-helmet-async":"^0.2.0","@storybook/components":"5.0.8","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.8","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.8_1555313988911_0.8334201779064367","host":"s3://npm-registry-packages"}},"5.1.0-alpha.28":{"name":"@storybook/ui","version":"5.1.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"6c7812e7aca3081bf28323d2ee0e5b4a583ecde5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.28.tgz","fileCount":151,"integrity":"sha512-/KSreqysnbhgJ6eAPRU/2eURjB4ENvR193Kw791+KUJBZRtl6JYqoKX1GMmuFWrUBWHZDvq3KWcBLzuXrq7i3A==","signatures":[{"sig":"MEUCIBtDc5bE3NkqNdL4KTVDKr9lE6nwv1masINpUpEC6lCzAiEA08smXyR/xSiFRhTcm83DkhNraQpwuGkRLB1GJnQsENE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctbJICRA9TVsSAnZWagAAQbwP/i5PzGjoZwFxU72lBb7C\nbQ2ZYYSbV3FVm33Rfk82I8PbjlYjUUzBNHYbgTPIFzLIrCCx/ZQCslpv8I/L\nv2M94D4/U6gfSgDBzEZdFN4K5UuMjojibIrQ7y7mMl95Wk3eugBo9ezKkry6\nVDBlHgBIarTELcldqamoZuqscH8rXf49r60VTG2a/VbDm53Y2IReGVuF9RI+\nvArirWegDYCRWnjFdw1/JlpEeN94ZNgOalxBgRZYco45FwnJ2htn+F1WPWPZ\nzKwXs/TvhPFvWXw4+IyVm8QppCkzXnrhn7ecG9+Di8QBDz5mviuqQeZDiZ9h\n45i41Y5r554PgWeTRORniJ6oa8CjuqT96C8XvrrubF3BoD8GvRv0K9b2H98D\nh5n2h2Gipa3t+mRek9+IKQgTililvWhihI4vSdm9pGvWyMCf/rNZdCxoM6jX\n3ivDulv+/Ejsut+x1xCTCao4h/SHvjX6jYVq+MdHSLlYUx3jRMpwArsLoph6\n6rfQV9OixcEKYPxXVvfqC9/cEAlOrJGYJ0CSUCvM8x/GdL44boB3DLwhYxmt\nQGryfmfD9N7YgVqno4j6RVuujcblE+onRBG5/d3sedg7ssts0s8Tn7TFNts2\nF5GRRrXZLsTuk/EtQ6gQ/UsLTAh7IOLdlRsybPwKSkGJkqOO+2WaljwyE1bu\na3Q0\r\n=NmO5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"2a55ee012f2243b7d7b24c192a7070e3d2824ac0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.28","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.28","@storybook/router":"5.1.0-alpha.28","@storybook/theming":"5.1.0-alpha.28","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.28","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.28","@storybook/client-logger":"5.1.0-alpha.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.28_1555411527192_0.18304299860391016","host":"s3://npm-registry-packages"}},"5.0.9":{"name":"@storybook/ui","version":"5.0.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"87f317703690cbb9ef7084933e60a8bbe1c1a701","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.9.tgz","fileCount":198,"integrity":"sha512-4GEtSDT3TL5NICgPeXnm16MDu9e0Yt/7Ummx8jaUdA9okOLDklqTshfHX1LZpkk8NvEoX0l8R56yVGAMgc0GIg==","signatures":[{"sig":"MEUCICVqzdgTBeLvvmUJVt3SF5hw+Blcse27raJXgS94mIF9AiEAwRU+trBHAWwxv7U6pQsSJ3L+/YPsSj5qwb0uOCfwlMU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1145681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctm0iCRA9TVsSAnZWagAAKwYQAKC+M5DMdrZfj66tee2B\nK+jgvqXOCobuswkS7P0141leTANno3HGbI+rP0w8yxeUSMgz8iiQdQE/eZY4\nEBiQ2sMmPPuIxA6VcnSeupp50ATOMjejJlGV1p1H3DwooImEaKauw4Q+t5qY\nutDHmOCGsC8x4QRbnngEuAXZO8KenylIq5j+DjXSb7NO/f3L3rFKlpXINNSS\nRffs+NS3rS/TLuQlEqe4SUQQxUESzdg6xV7zXbeD9oB29ebggcdt9pqKg8q+\nfrSZG7tHFpZlDfjgy3vZUQDjIPx+fl9ykg7NKzKaeOfY8lelH80k90yb2Xi+\n1VqlMsRJW3yXS2Ku07+TxCAksEcyRoaEsO2fYa5+dePNDhVVpmCZMamyV3zf\ncxrivtWByOu8Dd57UtaUXsIFgFRCMoKXKUOD+88iXRnbJpTbbiaOoSiToQD6\nvMzjNJNUSHWkucJSAT9vLsab5FUyK47GuB93cbT/MzYXWPH/0jkFuqKnrGIW\n84MOoz9lIYcCUWXsbzzOIznbT3xmJQIjRkNcH/A0CTRxkndRQZj0RE9jh8LS\nvuzZkRM1L8x7mi9NxZ48C7QGOHb+ED4eR/iltTeEjnudoDUr0fP7X7Py2zoo\nvSmHFkCLi5yImdUoo9ip522GUliCRhLImD2SE+2pFykEEl3vu4c3jAzIHzKL\nIVFB\r\n=HaQq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"51fe8ea7cefd14694d130f840371573c0e9bcf23","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.9","@storybook/router":"5.0.9","@storybook/theming":"5.0.9","react-helmet-async":"^0.2.0","@storybook/components":"5.0.9","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.9","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.9_1555459361949_0.762321532326955","host":"s3://npm-registry-packages"}},"5.1.0-alpha.29":{"name":"@storybook/ui","version":"5.1.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"53b1494b0592426da985178585641a27a437cfad","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.29.tgz","fileCount":151,"integrity":"sha512-0TU6rZoG3cQF+GqvTBNMpUzYyN+vWCOXMhQkwpu2BhTNXIFeE+KXr/AMZvRtB4+NgRkpyqTfVt5cXsh/x5OkBw==","signatures":[{"sig":"MEQCIDzdcTAvzV9tCSqyPrXUrMXcAjewIsems4OyH0qfgmuSAiApC/9b4AMeN837c981RMDN2Hmc6SuUWEplUIzMRE5FVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctuTHCRA9TVsSAnZWagAA9B0P/RxHEAad9X3HSe+dsxiB\nyiGdQdvmRR2i4mvV8fI4JD2Yhxfr53Fm0Z5fUm7sdFJBT8yVxtvIDeGQ1clE\nvUhN6S2E2+iOyILYrg+VC1yvHRfAuwd3Q+nAvTocVO1llCGinj+/UYQWRwgp\nS+3E0LANPjfy0HA3lgLG1km68XpbyeFvJEOA/X4S219WbXfjk4LULgIJ6+VA\n5vH93PAPpoFHs7ImEc9xXUSqkL+Gsg1Dh+WqmeeJly4rVsvx9iB7QPutLgZ6\nNNJ4qRWvEqDv5ItVx9bsWaznxJb6ShfjkqsHBs1yHXFrKOuQEZgHen0kZBNi\nbmPVPhaqNioWkWq2CMOwRKh9cecCVWJOZub8kbCXJoHivZ+1OsHm/Z7mpqAZ\nObTvWMLvnLPJ451NTOkI8TLp5PmVyIQ60Y98WAtz27hByIDIvegw+n26b/iI\nGEV3GRDlXjx+iqnU9UMx/TThzl7hSjcSKxQtREzriybMRL1Qn6Cd9snqUYw7\nI5n+6Tq+MVRPBbineYGDJYrppon7Jxmlpf98rrXpvJeoxs8PFMagb1PQEJlf\niDsy7Qdx2wMqPUWS882YbdcNTZVSxXpsPYd5+AeBpHRAjbB7sysHqYatcqej\n8reWIYa6l1UFKIeRu6BurRpPl2sGq7msoWnzEZaefrBb1gjZpdV6akYT/hiY\ndkII\r\n=V9Yl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"93978131030d52c821db049a3891402949a8435f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.29","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.29","@storybook/router":"5.1.0-alpha.29","@storybook/theming":"5.1.0-alpha.29","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.29","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.29","@storybook/client-logger":"5.1.0-alpha.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.29_1555489990069_0.042924166231475214","host":"s3://npm-registry-packages"}},"5.1.0-alpha.30":{"name":"@storybook/ui","version":"5.1.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d8e000a0a5c060c54542d43c81375481c214af82","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.30.tgz","fileCount":151,"integrity":"sha512-yxhFmCspjxkEJsnII38dY5LRmH4VU9UYpNLCCka4P3UKI2vveNuZmhH57cyEk5oGKPDz/eBfv6d2Xpn5CjMAEA==","signatures":[{"sig":"MEUCIDp2ESZamdhnaPdlgUvXrTee0lXpKr2oo47xmdw8v2RMAiEA6RqPDb+V+xbEkLCzE78yTml+iwSFr+CcunlrT3rRCko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct9G7CRA9TVsSAnZWagAAn8kP/1I4vTcuHDREHkHOaT23\niFsxRLnwSnfRinOJ/dmpKKnA8DxDGORpyrooon3GVLVdaTShiZrBdROOv7kw\n7khj77lorPxWvjq+E2G1RUUkeUXRprxbhOCdINDSP1dY/TTDOX9tOYKMYObT\nPDzxoB+MiKOdHRnAYFrVo1uKQl+ZkRxLnw0bCy/Lo8CejMdqi3D9clFbDGGC\noH4+POZy6C2JCvmXvqDJyYBAVO5MNfoVoyU+ov4a+XN2Ry4fqziO1CXOzhBz\nuNKCbcq0vVdH0UHBj92Dp+6QqgD33SZdj1Iq/tGhsk2yKdx1OaR/poDs53B7\n3uY+ubKRjerG0uZJyeEoVNk8EYKFIxFfL/Xo7KIbu9KZ7uZFd/DZv08Mch7p\nRqw5kJ3dQXhUYHCdNWFTtJ1pcArUUmOiea+cAKloY1OOsndMr/LtyU7qini2\nE4/IkHHz2r+fCSDjszi6uh7FN+Gz7DfgM+HVmc/M8Xg6DzFnU7PTI64LmJ3D\npfTC7CMVcYUypPWSYHMqScFsJeRFwrPimKSOnCUlZ/ro534bAek99P86R/rZ\nxuWyog/a/itXK2p924VxDbBZzd/TpgXs0hNSGJxk0w71DJYHRTVDO8CDOo0L\n8URGF/5cQnfjcrA77nPyoNUV/DsKow+Ebows/VzGyPK+8qHHbIgugZUxTIxB\nH+hh\r\n=RIPt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"da66766ab9819d0ecbb5b6bd5778dbdbf21acaef","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.30","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.30","@storybook/router":"5.1.0-alpha.30","@storybook/theming":"5.1.0-alpha.30","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.30","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.30","@storybook/client-logger":"5.1.0-alpha.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.30_1555550651211_0.24934210501290854","host":"s3://npm-registry-packages"}},"5.0.10":{"name":"@storybook/ui","version":"5.0.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"58b7d8c706776eb9c048d3dc69bedc8a198b0609","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.10.tgz","fileCount":198,"integrity":"sha512-iKMmfY5MCJ3hVrWxqlN0t1sldJhnx9t0cXp91yI8Y+cV190Yw3KI5nE8kHF2ETInhHLfSRSl4Ssz/Xi2s4AsKg==","signatures":[{"sig":"MEQCIFgiVRWigpdEHMdkLZk9AIhqtUToH/wNKliq7IYcM93EAiA8l9zM8f8vlFon0x4qHG7juO7JqeSHqu/yOYIWtIDkKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1145943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuBSoCRA9TVsSAnZWagAAbcQQAJysoBs8XJLoucWy6LO1\n8Ms34I4uxcqhvAKsYXeYnVdX/KZIUnbN2LpuM/Gxx1przMf4DvKXYK4P4Ty5\nJcYofuernP7bxP2RH/wH7zoH6bs0oUjACHRNyhH0bp6x3tHH+b3bh7x1yG/z\nuWZMwDY7VHbVQhxo5NiRx0WEBsxeS9QNH9kjwhn+A47n3DQVnxwiWE1GKp1g\nwnDaXL0WqvAzJxUTktXOZe1PhInFr7hHDEJinxohkkREV+7Z9y23oXhNSo41\nFCK4IyZ5ecsAVAxzvfiFuNNUpoQQTdHPhCI4FnNnfwTDpaD3vRkiP8jQxdib\nz2k2nKW2YU5eQ8xSiN6MdqDNnU2JzNoPmkZZYsZcphQsu7YhjD3LjheMY4tj\nT7at5zPS6Tx1NjAlCEMbX8YL8CouEa8buGoqe2KY+TVbGs9kis03Yk1JevFI\nOaZUBOi+2F6a7+l5mcItJfsvBrK7tjb6wPQqp2Xk+UKNEJKB6KTawd9q5sJ4\noMBcNdynx9WKo+56jxTl3ZtaAum4G4YYUbJiFEbyXok6RXPAGAlxzNjaLPtG\nHWwaL/p6JLwqlQRknkAIWooWUg00KZpfaELSSid3VhsUSDl1tMrwZkDfbegz\noHBT5o/n3ELUIm9KriydLU+H/qU7+oTUUlR4g9KpzCXIFJmjk6IJuOocilvV\nqfgE\r\n=w3+c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"4b2d44172e564e4ac09eac3dddb7908e4cacb046","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.10","@storybook/router":"5.0.10","@storybook/theming":"5.0.10","react-helmet-async":"^0.2.0","@storybook/components":"5.0.10","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.10","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.10_1555567783655_0.5028952269877116","host":"s3://npm-registry-packages"}},"5.1.0-alpha.31":{"name":"@storybook/ui","version":"5.1.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e0f57a5a3a7019fdf0614944c0047d569e468204","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.31.tgz","fileCount":151,"integrity":"sha512-0cu88rcyyBDB63Ft3kEnjHhTgBiIkMAIDY7eXg3X4nB0X22BRKXzJK5UjFZ4AQHEEJkdbpESL/W7ubZN4LkbOg==","signatures":[{"sig":"MEYCIQDb5jJHiewC1mWQkbYhuTC7clYfW2HMQpYTvbj49WC+5AIhAIBV2Xhyn06JYGhCMga2Lj734KewW8EcRATWbYm1gRzb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuVYTCRA9TVsSAnZWagAAdXAP/3DF4NTy1aR5uuLmy7dI\n69fZ789SgA2MjH1a0DejPBUZ28EOOauzRMtWCDuUFgY2VjX7DhJy+97wf4VS\niV+ARRW5o5RJmj/SUs86Eia85GFRbqKR4egoWtkCXL9bobMSVnEF8ZGVWqEx\nJ86Mn0C6oubrunIGIGyvQQNUXsk+HxvJdm+W1s+dGHws5jHZeWwVA96t7cqO\nCieMSFGaQNQSMy60kXfdMy+T10CHw2N1r23WCvzACFs0U14eZEd6y6l9VHl3\ngZQwc/+6X0dhjxlK3ZReWbfn+F5I5uZGFHWCKyPWclcdyCsQJRWWnawpk9FR\nyDxUWNlUTXF0GS8V2SwN12/UMeJJwR/rG1vV1DLZOMXGEOO3rHmSTcKDbu9J\n1qrgkE6/Cn93Mz3k5f5EXZQlwXMMU2NtpMb6C9DWpSu0THwP8vkiNfcrc8dD\nS+JhC/a4Vw2QKVcNycuj6RZ+WbsZkTxNvWePxhbpu2WQBs6D27PNEBMENdGr\nhtDdzxXpgHGlYAw6dp9VwIFLSMUHdH0fDYwG26ZkJq8RBdNochUxZtoYeHvQ\nYQxKQTiXK4xTkjtjrgjfuGQIWGP2KtUlZQHn0X7GqZZ3VE0TmWT/L0LgA9bg\nnGZyQ3X81yPAKhU8thD7hdwc+E6pwIX44nuT+lVGoRqrM+QZ9/XUEyhDaDv0\nuKG+\r\n=Wk0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"72d852381151fb01043202d4c24394c863312008","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.31","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.31","@storybook/router":"5.1.0-alpha.31","@storybook/theming":"5.1.0-alpha.31","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.31","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.31","@storybook/client-logger":"5.1.0-alpha.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.31_1555650066303_0.07580032169618178","host":"s3://npm-registry-packages"}},"5.1.0-alpha.32":{"name":"@storybook/ui","version":"5.1.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2fdba3555e3ea33f9843bb3406db79115212e3f0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.32.tgz","fileCount":151,"integrity":"sha512-C33Mq4lSMGRSQWKWKyKjljXatsvGXzAAjknhVUWWC5Z9CBeFoYfvvfvcovdO3IGoTMwifzr5YqWGqcF2OaiRKg==","signatures":[{"sig":"MEQCIFffklWxYqoOzz0niab6dcciGoIsUUOUzXkn1LHw1X6PAiB2aXcpvTFGD6Dvuj+k7pA0UgHc2IgmtKOETwKA/RKafA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvTM/CRA9TVsSAnZWagAABwkP/jUt0Bjq+8UV0hgVN4ZJ\nK8ifgmAKPAFNGdhHszLyIY+goX2v6kkOcyb05bFSu3KEBBQIDEV/iu/Cl9V6\nJ4Hycq0cmuViMHucTfPLci7v54z8v7fUnf5dtyBPSevSmA+Ysdg/o7wRbN7/\nlUTLhdy/6xJKn/PEhR528fc+JaVF9H9L4MD48N4Lv/TMLeAeLhFEoa6ZHIjX\n7V+x2j0lCDCijQJ5Jhz08mjIEsPeyPbn3Ugd9FaaZ7i6Q0oAgZBM85D1zoVs\nChYLQ72U2CpgAV30qafm/jedP9ybzBwp34riKKG4sgGvS3eOUfuN6gOaJ9u7\nbXejM2lKiCROjN+lquGAplcN81eiVSsZILlGodA72GpuvNnhOnIBocOZlkP4\ns5YAL59aQCZlgsmnRb5Jcf9INFPo1v+tmvFR8/Dm2HNuozADJRSjntvk4rTP\nVGmoqstVVSESegrSXyqR1Jz/SA4XUZZ0CPSwBZrryGsMDwfPVOdTGtsTeaLF\nHF4r0yO/qjLJS3EYcCOMbcPMJazmIY4wj+S3b9cfTRZQmdXihLI+qj62SrDj\nhwujjaOtLdNk6saVh3VpeScRowfr/e6gLYhop/9zlVgsuPyhKOCXUIrv8qtD\nYa4CD43T5/DhXPjbJghcibE6vA/9HL7rdnUjPYR45vkYdabRJQyA04o6F3Tg\nzbzi\r\n=eMml\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"fb2798685de5c0f45b40bdc1a1151c455bef850d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.32","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.32","@storybook/router":"5.1.0-alpha.32","@storybook/theming":"5.1.0-alpha.32","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.32","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.32","@storybook/client-logger":"5.1.0-alpha.32"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.32_1555903294920_0.45396697877145376","host":"s3://npm-registry-packages"}},"5.1.0-alpha.33":{"name":"@storybook/ui","version":"5.1.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"1b02242600fe377bf9bbccecfffa80130c6d13be","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.33.tgz","fileCount":151,"integrity":"sha512-LEkVymt65Ujoqesh1IyBGF7W08mn0O4ch6i25PIvBQXMfQmf7mpYleDtuVyFsNJyJ9/sSgzB1yeeXUhjOj9d9Q==","signatures":[{"sig":"MEYCIQC3VSI70+OKS8K4r81WWT+ND0XA3+kCrN8L6gYoE+2LOwIhAM4b9ZRejtNKHiEjZQ0+/gc2QtlCPeqq43RST3jhvsHC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvrEoCRA9TVsSAnZWagAA7dYP/0tg7D1GtK8VIim35xzi\nWYD/0+G2KVklzyt5XHcm16+w0atO8PRTCphFRq33vUVGEaVYmgNHSERja3Lu\nWsmUgLUzNTNYbp04KXsMyD7gEAzzT0JLgfbC6HIGjQz2bTfZK9TRMaGp/WJM\nzPSKhyK26PPb92DGXCV+fq4ukEgbxJm+toEaYqj4ORy3koCJ2cr3q/wKbNju\nYPyuD3sAs8TspzPHt08gtc6eu34Ad6E+Gx1TzUtDK+xxSsHbivdAGWhg/0ZC\nyxCg78BwugQaZF16HF7oPC5OpSS+/qVsf036ORriUsAKDbQ5MAI2dFmKCOFK\nspYNIs0ccnu0K+ocSv5bWRo+GmBskcoPTZqlVYHT3MaJebyHf62E3T+3inUu\n42OorlXKhoIyKvCTh/IyLZBHxry8eBWwSbc5NgVsXrNeda0RD0FPJF2ZwgZs\n6HeVqXC3jYJHLBbIRLyGDpOI/qeT3M8Qb0+E9VxmoxlTXmF8lQ5igm4s4VlZ\npAnifhgRkOjQQXQt+WtrxXggWuvJPRhpAYy1rGBCIH8B94kEAuzUv+LpTUko\nubuCgHrD2GZ5pZAx3ymbAkOag4LLewZB4YElNrDhgFMugbcFWvAHEtysME8S\n3N+aKw3j6kEpymqyqIZO4JnnZlbt3O3uB9T4yC6/+Op3UtUqVTG9g1lXhWsb\nXnXT\r\n=K+fP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"23268e4fecfd76db92e85b270b689368fccf8caa","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.33","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.33","@storybook/router":"5.1.0-alpha.33","@storybook/theming":"5.1.0-alpha.33","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.33","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.33","@storybook/client-logger":"5.1.0-alpha.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.33_1556001064282_0.5332432831524667","host":"s3://npm-registry-packages"}},"5.1.0-alpha.34":{"name":"@storybook/ui","version":"5.1.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.34","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"554fb29780a58875a60639f5bf36da9d1d1db99c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.34.tgz","fileCount":151,"integrity":"sha512-7yZ09uLQA8X7rgqPhhLYMkOek5Vbj0r0AnJdBLf6GphxINWZ+/CsD53K5eX+FLt7cbVydjjwP0r4azvABjCoGg==","signatures":[{"sig":"MEQCIHVGS6AcFHKCcku3twb3q+wfz3dx57gd4ulGpSJ4lA/MAiBanfL0KfEXIvNMwdlOA2SldSPRP2AFapewasaIsUywYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwHvyCRA9TVsSAnZWagAAiaQQAIzf3HQ0PFInkqQeZFEB\naDQk6oQXOl5uCTj4SKKJ2+wOwdghJaZIBiXqhQQD/mHNV25TnLH3+5T2sXXZ\nf8mCr80nU65SQqBIsw5yhUgXDRTiI9++Hp02DW4LuQeLRmJYZ6KS68OWZSmL\n8WLkTpiPvLCLsdJltWktSY/TEn2Oshk7v3sR4fLVTnNUuqCpJ+B/kTaEyOs9\nDdY8XvOfRx1wMuhqQ3ry2i+teLyWUd36IvOo7YuaEyMxYvDMD45DcpyywOWT\nTiKzBaZKwn6jzD5zZ84EXD03DZExMGpkpqHOOFQnOgks8Sd0faz/Kbs/XqNN\ndcNJz1a+5cFj+hD/y7WPStA7BhHyt2OksSIUUvXf1sD2bbvPDWQ7SWEtkTir\nr0LtGTmUANRhOrNmqB+Ux4O6WRNIouVi6tTcz9g1ZZ2dHakfzJj01iClBFEf\nlSM+jJeom2CJEzZrQB1HwN9b1NOtXFl/D4FIn2HknKKyjCmYrnbOU7Fycl22\nAQRwk9QOKV5vaPjD56q4zTkM0ce45sGpjaRvatg/cf1eGHNIJse4MPn3ddHI\n2rGHXtXAzj0JzmKgqsER3mIiMGDFi+nWoLIV+UoUyTgcSxxi1mfzWqDM3MNs\npgoHmdE9E18t29Q9hFjtM8Ku/K6iPOq21E9rNFoluU6XJ47x7eNJ6gNZOdyY\nvRdo\r\n=cKb/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"694460c087326477e6a71d8f1570196739c23f22","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^5.6.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.34","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.34","@storybook/router":"5.1.0-alpha.34","@storybook/theming":"5.1.0-alpha.34","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.34","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.34","@storybook/client-logger":"5.1.0-alpha.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.34_1556118513219_0.9881829831735762","host":"s3://npm-registry-packages"}},"5.1.0-alpha.35":{"name":"@storybook/ui","version":"5.1.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.35","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4b512ce103172630db0f92b611e42528f2c7bab8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.35.tgz","fileCount":151,"integrity":"sha512-NxDzETzePiRtl5gMQsmYjjJevykq8Mf79rydXcuYFPOe2yC16rZXdfcXsyyGY5YD7ET7aXOxpBuuIY624kMV9Q==","signatures":[{"sig":"MEYCIQC5CVspEVYDy7OHdWdwKhHK+RUkEa585sWxo3Jg9nzk9AIhAPR2tBPuNi7Zzj0Esza+cgaDUuCICvRzNld+5Vs2RM/B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":919966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcw0EYCRA9TVsSAnZWagAA8A8P/jfDDEG+mepC/jBi6G5+\nlkthal6qAJwyqnm60bJmxTIlbgvVWUb61Pl7fhDEaTGZr/mOTVhdGfv6gh9k\nX92ZxgIGInyFmypvFEOh5+jGun/eZv+ePvAXTl5KNM9Qk94O05XJr7e6HdnX\nC5wte3VIEVf9SEz1cDk6j1Oo+S9fzE3wJ3yPXMKU08KyGkSqIQhEpVByKjBA\nCADvgIK7MVY6PRUN2g1WLKxLz5P9wGQYvPqjYns/gGse8faOJa2n+JtdYxZL\nQ6aPi6xpxHkeyQBBWXud2Vx6O4MJfoMgeGu0nYxZgmj4Ghbxbe13Kh9gy6ZU\nH1eAjwmcFWJkjCSAlzAdQ+fm8Dne0sEEBwK083YO6a1MjciqeEq8ffhlIG+D\nCf42UMGddu/WhEK0CfWozLLYp15WSc+l9J2j3yymZgcWEgmdY9+fSjFG8h1b\n4VxNgfHZtN8Jny0w1A+ZV56kZQMFMcQ/Aa9T0pFHYZGr49ihb/ooEK2MHlxA\nheMhqLVnZohJWTPECXapfw6AN5J6SVxGpSP4i7dMu537wL3RBGCwHM1b8qDr\nRuRCgayHjHRbf6Tv+SK4mwAWbsKMd0H9Mm6rriqdqBi/SXt2TupG6kJ9p5uT\n81U4HQt4IZwn36TKapPeD3d9lybJ4iLJPxDhrrMmDA8RCl6nFYX/qcJ3CKej\nNkBa\r\n=Y7Kn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"e20d20a2635b442f47b95a4ce0f436491c0effe1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.35","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.35","@storybook/router":"5.1.0-alpha.35","@storybook/theming":"5.1.0-alpha.35","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.35","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.35","@storybook/client-logger":"5.1.0-alpha.35"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.35_1556300056125_0.2289852224220843","host":"s3://npm-registry-packages"}},"5.1.0-alpha.36":{"name":"@storybook/ui","version":"5.1.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d883067bb966a7402c03310b74e9a4410dbc72f6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.36.tgz","fileCount":151,"integrity":"sha512-M13iIx677r/KMNI5/rRmXB9BVCEi8gKpxChVf7LYjrzuw3i6bMZs+Ilik2QY702CfJ5mDqctobqyXvQpbb2boQ==","signatures":[{"sig":"MEUCIFEIIFsa6v2B9ckgbl8PmU+vuj81U/6+XqjHKe+tPevEAiEAyj/NwCLM/QlZd+yOAztY4z+DYBzfoqpjorowTisWniA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":919966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcw+WICRA9TVsSAnZWagAASUUQAI26HWU7bSPz+uouzK7c\nmcWxHZYzIT2pGNofv15jkXVbSCnLfuSqEY4u5Ni4GIhJn0+IEygWtwhvVvyX\njkjTRPwUSU4r/TWfspNyc/H2HnTdJrUgc73XbevTeg90EwhbFij2F/MfJ2Tx\nmyNaP7jQAkIcPJHRCcYubwWHPej9UZZN/lPBQws7C2AbhVNxJnj6aDU/OG/B\ngkz3jPsAn6LytWJEdKxoi2XAt9iXI+244U5zLCcZsbiL85x3sg2xUPMkzgKN\nfdChU4yn2dhj/2OtcHuDIm3hHLpz7pA6Z83HV2zGv5ROayxzXqy+9N7gbWZJ\nAa5QBNGd19xsdUzJNhSAGgz/vuj2gKiHpsSaPL4H0HMTC8tVTHICYdOWzqx4\nz+7VCeM6HVvae+a2Rjqo94ndxiGXOGom0bx5VlKpgK4sk+CW/fP51D9urFpg\nZh9KVAvBbYSTvzwUIjQouRRaN7i+5Cnidmm2ejdiLJc/hei3Hf6EUz1khARS\nyRM5TESrZ+FcyQW1F8z4o7g5kjUt/XOdYUHfvXziaS5yNRYzicLgPuxdOh8V\niEqrk0EaDyeZfGFo4qkBFVa6IS2mRAO7bKVcrHTo3PD7v5Jo3GsXJJp84ItL\nK8BkhSP2Sg54jk6g5hxgT/79t0TsQuh2s9hzn9LVp6zKwycQ5w8/iWTeDdFV\nuUNn\r\n=qfw/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"dd97c370e7f16ace596dc42a4a6b1d7e37a4837d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.36","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.36","@storybook/router":"5.1.0-alpha.36","@storybook/theming":"5.1.0-alpha.36","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.36","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.36","@storybook/client-logger":"5.1.0-alpha.36"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.36_1556342152007_0.9685078880359275","host":"s3://npm-registry-packages"}},"5.0.11":{"name":"@storybook/ui","version":"5.0.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.0.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"207f767d96e40513bb3887b428a4d9a81d027051","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.0.11.tgz","fileCount":198,"integrity":"sha512-APLI0J/V/dxeNYozNP5iAgVlqsEbr9SeruDI1NREpQYc+a0sAXmblbRIiAXpUuJbRBkEx3r9RIl1TNV2wp6i/w==","signatures":[{"sig":"MEQCIEX0rNKQ6amQMItMnNG1qCCSuPTxCY9ZzFEZ2LfbZ8apAiAQt2VrqJpU2WjmuFCOS7C+Gn/LPXnp1fuuhQYhVsGdjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1146055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxRq4CRA9TVsSAnZWagAA0jsP/jr6tfUQ57dQmXK3eum7\nZwEecez7IuNzKqIvQa9AHzkJ4gkmCG6FrxX4Dz+7rUNBbzmR9kPfYyrKt4TS\nJVrDw4pRsq1Wc+tlMM+7Gh4LRsBbnM9k6uGTewFc1klpnF/zAmbtNnQdcHNV\nVs/agceG5c63EKFH34QdS74gZJEKcvQ1jeeNLxGhl/fH6KHoCgk6OQfV72TM\nOImWZlsoPwu+b9hOJMnnNpL+IcXP/+kRxLHGn61V0sFfCTlB9s6COgC7w9/l\ns6N+px9xl3/qkcDQOno4tVBkjzaG6326kcCu37TnlQvVev/KQ/V3AvwBq3Ki\nF+8xAAvxPFnBQaCRGsHHlwnQ4cvUSJ0bMTWNo3PqoNHSUkn7istdWjUMQB5h\n+tL/yP/oHG/c+xYcDIgF2xXVDDPu8mkQYVnoprepn0ux2TBHYCGRHW3R5MNM\nxe1515vdcTOzW+gQyWXwhDTni4Bb7fksQphhJRH6bstVe2MU052dMXg63ijO\nbEbgpZDb2xur+H/NHxhUeluGxjEPpQD/wc/I9oehzyj5Ny0piWeXGGoa6YWX\n6D5rCCf7IzjNMYsGHTGfL8dpU/yCsICBLh3nqCXCQR42qooJJCxSRKIXE57E\n3lyQJimZU4w6r48VGbQ0iEwa/a5uTr5A6Umt+8sGHnFJPC9kw/gBShTz/6Hp\nmI9B\r\n=Ewoy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"17b0a5ced1a92d47420a5e32c981b4746c0f85f4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.5.2","react":"^16.8.1","global":"^4.3.2","semver":"^5.6.0","core-js":"^2.6.5","history":"^4.7.2","keycode":"^2.2.0","polished":"^2.3.3","telejson":"^2.1.1","react-dom":"^16.8.1","recompose":"^0.30.0","prop-types":"^15.6.2","lodash.pick":"^4.4.0","react-modal":"^3.8.1","fuzzy-search":"^3.0.1","memoizerific":"^1.11.3","lodash.sortby":"^4.7.0","react-hotkeys":"2.0.0-pre4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","markdown-to-jsx":"^6.9.1","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.0.11","@storybook/router":"5.0.11","@storybook/theming":"5.0.11","react-helmet-async":"^0.2.0","@storybook/components":"5.0.11","react-resize-detector":"^3.2.1","@storybook/core-events":"5.0.11","react-lifecycles-compat":"^3.0.4","@storybook/client-logger":"5.0.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.29.0","terser-webpack-plugin":"^1.2.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.0.11_1556421304027_0.4171601179525448","host":"s3://npm-registry-packages"}},"5.2.0-alpha.0":{"name":"@storybook/ui","version":"5.2.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9c09def976410d51978b16cd6836f24483f32d9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.0.tgz","fileCount":151,"integrity":"sha512-FOJ2zNofhm1cqUpCZpcqu5kG0xP24QGKcycx8Do7G/FYPXPBlZqbFD3dIL3EfrkbJE9kA4ib2SBX7UsJMNZIgQ==","signatures":[{"sig":"MEYCIQDIDstoYnsT5ly/dcH+ZAoniJEMSxddCnp6EgceLX3DZgIhAKACIOvBtX4WfjvEpiLyEa7njis0uuyfjmz0UTMLVr5R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxwqjCRA9TVsSAnZWagAAHrAP/1V8JbUG7XULjyt1ZkKA\nbIexCjQofwPru+hhg01agJoLNWvVzFxm+TeajH5zRw1jH9c0HNu8HXD4aGdW\nDv6DKj9NCpgEJFSR+KZG/mi/Pt3a4Vu9UMl4bu8ChU32Qc0ri9Y0E7xdn2PH\n9qFSLU+X70CQOhKdjzELN5py4Wbm0SGoL3XoOyeXiBJgkw1iBAFyApHydBX3\nFcRAAjFzKsIzlps0/PP3YZsvmoKW3y0kBU7//amKW3ggMdef+a1t3jUI+sr1\n4ZXMsT5e3WKD9Ylt+G2unEt6bBPl8Te+9yF5MQKQzpIfNIj+Oi5qCHDI1A8D\nVdk5Pr7dHxuggH8TTuIwYV4fnV8qvxP4l48iHItGgcFq3lVXiQCXk1KOod/G\nHm27YRlySm/CxnaVq6EesCPKmILNs2GNxnNR4+f6E8zcTwImetTYuge2zZMR\nR6egmpQ6C+yHQAsrqTmFklSQB+z1/k3U2hvn9LwKnOWL0Q/Pnyb9fEkdARw+\nJVRtflB1NAZyU03GihZGC0O3Xq0cQmRu1rOIz9EHxo78fToJbF5ERLfniCYz\ngArd7Qxtv3IxrHpgIuGLrGPjgZKClhlD1YLal7RsX9dLlp1SO94d/6CpXwaJ\nTo8EIUy5+zFAStU+dXtPjiYj/W2jOekFIt2ziSQw7m5eGUz7dKP6xecSh9QQ\nLz28\r\n=TOjL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"5366b8d992e80862f2c337abc2da70b01bad8b12","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.0","@storybook/router":"5.2.0-alpha.0","@storybook/theming":"5.2.0-alpha.0","react-helmet-async":"^0.2.0","@storybook/components":"5.2.0-alpha.0","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.0","@storybook/client-logger":"5.2.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.0_1556548259046_0.7436729731918059","host":"s3://npm-registry-packages"}},"5.2.0-alpha.1":{"name":"@storybook/ui","version":"5.2.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ffe470a35c805911ad6b80fab4d1cdcccde4411a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.1.tgz","fileCount":151,"integrity":"sha512-VFcEEA88wi9ZKQ/9QlnqhGAscS7OKtIV4qZ9oS5KkKs9BTW6avt81kqKWoYgKAF7bO4NdBF2gExtPweDqayVPA==","signatures":[{"sig":"MEYCIQCxzS4xExP6SFVGM6BNRWhplTFX/vO9NT+rEA85g6Z5IQIhAN46mhQUT4i+G+p6NKmz0/rLb/g8ovF4PEx0WAlK7+t7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyCaQCRA9TVsSAnZWagAAEGUQAJb+9miXxtW9nSrhxrIc\nortv1hfJLTfRirAq3a5kv81vluna4FCHBW2L9SWEeeaW9MPVgFAi4Rta3XVK\nF+FFAyKLVuajLMAU3d7dX8OkDg0ANmJqUlrLJx0uo3HR4QFH6rKZa/LgEKee\nIY8VGhAS3VZcUUgXvzTYghjIJvSLJz/7Kozyf90dQEOGUpnmwVdtfN4DtBWT\nDfgsBXCRVN6mpeliLkGKO/lAGo3yrUQN4KL1dgjLX5yz2gEPqKkWiSEUAPnR\n6SJlaOjK6uzUiwh1OtutVruiaPX9V9C8IZ3H8/81zYZm5DOVQjirqdYE3Xwh\naX/rANrkf1XoQLFAjoPISJndoldSt1McDtScogz7fty+R5tLERk3Eg4P8BF/\neV8n1xPix+ZwkE106W4GJENkDrLK1BuKomOFvoXm1wW2//y1Sskh2/V+JBw3\nbC0XbPUgj54vzkkgxyWg7FRFnoleAenf0KzbA5YuxI+Ghw5CaI7ppIOH8Gpl\niEJca01g6oTAQPF2d8G6Jo1VOhuROe+YP7xtuLqo3IkG7wqR0uvdUhmhFdn0\nudZITMlQEZV3CXwhdPp/wiMHzbGg+06TsvdquZ8uUdEGf9EY6IRLH6ThqaXd\niJs1WDV/d6K/FgyPish4xfn5GI1a+CcZ4kzQ5/YnWk5F2xP1RIovmB83Xu5E\nd5jy\r\n=/K5O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ebb70bc8946f4bf0cc90496e8dca45968f681909","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.1","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.1","@storybook/router":"5.2.0-alpha.1","@storybook/theming":"5.2.0-alpha.1","react-helmet-async":"^0.2.0","@storybook/components":"5.2.0-alpha.1","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.1","@storybook/client-logger":"5.2.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.1_1556620943444_0.46036782927224995","host":"s3://npm-registry-packages"}},"5.2.0-alpha.2":{"name":"@storybook/ui","version":"5.2.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d94c2c459a13548722f0cd39884d06681bc99053","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.2.tgz","fileCount":151,"integrity":"sha512-8Bh09mwK0J/ktxvqXyrBcIPz0jQDSmL3VrUb2/9BQRhHbFQcuCRreldwWauWkoVww24J5kbXCQd4QKWE1se9eA==","signatures":[{"sig":"MEUCIQDOUzN3Z9EFfk3MUE4NzZQItFP2/WrC2/lJaUAgqAa3NgIgJzwvtQnZ6BieY8Lp2KzqsYgOgjqCViAV7mn+U0h0iQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyDoiCRA9TVsSAnZWagAACiAP/03P7x/SeaDvkGLeZapZ\nlyaviH7eXM0hHcdFk4dnfE/prHp5GmjOEifuUoPxchWMbF/BLfLid1LRcd1B\nXc3s9/UHx9iugxTOWQuYLRC265l+NdvloZk2EooF33Uk0wHqu14UN/dMs1BW\nC8jaI/lFWibaOkzqwbtV9mrploTLQgJeT94ueIVfpF01jLuyZvtGhYKc0nZm\nS4q46NalUCQfI2a9iE8vJkRDCEodUD3Bd4EeDKNF4oB1oNN5vfqAlGQgK9jB\n57mmh9ms2/f+Zc4OudWd+FzW+tqXcCiYoQiwVI1g6RObGRon5jUIDZ0wpx/V\nUh4VSxYg01mM3AuAmz8vCMUobPeagSXdyhlZbI3DbFBqZBneVf8wdt7nC5HJ\nj52U5o3Yplml0sLovHAL3ga5h8MtdTGNXRTIL4vgMpAJsX3Vb8AfUppnKt8m\n1HgWhn7b4PIKs6tOiiEVhh233RoqrBK6DUJHpsmTlwMUOgmnsWWVplaaBhoj\ncfrm+bhKjiAwabUldaZIXp8JHhvh5irxZLfnzVt7LOpiDr+Ww49eEa1oI9LH\nBA/lZW7B679uiNvvz46XK59qHAIuPjVhGszNjlKtn6PaBd3iUs8mU8DxNfoO\n67xAPNrcADCZ0OZbXT4OWK9c4VfovI49ThR7073H902h6uYqJ7uhIWzq83ux\nRN0n\r\n=0qq4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"3bed00e28d1f80aeba6cbc37a5b43f5e32478f7d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.2","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.2","@storybook/router":"5.2.0-alpha.2","@storybook/theming":"5.2.0-alpha.2","react-helmet-async":"^0.2.0","@storybook/components":"5.2.0-alpha.2","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.2","@storybook/client-logger":"5.2.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.2_1556625953806_0.9659841409388403","host":"s3://npm-registry-packages"}},"5.2.0-alpha.3":{"name":"@storybook/ui","version":"5.2.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ada6b1d686b890c1157f3e53fb5eb6b01d855d03","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.3.tgz","fileCount":151,"integrity":"sha512-LTbQuutYmO7enRioZY7eFhCyu4qEcD90QzW5i8Hv0Fd9AWCfwjIa0HOb2tsR1onoHSls3kTCyT2jejI5jy0OcQ==","signatures":[{"sig":"MEQCIGRCItNVXBTlKJMVXHVu0VWwWVYetIs5EBrbrMtq12CHAiAq6aJnDHEyI2Sin53Q8T/vSMcSfOE/onjEudOI41eEdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyWTFCRA9TVsSAnZWagAAZRIP+wSFTGGSuP+vtr5KLQkw\nAIcvesfVECy2jVQRPBrrdjE8PlI4pX9zmSlomamYQZ59rcCizekH4tkzBCy1\nYuVj0EnwRfdb2Q+USezfDcUtpXSj2oPMZN6pKkgvAY3dxPUPvddeWoY3ZWi9\ngEF1Dgm0Od759CW2xyNGPRLD+M/nlD9pWkm88YA+WIqCGIGkbK112T83j10M\nfYsUBQvuiO84+imYJ66c5osbo60zFKvIL+Uf+54OWtj8ABVXwBhvofEPUXCf\nUch9Mal648buyUTF+CeDPs9z20O/58cmMKHHR+y+g0nZv/2E7qgsVLuqzi1k\nDOGDB0CdZmhQsjr8Gey9s7SZ1W3KF6azDNwp/gzBSu8UmAXX2eihXStfo26q\n7XkHDeNvOX9I7Xc1RCNL1OzQPD+ot9v+3Wi6A8I7u4SzdHqlMGs54NI15e4c\ng9AOD1xNvzBZDktgXGA9EZl6FkOWYJtkFzjkIUBv6saNJVG9rsdHbihUUlSO\nTqd/IBoZfOzsPCEpnPbIXcBj4Zb1wsqYm8Jrqgcjy1FAtfzv2KYnJ6kJQhZF\nbd/zy/I6uA8ydyTpk6lWq1bAhkqu5voR+0czKeWIVCP2bTtj8W5Az55/20ZV\n3G9LSjNPffiFHeWzmTqGrvFahRm/t0pnQtD8oIBTsMIf1h93OPqOThpGftij\ncSyE\r\n=hrdi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"fa856c7bf4aa33d90cedee56bff5fb4449fea4a5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.3","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.3","@storybook/router":"5.2.0-alpha.3","@storybook/theming":"5.2.0-alpha.3","react-helmet-async":"^0.2.0","@storybook/components":"5.2.0-alpha.3","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.3","@storybook/client-logger":"5.2.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.3_1556702404924_0.02304656810802319","host":"s3://npm-registry-packages"}},"5.1.0-alpha.37":{"name":"@storybook/ui","version":"5.1.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"df34e805a325b6b0d2db44bed8dcb781c6040205","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.37.tgz","fileCount":151,"integrity":"sha512-vKSPvYPAfZco9SML5bnDIBKU53DCjrcWBKeOTZK7VWDps1/y82rcglWAJmJz2SPAJFimZkn32tRpJbafACdaeg==","signatures":[{"sig":"MEYCIQD3JVvp+S/vGedXhyvobkmSofGM3pESPYB311TMmoTBnwIhAILkaBSZh5OhQjm5+SYms8282urdyr3MwMa2GaMUENHO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyXz1CRA9TVsSAnZWagAAYG0P/3yWT8SCZkyZpTFBZL7M\nrGJWLYs+9Tj6TsjW8UmYRYzZwvxVQ2qb9kjXvbUi0+qKRe1pgZyO6nGD4B7z\nT/bSHjL0yxSu2dToL/ykS1D4qZSrJY2BUkJ3Pz8othdJdSiHzGxHaNP81bCj\nthzLHYIPXKFVjfkHtCZ7brgPkm1n+aJM8e/niVeOM9dzAvUx3SxQLS4dgfLg\nunzoyiFrx+VpRSbjbSRgdcxm5ZdBYGPmovVA3ocmW57dFEc/qB2TiyzXdc+x\nvuqXIL+VWq8/hgtA3X6URoLI4FJo9SXWaU/S8pDqg5eSs1vWeqC7ahpHqHAX\nEW1RRYxcNqx2Fi5Nw3aAJJK9Gak1SQiq8BNFh4xhZ/q5novBakZ9a5chKwE6\nJBOwws0H/l2K7kIcx136U3EmtWKRroEnraOUUAP8J/64RYoxlALfCDsE0SXt\nR6ikzUTMeywT/1KUROrYqakrQXr2gDvOaUw9YbQQp9GK4nd0Ord+UPQi9kaS\nvoTPGdlskDAsdT/uJzMb1fbXUo3vsKpk/pXFds6XOPaf/4lJoVVNfgku2881\nzs5tlBESgIpfm47UaPKms5ClkhLLnMPitbAS5Gzm9HvF7mi2VSe9OeG8eFYQ\nLW3gY9N8AnVEnmtkGjXXarf1WDyS0iavACWNvATBUlCa6JmMaBK32uaNG5K5\nCIV3\r\n=wEg0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ccc1d429482cd1f59af42eb60efec3fd5573bce1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.37","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.37","@storybook/router":"5.1.0-alpha.37","@storybook/theming":"5.1.0-alpha.37","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.37","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.37","@storybook/client-logger":"5.1.0-alpha.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.37_1556708596794_0.14555250466253855","host":"s3://npm-registry-packages"}},"5.1.0-alpha.39":{"name":"@storybook/ui","version":"5.1.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"23556a63eab4d7b4e7b1287d6b6c2da56c8f7f84","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.39.tgz","fileCount":151,"integrity":"sha512-gsY3ZU1dlbBm1Z1NuwEl64qgxg7YMRCD3bhkX1ebF3OsE69wGFWNIjHukj5gElsQJ4DvG7aN9ygDC/cBVqSnAQ==","signatures":[{"sig":"MEUCIHldYFBwxMslLlMO05aUvq+a16RDV5SBlSDNDq1HV1heAiEA7mv7iWRyTj2B5yMA8l1wK8WlajPHf0LL1zbylCxoYSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":920098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcypDmCRA9TVsSAnZWagAAGPoP/1Ispa4P9w5pfDoV1Py5\nGR67w3rO0GCgwhQGbkDAV8dXN8eWEFQoACD51/Oocn7r3hS+gtmobg21T4F7\nM9FBzUsJeYn7LeUGP0y4Q58mVJK6bRTRSqiYGJh1jJp7XE8r4ajDzhX2gK1Q\nGozOMF4VrNf4HjmOkBsdE9GGcmtdFraojOPOg5P053JY9citqd8nkvGaxX5B\nqzDbncvCwQrhzcHq+SV4dzWN5/qlAKphgDDstBQSONCixjiEfEo96GncHL/O\nL+zwcZcbSrJpEbmlclMBxDNsh1nRaZrUjlHN09e6IGZpPMuYx9Zqu1T7pMLa\nOjZM/p7trSXFo4fFwqtbCBCfosbhEuOmYWDzzPROqvWbqQ07nfgWFb4q79qU\nbSs3DyUafdqPRGIshep7DTqP1TSu0WLon4wUBR9MUWmJbjyn2xJsQZuXK0Zj\njUv40690reFP6UApqwKN4T3hj6Q9pGUNUJM5TyTY17ZRFQVa0zU1/tHMfngv\nQdjX//ViVuKPkGxx8VbejKe+pKOX82Bxrz/9OydlhTqDHuV0tbV/8KhdhnuQ\n45zf/7c7AdMn5xlwMD4uWhECTKnXgD6opT97FYAasn65rWe3WyKR5JqNQB5Q\nqHjdju1+M1wynzeu1bAzKPfdMybKMLRexfn8wncrTHe8gOpFgu2Mh1qoLIWN\nyp+h\r\n=zu1O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"d2039e026d121d27376fa405939b979a9ea43a2c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.3/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^2.6.5","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.39","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.39","@storybook/router":"5.1.0-alpha.39","@storybook/theming":"5.1.0-alpha.39","react-helmet-async":"^0.2.0","@storybook/components":"5.1.0-alpha.39","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.39","@storybook/client-logger":"5.1.0-alpha.39"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.39_1556779238024_0.019138173183757212","host":"s3://npm-registry-packages"}},"5.1.0-alpha.40":{"name":"@storybook/ui","version":"5.1.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-alpha.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"f9106c8110c7460938e8f1d40da6d82ba895ce43","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-alpha.40.tgz","fileCount":153,"integrity":"sha512-f70Uv+hUwHbLvN3Q+2na0dQYqwk1sm0lHP2xPczGqPulO70jodnVq2t0iq9vn/jQOLtSNyL4rJW6kVFBL0kV0A==","signatures":[{"sig":"MEYCIQDGllqwoNTZx6g/802W5pmtPkpS26EgA25qUa5dZ5MF/QIhAPrbiWfAo+i1licUtY7o0GM1ZqYIFO4mByBnCLyW1+nC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0vesCRA9TVsSAnZWagAAxhcQAIlBJTBigwp9SfYXQAFp\nytbM2dZAzVOY/QmhOhnTeceiCqbmeH1A4ojrljNwGKL2HM+NowTL2ulttObW\n+sbi28AbE4Df3BlrvE2sKeVOpIlTpyBr1pqXEHrczyuQakjR5VAVz7QR1WWK\nZ9Ba4X5+W2C8myvhlOqBMZFMsg5a+h3Eut1LKxQcuNN3UwPG1gB3CK12EQ7T\nZXgZ2D7DH292qbfQER6oBRRIl6zQROl+afnAHlsjmqgJx4Wk/k5UCb2KBwHP\ns5T5Z5l9Y7yd24WJBXMkwC5yUmxiojT5Str2kMsYJLFQdR7Z7kxpxWlq7n69\n1DgtVfKchOX/vmeStqYmDN2sVF2B4losawzgoenO9z+GIozUyGOe6dwlcXEh\nnWlukUGJaLLEOR2GL/g8r6kyDvELHyOcO+ed4FTBiG1P4Zcb+W7+v+QqFa68\nOUlIRv5iTuFCMf6R6x5Q+owYkH29HAeN/cBA/5Ydy+bBs1qJTERXB8jnTQ56\nd8GLy/loaXMeVIKsXZZ/8kynyRCulLtwkMeljD27kDW5DWl172hE0Te6Lv2Q\ncspReMiVY9fCGr4Dt2DTcOoPWM9xM2hZ0AO2T7leLXLztON4jZtgfahtHVkb\nO4OuqFB0c13C5gkII8RgrLsv9lraRZuGFj/z4pLUTiCE4jQkwGqAdGWYBwxp\nhydZ\r\n=nB55\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"d4922ad48198f7246d70eedd60f1ea39623c48f2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-alpha.40","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-alpha.40","@storybook/router":"5.1.0-alpha.40","@storybook/theming":"5.1.0-alpha.40","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-alpha.40","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-alpha.40","@storybook/client-logger":"5.1.0-alpha.40"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-alpha.40_1557329835967_0.21750738362024413","host":"s3://npm-registry-packages"}},"5.1.0-beta.0":{"name":"@storybook/ui","version":"5.1.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-beta.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"ec6d2024440f44365da12039fe68f06baedb5191","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-beta.0.tgz","fileCount":153,"integrity":"sha512-cW8mBqgNpGYv25mc3qZBaSq03LhkWhmAiYQ0DhEgpsqPgJpzhqtHhx23irIe8kPGTuCZuUnZjk07GXwn/QkugQ==","signatures":[{"sig":"MEUCIQC2onCSZ63P+g89WyM4Y+5Jv4EsdDGNiWXVfMgCB3nkkwIgMWCwjqfDYN8TZE1vBqTlRoaMdaNvkvVUzQCPbJ+THtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1Tu0CRA9TVsSAnZWagAA1OkP/0xJHIMV9MQlStPKJnyQ\n9Lb7WJprVhqXl3R4sp1DpaPd7z9+2+gGYF4KX4SvR9wCL0UidHWUTgcD98dR\nM8fTsJq4MANsrAEOEhi5LczwqhnVz5Qqd2bhydXWQm2sY0rst3KjVR98HYmY\n2e3GU4qNqW0JaBjY4QrinxqMZdLfpYNa9ozzJE5MoAi5NDtyJPnxEh2b7TlL\nBRHQrqY8i1y/ITXQZKjxWZm4+GnakzRl5tZk1JXvcz70Cy4RD/ZT3ANIYxyy\nVPt8ceiSdh7+e4ZkIav/u51wC0TOTUBImtXs93PS4uIeqSMWqyY/jd17QlQN\nq9oUXEjHr3MHiuag1LGZypfbsyYWYpZgezzu8bDWvgq3/wJ1izIC62QmBsts\n5QoQ5zz2gcHjLCpGllFNxahZus/OB+B0KmmZeKGV5ZJCUbkWnisvwu5JDbj7\nqq0Hcvhtw3tbatevczycXJkK3kVOzf40CxnO3UxrPjqflxmsjzasGdRH1XhG\nDWAXXpzWFW/UQ9ONg/VwVQs2oYglS9XSTC9jOeEs1tZVuifm70aQDm3+cgYY\nF2ff2ulrrzz62sbYoN4JJ+LhEDa/syz7+epx2wskRkDBDbY2Y6FGsw8MPSSJ\nxpQ6SRpFEuz4Hq7x5efqCvpQxS6TQZpmEPAKiQbXVMz1iYc1Q0zoKNmG55Qv\njW49\r\n=dv5N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"564b11785e8a1951b04555be952cfb149fef1d10","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-beta.0","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-beta.0","@storybook/router":"5.1.0-beta.0","@storybook/theming":"5.1.0-beta.0","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-beta.0","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-beta.0","@storybook/client-logger":"5.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-beta.0_1557478323740_0.022743109301337494","host":"s3://npm-registry-packages"}},"5.2.0-alpha.4":{"name":"@storybook/ui","version":"5.2.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"7a0297757311aa1c0cc98c7377bf086151666b9f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.4.tgz","fileCount":151,"integrity":"sha512-nfoZb4Hz4BraxH7BIpXdJ5V8A3qdeD6qsnaBWCsCDuSLO6oNDmzHUd25+BZmOvrwOlIXNjPUwrX8fJGUKpIrhg==","signatures":[{"sig":"MEQCIHTFLUp7i4BOsClQLnH0d2vGnUMfN1lEpOF83xTb244cAiABb0RLHfLrsgwG8ZDjBrlqzYXnmYF8+O3AOkUGzY+8gA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1mrfCRA9TVsSAnZWagAAUXUQAKNdQf2EjUsHMIiWR+9j\n4wI7iuey1OdCpKCXG+aihvRZgI7LhqRA+BomlIJ0iPNm7UW27Jxc5/RaX47s\nSYVyIcFcnc810Wd+RN1IfcLKEWx9175bkP1uijVMkwCrDIREKen5ayluqOW6\nAbGHdRccnndB0iEW+lf/dk3xrIXc9o1vyszrwiDb0CI+bsv/w95ZAT+wzSVf\nZ+EzSUB6Fe540qQxdZYolW7xBqSk5Ui8ctC4pRskDQE1LgH/CXz2pw8OyHiE\nbY4wLT5XydRNZnZqnd9g/bplxXd4Us2Dr0C9rhGLWx7IkRnJRCku5pOqG83C\nx26vPi6RQiOAEuuinjOHzbC1wOAeBuCx0i+4AuPo3NIPu/bG2fLe8yFa1nGG\nA1EkPlAqzyycYUXvYKa9Izpc/dSm2o7y8UgG8OOO0wI2BFcaNDFn2Bzs2K32\nJFexs9P9eCPBr9yQXbtg1L0wGJNLxnhx/G1ZVx7i3bR31VBq4drYXy1ZOmp6\n0CuBXYBHiHC8daxtCWDOTVAQ81qwiZRKyXnx5jcOvwodVVz9UID/SZBtf5Ol\n7ojkpmxRC5FSaoYvqGWzx2eDHFFn6qn4ptdONSppOZG/faVS5S/HOBE5AptC\nkkWAqMgOp3kHYrzlVzNHnaienGWon+NwAA3YUCQr+lUFfK1/6lKGMRh7HIx9\nX3VC\r\n=HQOU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"b248902dad664229659f6807b8a5ff9dd85909f5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.4","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.4","@storybook/router":"5.2.0-alpha.4","@storybook/theming":"5.2.0-alpha.4","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.4","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.4","@storybook/client-logger":"5.2.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.4_1557555934546_0.87915232669126","host":"s3://npm-registry-packages"}},"5.2.0-alpha.5":{"name":"@storybook/ui","version":"5.2.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"65e511759a6c50950487d41da1c770b7912e7790","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.5.tgz","fileCount":151,"integrity":"sha512-tbLH82bxevyRof6plMLSTKYAFO90/af4rvN5Lq4F6K7ok3CqDdP/xrOE3unMdIBZA4qgZbCQPgf2ksS+4wHIsQ==","signatures":[{"sig":"MEUCIAgwmW4QkyjJfwp49wscZn9EzUs2CwfbqgfaoXnAOueGAiEA2zEFPCp1HF2p4uEEVhRlTjWhp+skzopJDQNulwGVXc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1+KvCRA9TVsSAnZWagAAl7EP/3SgywiYVr92yMdbBhTX\n6nsDW+lfXfK4TrMzE5hdga57R0QflgzIrEl9RuDJqUyHRdOD2j1cicAW+shj\nRS+Yq7o1H7JWfDssUifLrKfUkPol+QM2dVCwpzGWCR0b2kscGq5jQeWawOh6\n+McN7/6pBRk3SKVAFtvNk39pAGuBYtheK16qzYUXPRJwHt6pptTUBG+VmoPs\nIFK8PNq+ydO+0JS8SpyRisHvOuPjqzRTBdeEIf2azrCGIEf3ElhKFD3eJEEs\n7VLGrQbOwn7iIZmzxJgLwj33aDtiVEwLUkFnO+G/pck5biE0GYO1Mes0rJUa\nPIULp9NMyTQbqc67H9pBttzOkrLFcgX1LpsiRNDOF+YXUV+AE4CVagY1Lb4q\ngGjCb1LOa69OfcRDU7d9lCDEOnPvgw+N5Vmv8INFHJKrgMb3wvD0sQdf5wLF\nhpaLQXLQrlXX2fj6uGy6iEmf6B4bbLpDxTAz9UN19UgbXW2w/OETvmIbPPUW\ny+yo7Aoj3TO9tdnvup6TId1iP28CFkR+JQBWRfxL8L8R20giApFB+xFpExk3\nLKJwGYVv6hUY2Sggq50QYdEyL2lMdjBtLgyLqy3XhkawcexOmrI3tIc1Xxau\nykBTVfCAQAz0Hk5UBXydOYj5fW7D8F8BcwDebq8af1RS/vUloNx5ewQIS839\n4D+Q\r\n=eqbC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ccd05c1e412ecf818d9fcec689a2744f6d8631fb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.5","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.5","@storybook/router":"5.2.0-alpha.5","@storybook/theming":"5.2.0-alpha.5","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.5","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.5","@storybook/client-logger":"5.2.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.5_1557652142489_0.4239503684661019","host":"s3://npm-registry-packages"}},"5.2.0-alpha.6":{"name":"@storybook/ui","version":"5.2.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4c0804607562a0b0bd4ba7e8e4b9b946520ab22e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.6.tgz","fileCount":151,"integrity":"sha512-e15sIm5k1WmToq2AbJWH+gxS/NORIVaboJZz3s52ccgMiWKD59LO3FVVjGsCcDjp5fteIUnvY5+ODVPNqEFhhA==","signatures":[{"sig":"MEUCIQCsYAjkLu3FbgilkkGu+sGqMyL6vC1ze8vpUsryqcjZwgIgDTEXtqrlFghEdG8ZD+7kLsttU8WA4TBqcZYf4HdQ2Po=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2vjCCRA9TVsSAnZWagAAsfwP/ira4rY+U6jHK9YB3tEM\nVD8G2dp69S0nx2QMw02Jgb/FZ6wxTZ5tf7lpGd/KaCE5lgmWtLnjLW+9lYJE\nT7OhbqrtapBgkHd9DuNmC0Ndqwb1nrtZLs/NOtF+HFG+Qn9NVU5s+j4twEjl\nDN4WQxTxUisb2R0xK+TZbndR9kI7K7GsmG2Btf75vmY92c6WDydfyTs1g72j\nBhlWumdXq/src0tZ3ibJdGEsM0BnXqZbPH9E13hyTwpR13wBDL6YaSs3xr0/\nqeuA1VQzdKEJtodpMevEmKbV885HpxGgmYpoQKjJBzsavvVf8I1gTewKDf3i\nEkgE2+r8d+/9Ux10hfebQqoNT9Y24HsjV+AEumG9FAa2oh8AvNpBA1P4v00I\nFXNBFCSPNJKTlYpnV2r509U3cIs/U/OE3tlnwOUh4DIzOO5StNe7fE+PdlTq\n/ASzUByN2FL2whXfBgIgaiRzD13Y+ly9RcPE8hiihDxSMoA6RGJtxUk17+YP\n9Y1UMVz5hh1GOWELMA19H3l79xmi2E/4ZK+qCvAXZJkBxbQ0Vke6iTj3mBdT\n5R+PVdBxj4uyG+UuiQrf2jcB90E+nGQyDrSoVTwsy7f8CDxzTvgxf0nLZ+Lh\nK6g1CVRGjNmiGibGLhUqxa1PgE+kLlooreGmZihj/+W276LJTpVe9AKo5pjm\n8W2B\r\n=CHYR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"c5f2a840108efe29c836272c8d1ce7d1510f8217","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.6","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.6","@storybook/router":"5.2.0-alpha.6","@storybook/theming":"5.2.0-alpha.6","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.6","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.6","@storybook/client-logger":"5.2.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.6_1557854401460_0.1767807749285497","host":"s3://npm-registry-packages"}},"5.2.0-alpha.7":{"name":"@storybook/ui","version":"5.2.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2407b5980c0fa6ed8db13443640c1bbee2f720f7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.7.tgz","fileCount":151,"integrity":"sha512-fCqs9SB8goPvNrYoLqwIpm5T2hwQKdv4bwb1lzv52ZdmZy8AYcH2YQbFjOnUW/XV5h7wYkazBWEtJ0AMs2bPAA==","signatures":[{"sig":"MEUCIGhcl6U1W3U7Tall1H44daDYbv6zd+BNhOTzT1WzBZBvAiEAz/Bh6vUAUNWTcYBjLapv1O5m22yrLGICVXnLB4K5VDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc299ZCRA9TVsSAnZWagAAD5QP/3vtFo3g78YiQhno/eLo\nFhfnKBrE84WdVYFpehqEH8y1JYKU/uvw9tkEqiRQXHD45RFU5g1O1oINkyI0\nOvS+EVpwsrVyRipBCRG9ZkiDObLgodPrTpBDQz00hw0ZInfffcM4ecltONdE\nwgJGu1OaR6jCyeBm68P8sFaAK0QySzLmY6fUdgnItWngNns+m9snW+SJRT7o\nPBagbMIuj4Jwt58eJoahjAfj5csTZotcEm3vcKCtpz+qDzNLmI4wMfY0umYK\nfqvuUMvblr/DbFbT/fJkP7FYzljN7GW1rIGIH54y5Xdf4TOhVukKtV3A1yWp\neuAra41+1Ak4PninMoA64iDCwtaV7vSqshVVMkcn+QIW2WaTRPYRPkj/ZUXI\nyOr4fhExZprs2Yl/bsxdzZilfOrc9FzDU8XXOJ7jsVNY95BA/0JFD6JyiaSz\nBT6WjX/RiSZG8617vs+VT2i8z5UyCPVv0yopN1F3Se2HqNUvPeCes5yhI1l/\na/J3O6FCidvrPHsBw6DKJ1WK2y5z7cHVqb01N+4s/bgcGj1fQZKCJfIEBl4b\nl1xxfnSHt3Nmld3FucHgif67G0/1pxRF1QwbVsf9vXmJu3FNNa1TfOCb/haA\n2EM57iqEOquswhbtQgNS92Ubbv646zUMG5oVOg4IfO8fOewTyWX+oOHMMkFh\nYoJj\r\n=JdLV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"b86440a111b2a9ba9037c4914f391ba28eb88a13","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.7","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.7","@storybook/router":"5.2.0-alpha.7","@storybook/theming":"5.2.0-alpha.7","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.7","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.7","@storybook/client-logger":"5.2.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.7_1557913432738_0.11093465568277927","host":"s3://npm-registry-packages"}},"5.2.0-alpha.8":{"name":"@storybook/ui","version":"5.2.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3c7b3831a4850938ca11586d71b013ff1c16b06e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.8.tgz","fileCount":151,"integrity":"sha512-VZo9+6ulPhgRSbT9251p3uL8ZsnUFgkYAiq81mwbQzRXLJCsaRUo7FvsBiD6aWFcQWtJKlYrOsHubXEqrU9lww==","signatures":[{"sig":"MEUCIEJ+C7AqS1O928pmuXMxxw163RbvFB5zsmGR8wFRpW2WAiEAhv4QXEmvZd1DxDJI0X1pPDxBMSNCaf6oz6Yy2SmKFoI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3BuVCRA9TVsSAnZWagAAzWcQAKFgOXV9XK7ySHgX2jDk\nXmL1iuqmk28Cri0HkIBhTxN9em7Qh1pILHJJ0X1YPuxhg84eiYBX3d+Vtb0n\narRLzPknJEwv8WNm1Am+gqXiqzFbDVTz8dsI80Z43zqhmbWflTrEhcb68Yx6\nS6znO98QtqxCljCjgaVrQszOPd3Jx4P0JWfbSsoxA8GzTRicIQf2gzS1vKrH\nV4FfKwwsd6KYWNjdtxeLbHYcjU3v2n/Es8X6floQa5dj3p+3v/B4T44RdxJg\nxs6slSh6X+zXFuChjPJTr+2IuhQtNh9xY0h+7EX6ybG0RdMSuu040nSwXyZu\nXPMgeeCJAtdHSEKn40l3DeUFQGb8DTDWzKFvPzOqgzTW6Twu1dbuwE9zaLek\nkdOY/+cpo8TVXif7pZWExZUsm/fGWvI+vxVYnPSwXCciMRMpZS5QBuDvzCWo\nDKYe/fQORpjDJ7PZU41HHIDy9CKW3CS6AgqDjtOTa4oIm6gim7w9ZPjnSuhi\nE8tZo9BXYae/WrnEd0UQmf7Wrad0meI2k48Nt665rEKWuHRdIYY0X7F0K9dc\njUJ5PQHknbxEgt1z5a/7UtdsNOlRhGREgxTCY5d9HSaIJRPwNzRwysOwiqGw\nMgCOZmXRpc0pHpXfiz83QEfovgpMrZ0S0MtIRE5mBPfzMlfKmB6Y+c8N+lgG\n4dfe\r\n=3NTV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a76cf4c88d787cdd20847c8433d80c4bbea14f1f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.1.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.8","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.8","@storybook/router":"5.2.0-alpha.8","@storybook/theming":"5.2.0-alpha.8","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.8","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.8","@storybook/client-logger":"5.2.0-alpha.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.8_1557928852766_0.5882804624831526","host":"s3://npm-registry-packages"}},"5.1.0-beta.1":{"name":"@storybook/ui","version":"5.1.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-beta.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"c8da885234a8ab516fedc3b6d8ffa5722f6368db","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-beta.1.tgz","fileCount":153,"integrity":"sha512-r5pDsEnLc6nUHcfyswyUj5RioPR/IMqZd55bq3n0pDAYtFfvIGHSD3ZHPGAWFtUyJUQjp4jwquKB52qumfLmQQ==","signatures":[{"sig":"MEYCIQC8sxe9RFFDjDEmSd6KP4HEqSGW126buf1ZtvGyhmmvmQIhAOueYyCnY/GZUeyBZnVpWsxW9tVcfzTkblWJnesKUime","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3P07CRA9TVsSAnZWagAAl7oP/0+fCFCkKhdyWijf2GAW\nrKO5/+sX7clIlxXuvaE6+dbH8Mc+O+21T2lSGIDmZexvtXovLiF2C6EUjrSx\nOGkJ/4ymlRC5a2/fwtP0g875YIDSf8EldzCc7WpzGdE80iiYWAmcAaxO2uP5\nRYS53nh8xhdjKIgqbBVxMSh75bUcNRxaDQLWJLlwAMOdAMEpRSibwQ52gLbf\nrKAYrRIFb/FyxHFgVMqJRSw49ajL/Kz3gG+q0bZOgo7QEdfbU+/Cz5XEo9Gf\nbP3JQQ6Bfw57pMotkYNS8ghK4oQpbm+El/eD/RRYmJ+CniVMgIcJJJnXMePm\n9KoxJm7kxnpZOqtPdTCa4UjGgHPHyJE7WtUvEr376NU5mjNDTzmhKrItQu6P\nh+t8j5IGkFPTS7UrYJS1jra0pe6BpR5+b2DjbDqi04K/7DHpnSsQJZICg7z4\nzuTdn4g43UZwddAZkvCzv3+Nocb7jTqKPBlfvf+tGRE+ta7YCffAAh5ave1l\nt0MdrbrALXwpkK4oEWlfC5PZUaXz7O7YKkzlhkDecsTC6+mGQJjtoQHFHN1W\nKKjnFP02uwCgKe5AEsGVlhCjxSNjLJvZ0Egz48KhHtDgTSOpzI7sZu5YHSVd\nVv2HXQW0dKvgPvovbQZjWTjS4EuCwDzuArij8D5+Gx19XpNzA23xFcnyjHpt\nabTm\r\n=qXkO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"e14539f7127f8dd8e4b9f10aa7d95fdecd86de2c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-beta.1","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.1.0-beta.1","@storybook/router":"5.1.0-beta.1","@storybook/theming":"5.1.0-beta.1","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-beta.1","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-beta.1","@storybook/client-logger":"5.1.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-beta.1_1557986618350_0.906984271609097","host":"s3://npm-registry-packages"}},"5.2.0-alpha.9":{"name":"@storybook/ui","version":"5.2.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"2198e8118485ecaf3387057d6ecf43d1f51ec55d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.9.tgz","fileCount":153,"integrity":"sha512-DLBaedhhoukGwPnBU1FePJQTn7Iniu3+h6NVO0jI+j4lEuxkUBR4HP1yEmsvSTHvySvH2NP0hQTcm7wxC50Sqw==","signatures":[{"sig":"MEUCIHhmR7W7Ns6bittcSJQbKcR13aO4Jm9RaDkzRUE5XotqAiEA4j0B7Jh/AF7GH4yJ/vHhbkBIybsz/Qn/1hb3XNsjDhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3ntsCRA9TVsSAnZWagAAR5UP/j9M4Fz5K5h0FfIHp6v3\nXaez2twHbajWFRpmlvIXks9iDQUzAz7jetz+k1aeGqsRfe6ZF5ph65vKXrtN\n6UcrCrpqbYeXf0mZ7chogVCagnN8h/lxUCWOJR+GjRbCiXk3V11se3JFPsWr\naJTZrDQpwxytUeIImxicR+fLRvac/EtcxLzZhQfo/xu/2JGKbtHqxBIyoUL/\n2W3DFKr+cCkHHS1rQtGHklvCi98QBZgSjwm849X0XmCY1DkUvjmcsAmMQ4h8\nwZ9fOaI9fe6KeXNlLAXkvxs3mctNO7AlgRtvFEinos6JFOqDUprYQ8fCLEDm\n00lT8k/8Tcun1h+ekAnQxGj2olyG5vHftiAZ+OETppomJeGEPG9cYLObxBKy\n23iH6UC9OQt6Hxyt2cFSnMBjSSb6dXB2Ws9VdfmwM9eXkcnw9s/HwzU+vExn\ntTNoI4JgLbHJxoMhuMXO14d15C3xjsfBGFsDJdKAszxtpnRpVpiar2m+/buk\nTerAsU6cCCX94KmsnyDM6/FH+jG1OBkwcV4B5m9Y8Ayw7xaCacH2Ebz4jFL8\n53LfPeVwURB0IGcmw+aK7bt4Rb4nqzXp3Ugdk9RV7NJmGUfiEVT2hNl9dA/Q\nk7tg4Kuj+2L6C9JSqH07yNZB6aCgLeWR8dq4A5kheQK5yFHeEn/NURpj8XOS\ny4eT\r\n=rrXS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"aff1704ec9f9cc3be3093a835b367542132ac2c2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.9","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.9","@storybook/router":"5.2.0-alpha.9","@storybook/theming":"5.2.0-alpha.9","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.9","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.9","@storybook/client-logger":"5.2.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.9_1558084459027_0.4362234130743605","host":"s3://npm-registry-packages"}},"5.2.0-alpha.10":{"name":"@storybook/ui","version":"5.2.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0bdd41ecad94b6858a4f2a5c7a9f675b4bed6ed1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.10.tgz","fileCount":153,"integrity":"sha512-Q637kBDEbD/lQaA8lCQUb02KIU898BTMxzgz/F2nL5WJL/OEM7yqZWXJJkm2kNMba1a+vxFUWjZmL5ijYDgJxw==","signatures":[{"sig":"MEYCIQCe33mwyQmrd56XNmqmJxSH0PB9Fg129eGxRSJwbhZCswIhAPxzpnuRFjPF7aFbcbI7cdh5zA25R6OTWzNFZ5rohzzQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4lxMCRA9TVsSAnZWagAAydQP/3TjK9l13HJ/J9OQjNGh\nLT6pmdniWObqWw0U0bdV9H3LYPtUpO+GrVQKUTgBMsTlmGO6IBfiIMLbdpD7\nI+tBieKSeaGmoaUpajgk9z7PwxyT3BhW6aZjlAfEUK/yB5/huQnGcwrupX9L\nNXPCHisTNv6bVf52i9Si/pDubacIFnNNHlS5IIDCsJ4c5+TjEm0m9Son9EEf\nFt0YzmkyMzX/yhwzOwA7ujkNjk1AtUzC0G8AMixr0I8UWCJOCUwbcA67jELI\npdkr+3o2/QdnogtCAlBgV0wRc71kXpK06JdRfWobi970UsSVrGTjwMPy74J2\n5QsZ1s3bZwRJ8Fbz2q+LoJlz/4dD/FUsRFTGnk/rcHg96+e2EKeD/VF/hfRS\nWAT1vFU/z5DEsoM5cJLofLSAWd0xG/lXe0t4xWnYoHx1of0F/QrIMFKnjc5T\nBLgx0YYraTDxQ5GAqEmrLD5zSNg4hgd6SkuJKNkf14kRfYj34+dK0q1vMR9o\nqiZn811KAzKyRbt3qfxL2gB+CZqpXicH0emBfmr2GhdtdqLU1kTpsHCMroI5\n4tIrSs6TeHwRlgZBvU8k9KDeHv8MP9aRZbYzWam93izaE9uyEu08fxitkL41\nlrlvW1rD+E2PWUX3orZaZGU43UAuikzPs2O6lPV7Wliz5ScpBTQvtYLZYkhu\n1Qae\r\n=DiPK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"baf523d63481300143d255ce4211092f90ee4190","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.13.4/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.0.0","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","lodash.pick":"^4.4.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.10","lodash.isequal":"^4.5.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","lodash.debounce":"^4.0.8","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","lodash.mergewith":"^4.6.1","@storybook/addons":"5.2.0-alpha.10","@storybook/router":"5.2.0-alpha.10","@storybook/theming":"5.2.0-alpha.10","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.10","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.10","@storybook/client-logger":"5.2.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.10_1558338635812_0.4310514253464588","host":"s3://npm-registry-packages"}},"5.1.0-rc.0":{"name":"@storybook/ui","version":"5.1.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"cf7f4b2900fbc155c574d014cd1b47f80adaca1b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.0.tgz","fileCount":153,"integrity":"sha512-nwITtm9+phqwAVVRWlqTPpLLkxKiGUIYPqYpRKVeSXBywlDI1sy/JqW9RpKJLo9xE9twXwF82ccCTF+yAs+gyg==","signatures":[{"sig":"MEYCIQDu7FVMkVVasM3F9DjGszwJrH2bpgxcU7GVpemWrYQngQIhAK7SFaC0D9gU3dY4PwIFSgEcLDZ7kuMPUmYs+PbYvK15","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc492eCRA9TVsSAnZWagAA1eIP/0BPFwLJD52Vj7EQIBUt\nWLMN4SR8VSUFupvIY9pJZjHFuG1Dh3d2ixtWX06Xpvix+XvHf+AKyCM2ONSW\nTy5TWDg8nl/5pVUWiWFIreheluUBRrBGvuV0NphBzjVUIf44oXAL9Sou8dmq\nIuT/NwTDU1F0iORM472pvsyYY/cRdAFvvr4/Kd2M+Q3VjX4ALw/U1XZKTy+5\neckYC+I6iCXami+TXZUD4rI8BPk29KNZqvSsj4WqFDeW9m8ja020dyaZk3cY\nWETRaA7yUa3BA37GG5MP5vhAncWD/9EO4JXWFw4U2dglwynquIJD1V4eIZy4\na+THtDxbguRNmZK7uA6rr8z+WzzjfzoJE3TY0Te0fS7cGS0TKBWqZPoPahjR\nmuFHh4n/MQY45BhpdwgQFRJ4AWD5qoF+80Fu6yYNoLgwz9Dbk1jg4MXv35s6\nA5D7EYCS7IwyE9HL9CSfZ1FKFtQCujRAxjXJbeJ5ALsPCpFCciGgFarQc9yX\nqDdHoqEGozm2wwiheZldmdsF43SqXUpE5HfuwPAnTopWmo4LHthyOhA3NHML\n18wL+2YMYibYeBxG/Vzd1y11zOMEkKxsWw4V3BRm+llD1to2fFqjQ7NXkkeu\nkKV1AfnVDOxX6k+EDLNLA6BA/9QhGLmu2G3km3Wd5q7FU4/R8PJ5UrJs0l/V\nLMwv\r\n=aHCO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"35ec834e893384fe1cfcd1fa008af619de2e9162","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.0","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.0","@storybook/router":"5.1.0-rc.0","@storybook/theming":"5.1.0-rc.0","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.0","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.0","@storybook/client-logger":"5.1.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.0_1558437277544_0.3651950864648166","host":"s3://npm-registry-packages"}},"5.2.0-alpha.11":{"name":"@storybook/ui","version":"5.2.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"3de71f4e0b9e3533190b242d5bd9fb786da418a3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.11.tgz","fileCount":153,"integrity":"sha512-mve7vAK0AQOASrr9XHZmnVzJWFLqOitimWTY1Vn7lzNfBrf8rgQJiTDSefqBNMg+vFB49wumcvzd8ZB41VN20g==","signatures":[{"sig":"MEYCIQCNVARDCeBNFC+xAQ7fxNEEbPDkDIrD/oNwcpRPT8a8OAIhANCyO27NKg9dVdPsOfBZbCnMpH8AL0wmgen9m7ILgsed","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5AR+CRA9TVsSAnZWagAAa/YP/jIR+dCHv+HRSKiwJ+oY\n52+T3PC1RXw0mSwV7zne/SgID9a7YsolBAG8qA8xTsMM5LjhEoDY2GiWKycN\nSyfZS+2J/Q9rCLennQ1lfLliRSyG4DUz0QpOrxHi7t6tWcN5Z+b0KepcDGM4\noKpVGFw1ariQFlcndXZGbGb+wTqlEzmp52Ovc/iERXCTSDFOh8KWu/SGG6sj\n8D+aS+6dAmOgW1VDIOLu8XitEJVpJVHnL04ELR/oaYUysGlL9i6SUKJGpBZd\nNyLzJZ/31XsSyYYwX5zlF9sW0XWmLm943v7FXRlDoMobXr3O06N1fHQE0tXK\nE9e2+4Vp1sp4GWU49QePHGUDANPAsyVLALNz0DLMD2a28/zXw6YQ7z7EUjLG\n2jVey1SiMwR6iDybXMQQlzCQjjhClGoUOvxCe6lj0Og7734tkccCuSP8a0CW\nBcYfS9fsX28hG3W6a4NfzianCfZRTqPlF0GT6EQ1wcPMT/ek8MgAPjYxLOaD\nGqc6s4j+io5IEgoqEYKqqlNoWOrlu2w86dtqrHkvXWVRzOmVGcaXx9UJzJFO\n4xkfsyrYoM6ucOdPn2BIdUdoPjwAv/MoucHSbIJ/S+641VbWD5Xm4Q5laLfM\nULmRPZFwWJCyap2i5X9SxqwijzJ1CQaYbapko3ZjG93TaoCzNwOwujFwYLXy\nzbeD\r\n=Nq57\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"b8c79460a0acd2aa1ea4e8c254d3c5e0376323ae","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.11","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.11","@storybook/router":"5.2.0-alpha.11","@storybook/theming":"5.2.0-alpha.11","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.11","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.11","@storybook/client-logger":"5.2.0-alpha.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.11_1558447229890_0.7128619065814426","host":"s3://npm-registry-packages"}},"5.2.0-alpha.12":{"name":"@storybook/ui","version":"5.2.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"98f70dfe3dd3257e71f2d3905c5e600daa796364","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.12.tgz","fileCount":153,"integrity":"sha512-vINEKmYZp1M38LSvC26nhYaapC4rlD3ahQXbW46EqnwKImNmF1gaJmoGydZL+jvu89omvqznQPdGFkQQqNeVsw==","signatures":[{"sig":"MEQCIF2E4phwcsoB8a1DWwpu0SS+qe8lCkXssGrKs7N6hG3NAiBA0+Nd4exU/uV+j//cb3K1boLnE5GBpN+AJBRUqQvmRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5B9uCRA9TVsSAnZWagAA5YoP+we1tu88CT5qSGJWoefN\n2AUWVtyK5J+d25/e7JC7AU5+8JqX6rXu1Rydh5MQoR1S+9yjNiyMAVWBAvEb\nreQMbvlKF98+UsB4omgk9MueV4U+ALr9Xh3KtVpDQPvRYLnWCzB3mHgqTsES\nLhLo0sDS00zxo5J0hG/FXuud4gEreHSOLt4wB8fol2ULWLfwTx1jEIVDK9Y3\neWpI4QWXPBr4rCzC+zYFC2uvgajewZWHLgCvDafnj/ATOqEXxgOWaqvGuxa0\n3Jlb108CeWQtm5f0TE6yZyGD0HnX2R6NBROd2dOpkNusOUgUfQM2ITfvNoXZ\nEuM7lGf3RnrLL75hXWnWPCei0MG+3WCIVZMujr3+DD3ZRjLSKlGzY8qC9+Nz\nmZ2mlPTM8yKQnmxsvkFhKPuSFHGt0vBTkQVX9pRIYqS7saqx53FwnMnCbfFe\nSJg5aXjJTkRde374XgFCzAawEdYThvrjikskCz9klk6o1S+UdtNv23cgO5HG\n5XrkhqKPz2JCgYqdphsOiOSFjpj4TU/iCA0mZ0c8uOO8bcKNZI2z2EWH/RBK\nXYRrh6Aab+oKV8R85jeGxNx1mP9G+R7ZPvMbLI1QcMXlCZbiIgX6UVdYUu6v\nE5I2YgJOqt6DV6OqqQ8GsYEA2/Y11tvWAmFF/kiWwYPEl524m4U94r1ccNk0\nPZI3\r\n=DYzC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"46e83a902787a15a586cb495aa7f090241b40607","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.12","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.12","@storybook/router":"5.2.0-alpha.12","@storybook/theming":"5.2.0-alpha.12","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.12","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.12","@storybook/client-logger":"5.2.0-alpha.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.12_1558454125781_0.5860665913969301","host":"s3://npm-registry-packages"}},"5.2.0-alpha.13":{"name":"@storybook/ui","version":"5.2.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"166d45f369c72362973b3532ab349c3e65ffe57e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.13.tgz","fileCount":153,"integrity":"sha512-0P8d87OWMwx8p4iJ7fI9HcfkT2cJnfRQ6JVTaZYdZwwUDeGNeK6Wzt1Ns4ttsVTl6F9zoimegZKl6GCSPn4imw==","signatures":[{"sig":"MEUCIQCOu5sOEQlngllWQF+z7KNE2EbPBDzbIvHtupO1nEByYAIgajduBl5gBCynhPplGv4dCt8W6oOG/LYqESY7s3ksgfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6ImACRA9TVsSAnZWagAAMoUP/2TiW6tg3rOrr5qELczS\nrhwmrJph9K+5pQUw6WmsfNQWm9i8KLqotB4wtpqQXAjodoU9T0j5GW/TwJPZ\nBU+FT1w0RB1suOf8X5f3dPbg/VxhQow4+AIeepmwgMZyuIfOHWNpF5MwN0cr\n6CDCujDcLEw55ZJg+CxlEdb1Zf+sUcGj29SJAcCE6DCYel0WrkAhkcYVGeUB\n2fhAjq5dC988mQue81pEU1095duZV+6I5cGQNAB5TJY+PSxWa6idQV3BhViX\nNWN+uCQvHCRvbEDEImyuQFjswhTPSBUbbDnBv0tCAL6KINrEWD8NA4GoO2El\nYvZj5+9wCfXG0v2dkYvKquUbqN8zjXUuVattI+N4EX3wAGwd0Gf/31pnew4U\nkLNzUgFvONuLipQ4OTy7DV+FzHafoFMI7gwUXi356EMUwM7PXMf1phWtBh4D\nQ9sMa7TbF2ukkV8C6gxqbQF+D+UA90xzaiJ/0yb5k9ziXteLoPpRHsVP3n7L\nXDhXzSA1giOrUVhavfwU8vBIc0W/vSnrc4dgUHdukcnVkkY+L/gutFuDuWib\n4HpsBElEbUW89xE6t+gZAmUGWbYyT29WwypC/e55tPCZI+n8eqbdgRYqbkVO\no66UwwbQNV0GYBlfFI36KFu9gIrDo8p8IAHusddU+wfPruR0CW3Yx6Nq5c64\nAraJ\r\n=d6zE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"66371e3f68686434bf0683daa6e21f9cfbad7e2a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.13","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.13","@storybook/router":"5.2.0-alpha.13","@storybook/theming":"5.2.0-alpha.13","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.13","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.13","@storybook/client-logger":"5.2.0-alpha.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.13_1558743424095_0.4695671277946005","host":"s3://npm-registry-packages"}},"5.1.0-rc.1":{"name":"@storybook/ui","version":"5.1.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"e0d9c8bbbd65c9ec6623d1771315497816a3a724","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.1.tgz","fileCount":153,"integrity":"sha512-pHhpSAeDoB3EPk1FdjLRAA7WgSUnRMLWUJORgv7XwJe2xrKFq6TAffZjPoKzEit+7RpsbRi5BRWNErx42jV2Vg==","signatures":[{"sig":"MEUCIC1t10oESkVZrpi1Wve2yHwd9UObZETnl4gdFn3UgYdtAiEA3xwBfARvlywlH5lO1LW7gvNvtcjDjPx570fU5jlZ5bQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6JRxCRA9TVsSAnZWagAA3xoP/38eli5EcnlVTpZswemv\noJBcCIGh2oVvTX+dvL9kX9ah8TLoZwialauZU7JR5cdJBW1Wd6Sgc6X5yHvW\nQzXg+ZPS3HXIGFaVM1Wd0/fWwlElWJPsFtiKx/zM+3sMTNkdOALuH4vhVcfC\nTQs2hDt732H1ktvrhvf/mR+cvlYMUmPMI1DYV8FT3yaSfi65QsOl450Pj2gD\nGtgFD+6jOy4F9XeVddKoNrfU1TSXHTtyVlNDeguGYXig0zxjL3Zx4l+7B38o\nLNnADaEcG8KP5+u6W1/pO10/wy3r1N+eyV0qrUePi3HT/2dK8dyChQekNRWg\n1QktPmfwUX3lFLZ8XT2T/1eL5L/3zX0WCSRpgX2gtJDBBzYlFQWj1Ah2/G6D\nTCk6+0uhQvsf01qzhVikECAgGQX2h5y3eAiz3CpQzpznvFX0Y9n/VBU2a8Ps\nf5DLyCc6pC/U2iYMNfiSoGbQaoxGY1GJ/TOmY4qwiIdmV4OSF2yNGulZ0ren\nh00bgEj+Kr2IIZDA/1RRU1VVM4X/6i9UUGNKqFH3bX5J0wW8UNuPrHp/+fit\npFUwHuw0eTpjKjzikTL8/eNWiGmJzklqB68QNveUa7RxYhMEGOIFR3BSpJ/+\n0RPXQbm4zm4QHMyx5dNP2vnI+5npLwUoeWuMaVZFDRSUcLcSrchVATEFNnoU\nSinD\r\n=Fmwe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"aa5c2245346e74a12e331fefcf5a358466773d28","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.1","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.1","@storybook/router":"5.1.0-rc.1","@storybook/theming":"5.1.0-rc.1","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.1","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.1","@storybook/client-logger":"5.1.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.1_1558746224938_0.1095046854850199","host":"s3://npm-registry-packages"}},"5.2.0-alpha.14":{"name":"@storybook/ui","version":"5.2.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"bcedfe93de95be0eb1c3c14ee0af656626feca31","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.14.tgz","fileCount":153,"integrity":"sha512-Fu0g2KpV1T9KT5G4wOP+nUHT3px83oGOkEhvSW7hCcDnlfoAI/dfMdJm1iKoni1JwQ8kEqnL0fqGhCUAOFKnYg==","signatures":[{"sig":"MEYCIQCzVDvXOax7Woum3QsoSrYShpIZZHENJ2/6h972WZ2qcwIhAICkfk/pAqeuAiwygBbwLu/Hzq+lwYV48srq7wIEtIPp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6cMECRA9TVsSAnZWagAAtMsP/i5c4cB0GiuN5TveNqLp\nIiJExZ/RS6kOKX7aIUKDng99o19S3KM7v7/2st3Z50RJQ+cTFeRzZsD553sW\neCT0m3yYoB19jK9N1DNy3HqW+uUdzTgCZOsWJvcZ5E4IhYVdpW0XLVdt8SY8\n4TksgOYPiqDu8abUZLuWgalaRfPhDCYqu/2Cd1lqH4Ld1XAtZYZrOKUevBdz\nd/bCg/zykG5QJLFMBG4RnrKMICQnyR3uETt/bPnC32ECd0sSlGtlxWp4RN2Z\nEmvr1j/eSQv+xalReCFrIi2fK3Om1kOTyvCvnS7RCpwL4xIFzGc4BG9oj0pb\nO16gy1Gg7/Q6Nuv0nzDsxHE5lcjNI5wNnCwSeCwvGCaWCzQLKEoA6kfEs6oX\npvm+aiWql32g+xewBiu/Pd2wnvl0JiNcmNEbYyx+Eh5WBCHTxPOc48APwVDY\nqEKEsz+pp6TwplhYNUqr35W5VJ+COGxdpQ0pZHxNODGLj3B+4RUguDvsYblL\nH6uVBrJLBYfBP+/7wZQ7d6Td65yKRTWJnpIsLUdZ41EzkgEEv/Yqg/1rsywM\nfO7at/2TvumET5MDCSAuQM+wB5TTzaNjCEYS47CvEmsHA9vQ8WkKCARgiFdd\ncWAMDuYJ2goSFuCRmdgNtKZefRBKNOO3RUg9Ls9ObkA39AkzAZbYG2GtTf/S\n8+l5\r\n=lqr8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"b4af57888aa4ea8ce0190ad5b530216523a648c6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.14","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.14","@storybook/router":"5.2.0-alpha.14","@storybook/theming":"5.2.0-alpha.14","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.14","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.14","@storybook/client-logger":"5.2.0-alpha.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.14_1558823683634_0.2109741886674188","host":"s3://npm-registry-packages"}},"5.2.0-alpha.15":{"name":"@storybook/ui","version":"5.2.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b5915d875f7618a5607106edf6a1f052094da39b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.15.tgz","fileCount":153,"integrity":"sha512-d7HBjh7hqg8lZsKiHYW4oM49Mea9q7y01j4dvBpWjKCc3eYDaLgQou6LTeJ7EVzv/hhaNXf75aPYJLJp6NoDbg==","signatures":[{"sig":"MEUCIARzb5IyUJ8TrE/6xpPKVcBSpyH7RQHB3g/GoifhtuU8AiEA2zV8FPY6A7PgVKI/PmCmkTb0Pl2VILdjdYm2VE9ejkk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6eGQCRA9TVsSAnZWagAAJGEP/jW/z2hM59wHfYiJ4Jl8\nmeEntSkZcntuh0qI45wi9EWeBNT2OnGDIAse/5D6tbyDueTsv0HHj3QPHFMc\nRSGQ5z7+nSwYaoEk6LM1kvGQI67BeEDTUvUqERG9tJ8YwM2COPziJmYhbD92\nlk2M9kFXFxRUFqWG1zI9Yn+EPAZ0DdyVNK2G+M623QcMutdgIVs9T4Nm36Hj\nsDv49ZK5UoTtDjEhtguZPlv+WR+itCMhgauRXv1O1Cb3IGnN49s6g3NDB1io\ngenkYO8inr2e9zQ5T2Y272Mqjh4vtMPj4+BlduXa2GTvVg3I0eomG2TIQtlT\n1+brNOaeySPgstqD4TvrnwiUOt3sAcu56eobpApWMdle+Y4ii6VyUnQtKPvu\nj6X0eF+wQQfhGKyoGQ78XH4H5A+6REzAf5Ai1lrtb7ChdeWomjNx6ttq1S94\n15+3fz4adJd5m7tpgSC1GOzqwCkW1+spawqxmmybMSPXbz0yLiLmmACmRwCO\noDjNXENjgY/0dVS8DXxtODdxCIrmRwPZin0htres+ugwiBmgirGf1+RC82/w\n9RGwYSiaUCu9+Hm46lhPBo7Yr+mC1lxOGAAfIw0JLk7A5booAKlRKkjGrZZT\nOS8PVVuyLPsmow9M6/4UP70iKcyNrmiq+uZdpVhBXCVgS+H9pcPtwxvC6/BX\nIlMU\r\n=MEWL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"27ef09fd6de24ad2a221a12827c5afbd5851598b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.15","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.15","@storybook/router":"5.2.0-alpha.15","@storybook/theming":"5.2.0-alpha.15","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.15","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.15","@storybook/client-logger":"5.2.0-alpha.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.15_1558831503225_0.644998031065678","host":"s3://npm-registry-packages"}},"5.2.0-alpha.16":{"name":"@storybook/ui","version":"5.2.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"d882bc83a991c0d8054df335ef559c845dac307e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.16.tgz","fileCount":153,"integrity":"sha512-aeNDDwxZ4KEQpdyK2rgVmDLTTnGKtcqsYBZ+PVxDupU62KCVgm0kJ/G9XawIFlf+yyA5laqMLii17vWRkLBLIA==","signatures":[{"sig":"MEYCIQDMLhJMCgrqKcnhXhc066jQbNDR1NQeOUXiFCU9+b5WoQIhAPC36sCNHGVCeFFd72nK9kz0wVwbWbGWZyFPJg7RnZZy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6i7mCRA9TVsSAnZWagAADNwQAIEbbvIgAtBpOPRO5GRW\nZEP87oGic+LKO3s1RG5uxqNG5Sa3ZQW7Tan1XmCTeNCBP/DgE9VsUnDFMmZC\nSxch2xa1e/V60+cIAm3uefDkrxujd3Y/qZ/EpwQsLVRx3Q8GfauaOlDBz5gP\n4SikV36WIZNbBgvjvE0HXEc5yKKSgh4xPc1jSkiiJ5A/jVjLjAulsI+9fJpd\nwQxAuUdhy+7p4/4pmnzW75gPgILMUCbi3tDLaWt+QNIWq8YRrqGKUB5Mo3fg\noOYoYks7X7Qwjv+YzpEtT5FS6GxO+jQ2eFhoZv8Iya12XcX+4ZRcCSmOJ0Yl\nj7Hl15nb2lbEWoWQz/TSDDPsPfkSiPcAzVZSf4K1NnuvtsSMgqFPZ1bLAQEa\n096rynlXTxHWpLYcSINIOqToWA/0AmklyObtUz7BmJouOAyWkm+BRwKVB4Yu\nxSs+EHEONnU+M039uDwFp2qa1dhIH82+JqMHRzYkh0l/xCMuSv8bvCOvh2fq\nCQEdRR1fa9LdKNWpJjCZ4qFVhyw4qJqM+up71CMUseHLEO5YvitV9nwI2JSn\nxIoxly9Q6yA1VQBCc2Z4EmG8v26Dm5JG0NBTd+eFuHaHlLdlMSxpzJP1/Fps\nJnN+D9h0Aw3dNChnb3vZwCu2T+7N/fyX/MVN7yZtOTGbQgqcbatn+7rdHmdZ\n1rsm\r\n=finQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a618ed45a45a03d9691ba6ef0c931b0b8b2ae56f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.16","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.16","@storybook/router":"5.2.0-alpha.16","@storybook/theming":"5.2.0-alpha.16","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.16","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.16","@storybook/client-logger":"5.2.0-alpha.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.16_1558851302035_0.5842452189732823","host":"s3://npm-registry-packages"}},"5.2.0-alpha.17":{"name":"@storybook/ui","version":"5.2.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"317992dde7ca336bb63471212aab237f75d31f93","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.17.tgz","fileCount":153,"integrity":"sha512-oyjz4dg4EkSj/PLwxLusRKVzIVqTPhQlFMx9A8hRk2rAPgPvn6syzQDMBnt7eQR7QiHglsFV5b/OycLChTnAOQ==","signatures":[{"sig":"MEYCIQDIC7ckZVoP6rySIfnBdgL6pKd8vbZeK2vAkDsegxecrwIhAMf029d2wFZZ165FUcjGhg03xrvfOHhmY5Mp+kpDfAeF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6sWkCRA9TVsSAnZWagAAt94QAJvrHN7AhqlwUUs1bpo4\nr7rQZt3wfPYRDi+mTLEUH0g8MYLQgJuwU6Z3CpE+NJKeB4osAjQltmWMJ30v\n4Emc+3YZG4YYXPgDqH0mirdIhMPKyF8iH6RBKRW2AXGOOVHjg7Xcq5TuNB1O\neNxj3VhgUTWg+WMHA0lAmNMzFeWqufHpAf/LqYUelMMxPpMaGxwqk+wQUolg\nPVAvQ0ffjiIj9Le2D7u5P19whwSLvTefNdO3b9Sh1jx/dHi6TKkZP8JYHO1J\npjPFF6IVqv5YHfvuFRtDWKiwHc+A9GJ9NLdu+K9SbOCzQOzno+/shba17Dyj\n9vvKhPYfBgJpxUxvAHwEq8OLcxBs7yKQ8sJnf9O8yQcRaJthEtsR85mn8a2w\nAgzzj5zy9MrHBih9n2M2PL1zh5M5Y6s9ybEbQY6LRhkyRvlHBbYAFBcDZtbr\nxHQnfZR6SFkl6YKwx3U59E9Oe7GXlNHXL0CeaKL+4WztodDoY5gWN+GjcboR\nk65rj/G7GhyUwtnKZW8Z+z9U/K8dJkY3rbLCfn9pBoZwGyhYWLa2Hzn95J39\nJeqh7sy0K/y5Sq649PUZCc2hNUgvU/PKFwDN+DcXNIJ+B4g6NXmz2scPWY3f\nzJY04s4BQPAI7ww1LWowkaeQdF8H20bn3TvZNja5p/7KFheRRT+GjOKUWbbK\nD0bb\r\n=dh6p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"28620c882bf877d421032d94e4ca8fe867e5d5b5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.17","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.17","@storybook/router":"5.2.0-alpha.17","@storybook/theming":"5.2.0-alpha.17","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.17","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.17","@storybook/client-logger":"5.2.0-alpha.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.17_1558889891595_0.11501732201672521","host":"s3://npm-registry-packages"}},"5.2.0-alpha.18":{"name":"@storybook/ui","version":"5.2.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"77ce5c2e4be2a5b4f51b049169a03a27ffee7f28","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.18.tgz","fileCount":153,"integrity":"sha512-c5SnwCPV2vcXgon5H+izgC2hv6O4i4R1pD3RBe2BcRD9JaV64lw1HgII838SEgbNqIuir+iKD8+K/RNtNWfMAg==","signatures":[{"sig":"MEQCIEMg4IBOJWXkpcV495Gc7gT2BXaFLP404e7FPzqLB7j/AiBq30+vgzfyaaSF7CYFdHpPh8i1ultfx8qTLvAOApuM6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc63gcCRA9TVsSAnZWagAAVbsP/3lw6Vs47fZw2r4WRMV3\nAkDXB3LgsPeMtiCHZ546PoeIXoP9CjWEhdJj0GZ6ixbVGtvbLNo2zpSkX8SE\nw7tn8U6qSPWiI7UFsZ1AjgiIFRQnlXKExWZ7WMc6KNzr3acDR21lAK5ZaEpf\nWrYt1n73YJ7fCKZ+N6YK6IH5UsimaDhj1+YlXFNmtaMMZ1u0x6NgscCWRPVQ\n5qe+IwtBXhLB217QdhaL054VIDD1ftyQWy+kz241XLyrvVe5Xg+xaQiz2S7u\ngdhPJteBLep9k/AZJKViG3UlxqH79x6mhBL255fZHa4kM4oqLpB56zXC01Tl\nvzgZabaMbcf6lGAw6SQMkjhbBTA2DZkEM2Vo2CQM21hwzHE27N8J7u3dlxhl\nmZlOVvWreQUmVogZHWIyepPXG7M3KgG+ArD35MAB2achNnxgTYgQA76074MB\nVLjuKSrgdPqgkRTqS8Bt+1V71TLytoLORCVW2aNrqvl0ijI6TIn5EVmliFnf\nqebkovb9nziFHqp0i01GHe8lUYElHNWq+qluAhiQZN3baE2BYt/zRGz/kbzL\n7mY+VgtURi6bKDb5mmxoRL+ismSPnJptW+75WHABuUAuX6P1pcXx9nGPWTg7\niSUkvFj3785soxJlWxPgIIB2TWzv5Bo5l/MgDBgXBsJbk5cC3bRTq2brxtPH\nXJvc\r\n=ZwY1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"4b325c9ea18b29a48ef5b7384b7229958c688136","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.18","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.18","@storybook/router":"5.2.0-alpha.18","@storybook/theming":"5.2.0-alpha.18","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.18","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.18","@storybook/client-logger":"5.2.0-alpha.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.18_1558935579898_0.4439043294701557","host":"s3://npm-registry-packages"}},"5.1.0-rc.2":{"name":"@storybook/ui","version":"5.1.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"0d02a35f6b9cc4e3f1d591fbdfd8bc3224365313","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.2.tgz","fileCount":153,"integrity":"sha512-Nxl/2d+sNMMho+EWelzzEtiaRfnHHuLrwWlaHvacxc+U/N2n/Xzz/cYwXS80bedNjFjW+AYgo7tmHKnUDL+cMw==","signatures":[{"sig":"MEYCIQDt4EwQ+Gi4AIUxEZAW9pXppPREyUcxquxyQQ6pgR+ezQIhAP4eDmpSC243aDATCyIHuZ7lP6EDgOa6RvgeUE4vG+sQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6/InCRA9TVsSAnZWagAAs2kP/38+4Dsm0VIABWg8FPps\ngySwb9aQ2yUnWyGWBRwLJfVXKPPCckzYKA3lH7vXDEpYu8O4Uvw6rt2fm5oK\n8tqnKxUu5VeOmKOadjR9KNGjhAg0XnKexB+ajQXxxPO5JrUJASIkybrV4mw7\nkam7oo2Cy/dzdIDhccOs/rAfr5Hrv0yrORaBCdGElXp1lPMiyhJMPGXd54Dc\nBkvWCc0dgDG+aU1nXPBfpMaVaT7p0qDX18/tAlNepnB/eEtgK8jhlVJ3VuRo\nfwzJZvDPXH/zFw/b3aJ1GBx3aqNeKpeWyUvwKhcnKsx2qAFXlyYQXLCTYBDY\ntBy0zFBgEJoBCU9OU6fRdGWPGNvnuPsNxRhOZCDGrUgkZnw0STRc/p8PsGUr\ndUZLvXxztYEWF7jkAtFpUAHF+sWvnykoTh4Fux+99Gvr+bNl7SJFOAmF0yTp\nf4zbhK2mfVfYs8Yz0xwqJNZEt+A0WMUZncar+0hJ2gTnrCgc0hZZRJbfqY9b\nwAF4SjrfzOaDlTgc/etFYyVD96S7SK2NR4OgL5zHHHdhEqU1Shlf7tMhFOMK\nbkJIuzo2GSgGOBPFROJgHx70LkDAB8oIc8lKfNspsyQ4YOwmTY4/mod97+9S\nU46SUMY0kRtM1cf6f+V27qxi+V9Hxxmg5XV2Q7Gu6M32pgU3v3QJJ2bHi3tv\nekWA\r\n=oeCe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"50bd4c3a8619ffe3a0e858619ba88c9bc8ff08ba","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.2","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.2","@storybook/router":"5.1.0-rc.2","@storybook/theming":"5.1.0-rc.2","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.2","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.2","@storybook/client-logger":"5.1.0-rc.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.2_1558966822995_0.5809044225347808","host":"s3://npm-registry-packages"}},"5.2.0-alpha.19":{"name":"@storybook/ui","version":"5.2.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"b8e3bc45205bf2b04637698fdc41375f2616d1d7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.19.tgz","fileCount":153,"integrity":"sha512-C6HKvYX6T9iYKtD2XBuUybjkAq48XiL9ap9uX8hfx9a0yL4Xjmttx8PFMF69cF/Y3wXpUvcOjLQKS/zL7Lt/3A==","signatures":[{"sig":"MEUCIQCxeZmWUPyAPtIbm6XPZvpLaaVYnQgCjIth1wN6/+jh0wIgYWctOABjm3j4LUZbIaIEoKmeUmZEkg7sGmAU8CqDEv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7gnhCRA9TVsSAnZWagAApQAP/0R3CPMGezY8AFOVAvkc\nIPE3HZgcAYwLObh1exOcYbDrQgoWcJwxJwqCmiJZWtAM9Ws6HlbcZKIWF3BB\ncmGc3yHw0jgh663B0USYBp2zmtN0Fi7Q4ylswiA8D55zx4YfsLV9a3s8oiQM\nu9/czz2XxKcAAQdCYhp7599bMUzB9+Zz0SJ6x5JcvCrtLMOL4H79/zNLMqSF\n72UVN/whsPe/llaE9JIm5v6BkT4Anh90f6G7CVezETxirsMy3lDrwFA3gG0p\nAzLZzQXUCFHCj79Jy3z0GAMBaqQyK9yY2SkFnSjILk7zvJavjQGANjDdJXFb\nvChr29nQsdvddlHe57V2HvOz9PIwj7JCuuNU6sibxcI33wI1LJUlbMWnGnfW\n+USX0DH5yAME0NJ9UOpGxUqY2vRdhnLq+Yi2C2O3NhKuE2NrcnCZmUPLwPfQ\nrU+dUDf0UtMGbsOWihKXXyG/kqxAOe8j3vWUCXWWaUxXuwNR4SSeeHNCPZxy\nG8GhCnYLZzu34EqGHQwjoPPLCf6KAXKDPTcMFsPKJ+bVrmsh299y+Gdf8fWn\nqB+fSz4KzGJia2+17xTiuX8bkUPnoiNTEh2QkwwoN3Nne+qOFsDe1iv8FWR+\n1gu9tSroJojpttdVYIYFqqa07MDVTb+/QaZlxPLGrlnna+TmXWJHD5FAN1R/\nkIJc\r\n=V3FL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"f0344d69f59e1fb556d9dc39df1f476ce7c2292b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.19","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.19","@storybook/router":"5.2.0-alpha.19","@storybook/theming":"5.2.0-alpha.19","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.19","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.19","@storybook/client-logger":"5.2.0-alpha.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.19_1559103968406_0.05371614420771209","host":"s3://npm-registry-packages"}},"5.1.0-rc.3":{"name":"@storybook/ui","version":"5.1.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"9808a164fe3c2ce9fcd0ca9a7fa59aae0256d991","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.3.tgz","fileCount":153,"integrity":"sha512-qklDe+iQtjeWUn4Lp0/60BFq6QTYJglnyrcqprtuNiMzBkw9T9zzUHXmk1gkCvekwKe4eC0qiJ5Rx64OVTV+hg==","signatures":[{"sig":"MEUCIHPTIuAua1BgeGraIfsx0/EazXUgGNpWYPDjM4nGXAw0AiEA6/hrBRQMNVvqiluReppHk9NLMdEOPeVd1+SJ445TOEg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc73aeCRA9TVsSAnZWagAAKGwP/A/FseNXnN8zLKRBdqMc\nXzmyg1wl2POlF+1wvhorGsABgNo7DKxYumFsEcq1rxzuC7h30THXDMasKeR5\nlqOHQigpp9OOmZmr57r3o+553qlpiXl00gL59C+qVgrkJGIHsvdz4v7XcPTF\nJyUpeqQ6qMvykVV6P9arKkkvnnAmCv0L7el57Tcfgo5ECDmbMfqB326IM6ta\nnraISm3/TKpr856wDerng/j+2HRFOtr73LRwTCHO8fvdbIl0Wv08Xk+bA5T3\n2VEJLyoW5mJbDyMntyjCzxJXzj3youdqSs/7xW8wq6WeHWQXf1eo05PUWD1W\n8xQlybEF6zQ+JXllG1xkqABuQrQctq0R/Zr0sYl0BG29bvde+xRtvTOe5EQr\n/29Rm+uFC2t62ONDrUy6ypKvvw34DILQRoIKyXTRuihcP+LuBLQyK7NG3Zlb\nH8b5NqVPkXmAlIGPUAD/zrIL+y7LAvUj2s/BkkffVatznIW9/5+8rx59++MB\nKpCa/ZG3aMtTXj/equGd8zJe/LsdMArO28dC9ddK9TjQ3+iJzVEmgeFj3KAH\niejl7HCBSrRBF4ZqYt7zY2u2y3CpGyGUwGNTqWfMkmL8kV8NCKtpJBUHZigx\n+/9z9DqPaU68XVq9vzagXo86h5OUC6NIJXIgt1OZLvwr+k9Ww4pLe2bFwwIa\nFkak\r\n=9rWP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"a589ab39871644bfe44c779e84e9a9fd8e5717cb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.3","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.3","@storybook/router":"5.1.0-rc.3","@storybook/theming":"5.1.0-rc.3","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.3","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.3","@storybook/client-logger":"5.1.0-rc.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.3_1559197342213_0.25176633937035486","host":"s3://npm-registry-packages"}},"5.2.0-alpha.20":{"name":"@storybook/ui","version":"5.2.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"4942a24dda5118d57556259a2419bf7fe48ed62d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.20.tgz","fileCount":153,"integrity":"sha512-OgQ7TedPe2VUp62RF+MRd/i+0vvWL/bvJdKvUzJEEeHvnwidjSC4bM6SI6h33OAqz0yhpvNPAd2jutrI3x0Zaw==","signatures":[{"sig":"MEYCIQCsP0krWz972df2nioP1zkdxTNCFXwvnJphBKukMLPZTgIhAOAnMU9dgDbFM8gr6RyUxOu1tgtKEsjbRp0UzvMrHh9b","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8jlDCRA9TVsSAnZWagAArH0P/3mj8hI5TFJRya4RgC9Q\nOkJdszKRE4DHuNnjI7dhJoPW0WFCkJKMB3LBPhJsGsmiJtZJ//nfi7c4363j\nVwe0lIaEfYsLdrRgUFIBggGM+KNif+uWy+T6vupGTZg19qvZPhIsUjRj8//o\npMT7Ce9p/6cXg6uPHn3jS1xXO/U+8WMwbsGi/LXev8j/6JouDk5QwU6Hi9lz\naYvTQODC6JiFRjW6R1+Zk1j/HxYwRw4orAPxzvyi+8VBODGHTYWHBtRyj0gV\n+YLJ/YuiEQqoW9i59boN6+fM4TWzh76A3dv+xMjnEnLk+u+0/PlaQHCAuaO2\nA1MiTov570Q39FBf9Av+1pIz320QcroC0+DKlNItTdV6us7K1VtZ4KkAytIy\nZgK9oPOw5gaXW2KiaH832+jRysSFLiQbZEXM7/azQutz74d+zGC8wi1Q8W1o\nU3Szl4XEfxtlGShpb1MCE72s5eFoR032FNvu7fA4F/olKlEOVaTwowQY+xaQ\nKEWGrBOT3Ukar0IC4CmgOg8FwafBAKbbmstrCKRwt5IEn3Fe6HnO6HoclZNm\nDrGzcOaFNJgQNUWlBK/EvzqT96yfPT5ULGRqkFDsOoLJfLlMy3pSNPXxjD2o\n1OwQ7P+qu7kPdvcMV5tYGjSzLcZx9s/KBwKuQkp0V1vZXEiiPTMaMkpj/YMs\nc1AV\r\n=Jds7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"f09222ccc015223ac613892ede16c084b0d1cc97","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.20","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.20","@storybook/router":"5.2.0-alpha.20","@storybook/theming":"5.2.0-alpha.20","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.20","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.20","@storybook/client-logger":"5.2.0-alpha.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.20_1559378242544_0.41237033006308366","host":"s3://npm-registry-packages"}},"5.2.0-alpha.21":{"name":"@storybook/ui","version":"5.2.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"dccea4504386f58494d9e41b409b5d188c5bf284","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.21.tgz","fileCount":153,"integrity":"sha512-fx0/232zpU5k5vTOZ8cilahNSFDR/ng9YChyswgJl7e1/bnWD3FOZKIToymWsfw4Yxen4lMqIy0ZbfjHSzZVUg==","signatures":[{"sig":"MEUCIQCeOXCrgVRq23aSGA4nPVWkmm/9wTSOOPS30NzTSz1zYgIgJ3SqIG5eibX7m1TbBJUcDsvjT3VCiwcd3lCKxzxYC9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9ImaCRA9TVsSAnZWagAAOnMP/12Z5r7z0QssIRL0yagF\nWBAoDJ2kpYkiO/i2CevXrWnHa38GcFCL6u97gw64klDasvwRMnNn4ePUbg2t\nQQeQj91+l5tTp/Jhk30r/Yvmt8WzJ4WpFc4FY7qnKE4K74IMpeRcPYmE/K3a\nMJ/NIE7bKuGoMHnYxPx/gl2iAjxm4Tn1RsVNivV5oGFDX5enml2itCIPf9YW\n2mDeTXCCFEdDGE7zurRUG2qCwzjWTNh5s4hHiHWySA5tl3noQk/qf0JfygGk\n5w6MBmGwOU71nkysV8IgPvK21BVTLNX6HYobn7JEDXXCo84sqCMFUFFvHi6t\nH64Z+2tvxZKLIGqceaQTgbbUQitWJDbisjYnkrTMmSkBwKdtzVf9b1KT0Qdh\nu0U8E6vqX7VBBNFvu+w7iN++aK7Ax5tHFMQstiAwIW01/PrmivG11dCsE8tx\n5YxsmDl2QDXFR/3vMsKCPvaaABPUnE1qO04/HB1cLBQ9ZoAttms5A7P85UOL\nwuMp/cMeoF+tieOiMWarZEIzEUDRtpHARCB2serdAypV+6GfP16uafD3dyGa\nS6AUL/77PgJOmWMqsdoTRp9PJ2qZ2N9J83WqUpMFImLhs8ijCbFEFS/pkmHS\n8Onef+SLWnGcwKV+71v+bWynMJd1MRF01SkD7kwsOtLTuotn3YcWSlp4pVRH\nCKhI\r\n=73a1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"3bc4c3ad1758979b1f4c832308c59457e188fef6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.21","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.21","@storybook/router":"5.2.0-alpha.21","@storybook/theming":"5.2.0-alpha.21","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.21","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.21","@storybook/client-logger":"5.2.0-alpha.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.21_1559529882265_0.1834469451045877","host":"s3://npm-registry-packages"}},"5.1.0-rc.4":{"name":"@storybook/ui","version":"5.1.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybooks/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybooks/storybook/issues"},"dist":{"shasum":"614f35c5c930a5ba98847a6e25bcd77599872f6d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.4.tgz","fileCount":153,"integrity":"sha512-Sd91nzk4ifIB4k2YEuYWqkKBG5NT3MiYd+58fQix0SsPzKtQGU5rB2/bRdE21jQm7Ete1py2N9bkHhIWlHzJAg==","signatures":[{"sig":"MEYCIQDTzR+3E/co/bx88TV0UdBvy9swpY/hLwz0PxGa7CUTdgIhAL9C3QhDUt7/ShZksbwK4x/509/p4XnuHOvdUxIlucdj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":934607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9MFWCRA9TVsSAnZWagAAuAoP/00Sbc48/nvBjO3dcAk6\nkxmmVj8KLrcL34v9cywle5JQ/H02zn65qfOosAlwgeVpUFL+/mq0xqmF90ME\nlI7wFqa48hR/z5WP1OLXH8ReKXXdWTdL+LqNz+c64PGD0oEW2xe4s2tlTMpO\nQcMHEDhrAD7Wb84dzHxGRT5WMV/kZ4wi9S9Yzeh+v8lNdqY3qJLCEBfmPM89\nhdK1KGAcG++gHAJdhv5mTezsuCkmnFpdy8nxDteqGHkprxopQcRYwgC21E+m\nVOigotX9pMT2D2f7OylK9ftz9ZVQjtjS+/jhWpxspNFk2w7gMedLrYnt7t0l\nqH0G3QEW3MFfFDpSSX+Z6Vc6VtASOn51Q8bXnE9o3YtJvskN0s+Waiq9+7KF\nuVGkPNxEekEw5u9Vv5K+2buI7DUx76f4phoUnPDX/TIUeBYHzvPU4L0s3Q48\n/j7W739xZbRTZMneEMVX/Q0NRqnQ+RN28X/TQEHeqqNR6w9mMSfC6XwB233A\niCKajuD++3BfFwZzFjtmlygcN6tnhZY1Dn+up63CPSnG88cbsuJFfqVXWMw/\nS2I/eWe963FjL2KYt/DDZW+2R4oJ2iR63J3qJQV0j9Hio4iNC2Q2zeymap3U\nip+eLi01COnM0KEUxStuHskZJWOkwR7AFxA+eG0aJlNSH+RMoATIUcels723\nJho3\r\n=dg3F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybooks/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"1317bb14faaaac1bd45a1f1e9f8dfd4a765bd74b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybooks/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.4","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.4","@storybook/router":"5.1.0-rc.4","@storybook/theming":"5.1.0-rc.4","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.4","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.4","@storybook/client-logger":"5.1.0-rc.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.4_1559544149403_0.38459918636562596","host":"s3://npm-registry-packages"}},"5.1.0-rc.5":{"name":"@storybook/ui","version":"5.1.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4c8ed271c4e10070451e970cbbaa0e21277e8a61","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.0-rc.5.tgz","fileCount":153,"integrity":"sha512-4fP4UCQrhrDnXw/1it0D3yjlCHZS877BV1kmCn2OSllzbvRSyntXLoVzy/tKt7jrHUkhzSCaFFMChzIc5cMrCA==","signatures":[{"sig":"MEQCIGGR/9pRO+6iIEPvbQyGa+8S79MzpBdNDh8A7j7K32mqAiAiBrY9NjYd/J/VK/kIF3Z4g/WUHlW4ydQmYJJQZmtZhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":947656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9rI0CRA9TVsSAnZWagAAkZ8QAImq7hwgytnujO3mO5JC\nESVXsaDZCR+CBzGlPoo9yFn6ZBszuU8Sh8DMXhcEgogj+ofNJTTSwtpRI49y\nyGGiMb4tfSlEKIYcBtPYKS9sC5aww9Fshd2CmHkTFdwFiRBYtoajwx9Y0kEf\nVGPKuioQ9JNV+clW8pz+FhVX1dUqyJ5B6e87h6p41vfEfbAnv2QFxtrlvwWB\nHzVWDld9ju4YMhY7sJjwuWYUgz5qPJatuz2K+DG/ynXZU7ES9DYEljgYllzI\nCRPyjECTeYZ9yCX5JWq4TAjjVDT+XsHWti7oMKXL+TyefXjLUfpCyh+6kQN9\nKAKVwBtdDvew8FUcblLcdyOLvnTQ/4oknDYhp537QGpEHlYgoHtF9ChAHMKk\nMDuQxLROAZvBl5qvxLo0YgRsiVZkow8xjT6CC27vUDyF91WruoBt9vgSOxSz\nxMng+VI87GIJ/of6M+WGdiTuQbwmjW95kwXYjGwcRKEtFVzSBHDSzG/pxUsI\nSRJCwOOK/T+Wn1NB5RqCEGQFOQlaMwJD6oK5sVWc56wUZtGrXKZjivpRfWoi\nQGS91vTm19VEN9I/O648hqBEYTeuiDvtnqW/32QeszedGdJzcc1yXg5JREvO\nFtA+9ZeN+v8eK9ph6KH5g+vK/Tsykt/Tnnf3MhEwK8zIge2c/mBc7uDQsGme\nlM1L\r\n=sQmp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"70d6fcdcbea52d08011d0cb8d0e842740e6cba31","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.0-rc.5","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.0-rc.5","@storybook/router":"5.1.0-rc.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.0-rc.5","react-helmet-async":"^1.0.2","@storybook/components":"5.1.0-rc.5","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.0-rc.5","@storybook/client-logger":"5.1.0-rc.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.0-rc.5_1559671347636_0.16121943841524922","host":"s3://npm-registry-packages"}},"5.1.1":{"name":"@storybook/ui","version":"5.1.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8c285102e2f6bd9978ce13ead7141b066c032d6e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.1.tgz","fileCount":153,"integrity":"sha512-hIVH1HWak93p+jvWrlaA8SepLsdRxooqF9AEJkNM7M95f9P0DiwTeeEKmGkI6h2pmIxLSNNgrxZDHQXYGGCVAw==","signatures":[{"sig":"MEYCIQDyisZKk4p2heF51Imi2oUBRWqt+txT5mPrs21q6eM1IQIhALDK8UW4eMKLKQZRFFkvSnYpo0w/4dute9/IVwA7ld3w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":947616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc936xCRA9TVsSAnZWagAAbdsP/2wSnRbW00e94pg1mI1A\nUrmB31rWj9E1o++iAVthZ8Z3QWQv369G+ZhQRnPLmKqPo4PxRQ0FLNRSCx+0\nCC1cVVnViMK4IP8bexBqGrm4gYF2nbw2y9ONdo4CHYAQDCTghIFspgds2gMw\nUJ2Vkyp4AA0nim5mo+LGIRrG/zBNcqlxLUB/YDkwV0peY6/xX0OxAjudoTVw\nCeT/nn3BhLXOGjM0ID6CfBa4y7CFeTygPk0HlvkwFeKyrelXX0JhvVFcyft9\nsusccXOMGcDyrRLobx4CkSNJ2P9upfhwOLrd8Uslkc6iKE92XeC1ymHlLmEg\n/HqES1ynhdb4hLWfcwZODMIsKfJyK6KgHx2XW4ispO/lKAH7JdINjHaDK6Cu\n3XX+nTb05OigEHJsYGJAW+Lxn0d1EGDZSEOZjjQJbIcKUoBtLTug0QzGd/WQ\nAPqIXTEIZBuIJ3bYLrL0lezHOxYxBylKf+wBFES/F8BtGAS5WpFp42INjaUv\nu1J2ErEem8lBF+QtcO63+KfNeVwAHVaiY352zfjPu53z7UMOc/VwjK68iSKt\nXwESm61jybPGb6E/MSi8+/RUPUgxUPta2WX3QVxzMPecqwgmGs4c5ItXr+Hi\ntnWUFCtwMxFVnJtnzFLFqG8TbK3r/Ycj1AI1PrjzaaMqOcpitXOd3/ekS6iH\nf9Dt\r\n=DX/+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"43dfe3f55017d35238df63781ed53113fe5c3334","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.11.2","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.1","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.1","@storybook/router":"5.1.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.1","react-helmet-async":"^1.0.2","@storybook/components":"5.1.1","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.1","@storybook/client-logger":"5.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.1_1559723696833_0.3050527846232953","host":"s3://npm-registry-packages"}},"5.1.3":{"name":"@storybook/ui","version":"5.1.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6bb07ada02196163a3df52cd3e7062e305eb869a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.3.tgz","fileCount":153,"integrity":"sha512-6DL0pHUXnJv4nsXld5vTerHGFAeDZ4ec38+/3oAcjztmnVzRm49P4v0aUGdCKxxra2h6Ytk6KHPmoqsFEX69CQ==","signatures":[{"sig":"MEYCIQC5zVKApJkflqYxJQUWMuNp+h3LAdeEVKyMyHgU5M8N+AIhANJsL6l1FYoD+LPLF5EFu1pQKWoXdsvnfaBoV4UcpNhe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":946407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+YUgCRA9TVsSAnZWagAAc6YP/0QTiLDuyIZ9P3P96AXy\nZBecO9biWmc7/uXY16bRH06pS4xy7UVYpkz5sK0PJWmeztZzIlmP3KA5VWO4\nEcJ4rp3PZwz+WZCrsxX+/uvaETf1j5FfThzB1ov05FumVj2ajoDVXcudgPBl\nI4MrW7Oc7OMylhvEwntocYMwOetkM+tG/LQpof/iB5idFwY7NBng8ZqWsKLB\nOOkUCMoH0NoXhDkJPvvc3pHsVMEZo9uSaOyYa5D6UqfstvNR6VHGRuqB8+Y1\nBt4c0mpZpfeWxkFirW6sVeVVl2/YSno6ezksXz0j/8T61V9dPfHIYqPud0cO\nUyPAYYeYNkpGA30X1OdWr9tBx+YnJM+PrICiAhb9GCfekJnbqtP1KOKshA7W\n7lGkNJCm1tVrOJ/LjV+GDwmMMQJg2ll/kQFhWABqmzbpKCPoQCgIk01JLONX\nKWxHEhGjfDm6cUVqIqgiKyzhf8dUI39yf3nOKJ2/FUVpODEs74gloQdrfkPB\n4sc6KX5rSksYCo4mS8nU9bz3RaLEBeRdxDJ2TtIT6WhJTy21cVcI6LBVRuMG\n0hVvejk3BPLMxU9DQo0vZ44ZPzzkD3YKE/oRNWyEYFYanlyuNomG/oYdQb6p\nTXpSGaeVxYe9Pu5uwx2sWS968PsI5u3OxP817HgrHiAqJcTFcbMMvvnqh1NQ\n8klw\r\n=o5Wk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"bf73c6760a15000e23776bb7973148b3a73bbe5a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.3","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.3","@storybook/router":"5.1.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.3","react-helmet-async":"^1.0.2","@storybook/components":"5.1.3","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.3","@storybook/client-logger":"5.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.3_1559856415764_0.25092450544328804","host":"s3://npm-registry-packages"}},"5.2.0-alpha.22":{"name":"@storybook/ui","version":"5.2.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"42ebf146e59e6bc9ff222287c022b69426822f00","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.22.tgz","fileCount":153,"integrity":"sha512-c6kZuRRLwFPaJ1AFjyVlo9fjruMlAWJ+2whNIQU1xE0Ye1YaaMNT2cH2eUlFIVuP5E4wNMYu56aXhpRW2WnzQg==","signatures":[{"sig":"MEQCIAD/9dWvCHRtRSd21ZtyVc0Khj5Ld1Nzz6end3DcGdn9AiBOYSj54GJ4o816p7yGY+x9fz9PtR6rvL4IvJa8bOk0IA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":947006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+n46CRA9TVsSAnZWagAAANMP/2KbB8LbDKEVfnSfcMIW\nQe9dGWs7MJGYAR7lkOUxkKDV8mZ2ifMhLD8gaM73opG+fLztv4u1pm+oh4Ow\nfaaNmpAX10/3LK/p0DJ6iv2WmCmBoeQ+suJUyb4r2qqJQckKgKnNm+sgsRJR\namNoKtBkftzWaxzBm4GnEHwZohrKvYiuoXV/LaDJ378FYiZUWrsJ6hCtBlgi\nCaQxuiF1BCJtp87zW06V2tkNqjMBdkr4orJG0PGATgV/eDIe90uD5S2Oojj4\nTXzYWrZy5JvzuDOUVSTcVdQcc23ayzV1YSubbvBW+vsHLvU6j91RzB/j17xs\n8put+yd+pxLIysJcErpxoA10dcDit+KPiNyq+Px7LyuOF27hOho4OYsDmFQd\nGqPsSuw7gerdpThl934nW6gX7XUDwocROZtm+zI2uUQjGxgXFWJkVjZyHXR8\neIcnSgAfvgPhqGyGiXdkf43f681UqBnsNmU+6lAfJbl6eQDy+NmASCvu9h69\nst5SzbWLZtVH703KOy0/QZ3aVG9gjBBHxuPKl+ykxzDll8lti+YeBM4I0R6f\n42cl6pTnniVNJWZ8NtIGtBYgDSpy/g21AYZC6u4QzYts4qvTdE+D/TfNYXTG\nbg4ORtxNCKs2HgCIKDwWaQajrABEzRmIx+rqGutSlgWX9Hw4aakNVUj4h/Rf\nq0hH\r\n=ljIM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"286ed8a585da272ffa34d3a80aed4b775af1f627","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.4","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.4","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.22","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.22","@storybook/router":"5.2.0-alpha.22","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.22","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.22","react-resize-detector":"^4.0.5","@storybook/core-events":"5.2.0-alpha.22","@storybook/client-logger":"5.2.0-alpha.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.22_1559920186089_0.2943755692017491","host":"s3://npm-registry-packages"}},"5.2.0-alpha.23":{"name":"@storybook/ui","version":"5.2.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b3cb72bd178c3e404a40767523513a0815b313cf","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.23.tgz","fileCount":153,"integrity":"sha512-OK1FyVOtewskGvEz6V7LR6U8GLu3y7i7N2FV74rbfbc+qSHrHmAqXLaX0na0mrmlfuZgxUwhJ8F0g/k3Q99jGg==","signatures":[{"sig":"MEYCIQCmZaS7zVYwrn1uMhFbOrD5+3utO02qr4qiuhdhvKrxoQIhANaFAKOn39z97lBxevljRsDUcvfNW/vVdYRmOEoxkRL/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":946091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/yAPCRA9TVsSAnZWagAAu7MP/1HBJ+qa5TSVT9HqLcd3\nHZJzoRiJgNfUF5pDAwqcU3wiiEiY4hmygUfKotJYjmmoiTolmlOVyHjGl8hi\nb9FZcf3eb1tn0a9fMzl0hyO4Vehfn6t2EoYU8rJ+ptDsG+le0oyq2shj+lDG\neueKaP+c/P+pPNcFwXmIurmSrMgTCTVAr5vf9X/rGYu8nqLuVhAB7psxnayd\nSDhAf5iNqkDpdvHRtIV7JIzsWijNeICIiQ6CrTUmTmT6TfOpaAU8V5KKLJRI\nuPhM3WL36wJGkk1NSw0Eq+qXIcBUCg1n9y88vhBUwmPluAg2+eQDrbP7P8/Y\n8KPm/9baVw6W6E4aJJ7d+uDis4VzjtiVQTnqwEq4CbyX+u970/Usk4XrCMZq\nZ+slUiu7kIIJVThOu4RhPdUwzUcn+9b3RibHot1JDyMXBXZyPllMRhHoJlEL\n/V36YfGE5M9QfEx0grdKghwvr1gUmpUPljtMR4vtvCpEvX4/I9TV2969qQ2J\niXMeWqPYs4OUtGERwH8rJ5GPKmPVRCoyNIlqchWxfs6ClgjSic58KWdoGRSR\nol2lQDyIvVFasFmrr2RMYHhxIct4jS0EcY3hBgp94fKkw4tk45qGtnOiURbC\nF4YeRUaLLBGhzIGy3kOMfrIqBRvSjuLBQeZJpKcXvsoHL4EdbW41kRABMn7+\nNhtQ\r\n=qo38\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"57c2036c455feda62d12d52826e304260177d214","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.23","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.23","@storybook/router":"5.2.0-alpha.23","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.23","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.23","@storybook/core-events":"5.2.0-alpha.23","@storybook/client-logger":"5.2.0-alpha.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.28.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.23_1560223758320_0.08456810358572153","host":"s3://npm-registry-packages"}},"5.2.0-alpha.24":{"name":"@storybook/ui","version":"5.2.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"60eb9d47d7a8b972d4056653de7dafe8c8491b93","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.24.tgz","fileCount":151,"integrity":"sha512-iq6HmGoOEhhqJB1FFIRn2oIXOwWK8ol5wkqlRmCAKGDXD1JMU/a8S4CbPCWpACZZ1n/5TkkoGPKmUUw4NgR2rw==","signatures":[{"sig":"MEQCIGcyAO1twcJK8trOmsB+b2Gn4lOYCyH4VqzFRrpQGUl5AiAAgAcqtI0d+DuXecvtSyw4JAXdRj7LpNITtJu/O+GQqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAezaCRA9TVsSAnZWagAAcUYQAIzb1DCo2LHbOqQrRCh/\nkYOSJISp/I6JHN8c0NtV9oA40B2sSGHUKstgmBwgJxcN4Qv7yKCiymWPAQK1\n1Dqim/YVuutHlR7peHM8RXpjnoV0eOXfIT0X5Oq6a+N2CscfwlrHmiRWZIvJ\nRD2hQQTH9+Phujkl7q+oqBK+6DdblAcRBBrBAcE4L6BAosVHH8t5M8yIMMRz\nIQS6e555m0+biZ6VyXXCIl/Z+8fZ98BcBb2vY27rSFQKUK2IFXWqYQdm8UIu\nS0COFOXUtTX4FOu2h3ue67xhgeTegtY91fEpUNbFWHV3PpLgG7ED/62DmUYt\nqis9Nvu49gPX9DoPzMzzI/PgvmsL0MtzspghscfQe58oihfd1lARKmRKLJU5\nMs8RyeS0hDCpqEr/EYmeqNgXcPj1shv4Xhyr0oUKWtqxroftmvj8oNvFI++6\nhiud9cVvL3r4Ej1KfKXSbG6sYS35vnnoMxIw9FH46OhlPJ+20NcQ4nRj90NW\nGU/D10NA8q1WSdYfRtGHbwqOJrVVdaj2NeGa9xqSzle7qs5PCjFSlfGYWju6\nsu8Vuopa8IHoFeEIpbePdvSRv4jXZtQzT5asJ1kTOfpgExyfLoaojXN+vb1Q\nt5REK8tg+08T9WiMreLmVXNeZlwf7FBcCD21AQkzb8xrlngRZGbVptq5+WOp\nho2i\r\n=RKfO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"64b7eff80642c641c94dc4fd1218d69844107e95","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.24","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.24","@storybook/router":"5.2.0-alpha.24","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.24","react-helmet-async":"^1.0.2","@storybook/components":"5.2.0-alpha.24","@storybook/core-events":"5.2.0-alpha.24","@storybook/client-logger":"5.2.0-alpha.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.24_1560407257691_0.49778178893284175","host":"s3://npm-registry-packages"}},"5.1.4":{"name":"@storybook/ui","version":"5.1.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"13057ff0b1941e594ec9d2897f62152fc120d59d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.4.tgz","fileCount":151,"integrity":"sha512-7w7SCIxCT3GzKTTZnipr6cxCNeJKjtUuw4VngpWdhxqMMalW72ua9QuGRi8RoQRoAgP2HdoqOciIRKwdWTS1xw==","signatures":[{"sig":"MEUCIHBhJWgI4A9xmJ9D5MHu+1fW+G6Uw1TletG3mw0opyXCAiEA4NTjwY7QYZman0nyhuHaW5psJe4lAiF4XgYUBzFTF48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAffDCRA9TVsSAnZWagAAOgcP/3zrLm9aQTwRDBSASYtU\nwosO/Vy0w/nT+tgxtLzbqE3La0vWNMXC9vhLxcpKOL0mGJAf4kpu5Ba4BWUr\nN/WDuMENSK6MWk8VJkaHrbRoapWBQAqA+HuQCyKtOMXopmByXasEi8KfjX+T\nUCp2EBxi00Ox2u6zrTuBTqg7I7o5PdvJq36BQdV5ZOcZLMzA7Bd3Dex/Sbsp\n05LtTf9GpOuyQ1gV71t+dV+GlkQPsHVN6Om7FYGJKB6MJwqntfCprp8i0GhV\np0ucAWk8j0nrc2Lvqd+ke2GHUNHvn6+O92gGNm/uLKoo5xVv3F/PWL4rseSn\nC0d9ZGzWS/wMXKPBIrBcKaJ3BflWzA376dWhb+2yodZikje4bkwolEYgWF9I\nFj0qHVCQok7vnRszGCu09XLFFKH+YlN3pmL2FS+PntlAKflS+bery3pJXimV\nwV7ct8SAQLySlsn3N5H6w1F7iUnSQ1/2RDwuNrbhdvT8ptj61ZlWuOzA+yVs\n2xtv8GxtpU/5fYAzpPXQcPn+ww7+UYrH/hUJBw4BvZSqb8Jg8F+aSKjLmV9C\nYcihkZcXkZP1A9D0gndZTVYq00zgPyjlRh0YYJM5/7uGE4ih/3H3Xr96MR9K\nTYDFqhlWbrV2ZNKjAZNT4AXYnPrU9jGivkGR0VtHDhLnAUbfhp25RdMYjng+\nLNit\r\n=c7Go\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6d3d4fafd2888b13d2cb8eb1aa987cec0100775f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.4","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.4","@storybook/router":"5.1.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.4","react-helmet-async":"^1.0.2","@storybook/components":"5.1.4","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.4","@storybook/client-logger":"5.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.4_1560410050804_0.3647750998943535","host":"s3://npm-registry-packages"}},"5.1.5":{"name":"@storybook/ui","version":"5.1.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ba253d583e27b62fb3717b672532f6a15e6f98b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.5.tgz","fileCount":151,"integrity":"sha512-k7nmd2aV65eNXc/fNKNC0Ec4vA9bIC8yedf1ouSYGSCcfDUrjpZ9x2ik/3a2XsaKG0BaAK9SKCFjGKnznyv/lA==","signatures":[{"sig":"MEUCIQDXABtNej14zQ1JHtsWZcX/jPippJzMwxrkqWNmCtzfiwIgXiY6O6j12ONMx+Z98tW563ii8wt5psr7OTpO/LXj+MI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAsoVCRA9TVsSAnZWagAAPpoP/iEhI6Fwq3CkUZ+ZxInB\nDKdHN7ITAn5uXaGnsc2jzrIoJygXu0YJXEqLOHsGNDG5WMezFS9oYQcYqiyi\n2Dyqb582Cw1q7OYKI/EUZeXZSFxjmAk1b2GvSxRjVWhdSU5OZAmg+5Cs2yPG\njPLDNooRZW84fXeP0ZexSqXXw+0tqAFOsCEDK+jDPYlg0xYHnLFXzy5c4OTG\n8sGyMMBhnYKZOeNAfDvEAcCylkc2xZR+uKIYYctZrLRo7tc3uJcuF174ITFz\nEkVSZgt8cgTaFa4ij3zG8GSQvmnQbEzPzRmrZGDKpz/eZOiyg2aRKoHo4e9w\nVGu0j7HMvyfL3sc8oWACaGVktILfflneL6Dortat8DSFouaJwPwGS4QlXXm2\nJkWGDgw/MSsxL+oyUwm4HXXz8MVzyImZevn4M/UkI+ojXQmaobH3NGemwo9c\n8u6bgpZkvgAEgCIw2eR2+8tYyt8uPJeMPGxLyYSDQY+4qpVObKlD4U0NIwRP\n3pMm6d33eJeU06GJX2Fd1BaDg/M8tpqI5rXHqrtED+hhB7DRc8r3B6alV7Nj\nSgN15qmWioD70OufgqqXVCpSGaauw1aXkou5qBquU4kahzU1pm63Mb9m88tP\nOQwXefdaQryuISu5UPSj4NB71zjRyC7K/UIxy5P8GRHKHOGfLR7q6/c1Y0MF\nXYk7\r\n=hXlY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"12abddaa2f144a65e0dc915939c8e3ab6dfd062c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.5","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.5","@storybook/router":"5.1.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.5","react-helmet-async":"^1.0.2","@storybook/components":"5.1.5","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.5","@storybook/client-logger":"5.1.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.5_1560463892939_0.3131720647381586","host":"s3://npm-registry-packages"}},"5.1.7":{"name":"@storybook/ui","version":"5.1.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6c7b46f3e1425fef119f7a63f35754c26609d639","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.7.tgz","fileCount":151,"integrity":"sha512-z6QVVt3VpKvUN/kllmA/no8qlncYm+DA6J5XqnRHwnGH+HSHCT79AxaSuV0Cnw+YbV3/R+GUyqDymouQIzW5dQ==","signatures":[{"sig":"MEQCIDNyagOCbu0JiY6uyPY0jsCkRqWesW/tgm6cwqeo+XyoAiBDf5lniBigOwH4WXhTaEM1900i63p9IvgdXIIGVQPnBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAt7uCRA9TVsSAnZWagAAMdMP/3TL5IiCY2WmFLlcdTat\nPm74Ke3ZDdAfxM9FKrm40amhVBqODnAgPV7rwbAurhoidJgZsdpyQH9pICYM\nhza+4IgFdGQwVe5TfyTF6lPCrVQxfxUBC2su2uHZn3nnv/F93diEJ3JZ2vlr\nD2C5W435snOjtaV2KNzcGaj/1l6MjgiVssIJ75ZbLsnaMZNTrwchrIb/dcez\nVnGBEX5NX1cdJTCPxv7Upn6M/qWSR2/gtAC6+02ISzu0WUBWZcz7+KMK8k6x\njVfg6T/2tjzSnDMAWxv3hc4UTizWuM+N/HhVAlKLKAvXeebBIeLITsTma5eW\n+bdtKTwvsBsTPsa2+K2mXNjLcUy4iXHSCiyfQI7R5N5+FkRuPOZeZo11BEKy\nZNl7DAJ7MYgfnlLGvCAdHIqBXOT3D0IaYFMTCuZz1SrYXcpeVJ7FL/L0/Poe\nDwD4R4uEebRuoKgyS7Cum1LAm7/Ln32zOPiSRpJiZiWsoRkBUagWEUS7RAXf\nX/Nkv8+H010aR9VBna/5Fu2FKHGUF/WW+wLKiZxyeO3QiOyNE4hz0iCps8tw\nQ3qHejaYyhXKDHS1f7I38bZX6SMB6YgNXk02exBvQfoxeClyYawPH4BxBo3c\nxLzzk+yzAD8E848Sx+4gIcHxHj9Jjm3Oc66I0n6u751NHROtNj23gRN75JoQ\nYi6K\r\n=vQpb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"4c4c1a9fd7461860299ff70ce1e548536a912664","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.7","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.7","@storybook/router":"5.1.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.7","react-helmet-async":"^1.0.2","@storybook/components":"5.1.7","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.7","@storybook/client-logger":"5.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.7_1560469230209_0.6192095137218874","host":"s3://npm-registry-packages"}},"5.2.0-alpha.26":{"name":"@storybook/ui","version":"5.2.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3c4d29ecebd7fecc931d89cfda50973cd421c01f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.26.tgz","fileCount":151,"integrity":"sha512-60XlEkg3+uzzz6E/c0+aFiWHLGIINEtHZh81Y9IlbeNylNBzzcxq7o7456rpkVwVqQWGVFozm0odpzvktUM7qQ==","signatures":[{"sig":"MEUCIHBWx+dz/1o3s0eQIGRlK3Jhl5WNWz4vKTYseQeoPQmqAiEAyX22BLWKKklTHo9+ggFACTcUh6O/3AJuOWMuNQszAm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":942610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA4+gCRA9TVsSAnZWagAAgi8QAJWdYuD7a0jBBypSdQKO\nla0T1/4vlOKbBEZrNF6xaSfxAV9tbAoVv4uMTo7KjlT5yzdXSphvMnwOu92v\nnAnIYiMYeWdDPCccvVJq+n7O+9XQGzyFQWJK5xIsPxPeiwtB/Dlqe9dYlCuM\nIixfy71Z2v7UfOfwcvGQuy9yjj9gSQ1t2RxVSS3ItXZUjj+jXH8jNvUG6BGf\nJ2vA2hqIarSUXlEn959FzqPIqt3xe5v1WjYQvnnZGFZ3gBR9B8eM06CQ0EXq\nd3tG3jRQ7WOtmcEVAeCWWHYO2gkn2s77qi67x1+yQRWhjfXqpbqt8u+Nyznr\njlh53jFpnwx2w9NbV2TrHtDBdTmtkn6LXn1bY4wG11zhE6xqZjj6rRTW4wVO\nzQIvAAvHLdVBKjJJ/FE5loaz+mz2VsD6AHyXF18zsdkWx+WH33akMDbzBI7Y\nUn/jzxey98JkGf1YFLzvJ5bHPONiRLWbwZdPeAb2N1ItEDIns7ihX0C28sdl\nPHXhyKt/OWtGQ7kl72GdttIAoCqb2BeMoBWR0b6VccBuoPvetESB2MA13xNk\nzlyWJwL1nanrC+wHUhi03xNfU5VuExOCJNrMIUrcVcydDxWKrY/Yx6naQRc4\nhQKMYwLsKHsq/9g8mmeIiDJNVDsqwBnwoFj/uQs7ClkhAqx4L+Cum13CYnro\nka2N\r\n=GUln\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"868c48042b65ac987e1fa0cd277fdc96f3dfbc02","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.26","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.26","@storybook/router":"5.2.0-alpha.26","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.26","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.26","@storybook/components":"5.2.0-alpha.26","@storybook/core-events":"5.2.0-alpha.26","@storybook/client-logger":"5.2.0-alpha.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.26_1560514463289_0.3826736332152829","host":"s3://npm-registry-packages"}},"5.1.8":{"name":"@storybook/ui","version":"5.1.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84cf1b0f0b833140cd2ffd30b9a2f85574dfa37f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.8.tgz","fileCount":151,"integrity":"sha512-YIJH/k9QdYQqIch2yEuj8eiEN9CKmlG+hgWR5v/hSm1i33ga1W5Qn64/w2xZESccnLMWc+bJH/visB8U/bcRnQ==","signatures":[{"sig":"MEYCIQDhIoyOibVwHHIXRK0qOsFtcSI02C+iGx4Yq2AjazlJVwIhAJ/0FHyLNAzR4ECZFkue3ac340Pbhw3auva+J6CdlRgp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA5OGCRA9TVsSAnZWagAAQ3kP/1iEmjywj/8PXX8/o1Fm\n/CpmoQ0I26DfcToXgZAEmJEu0Zu/s3+ncNJnLyb2VrU4AwCiwLUA7vTZTppw\n1jvMFbo8SDTHAb4136pdSw6VaTN8MI3oWvSJ5+yeMgZMT8oq2ocHUxZ2ZDb7\nNq0FW6seL+cUUfzyR9X5K0ZiYl1O3YwOB7ubfj9LDtDHmsV7hl3V3mNod1Zz\nEHu+QOKsEapJ0TEiQBb1pH7FfCvyEidcZ1MR4hG3XVAwqVtCS4e0aMX+lWk2\n4RwBVdgix8pgd66Jj1kdAaSn8oT6qUTcilUsKVFm2l57Fij2Dptx+J9cyxcA\nU3+PFAwrlV+zGCeyZhDIpe1rPiKygfyXUFhybyUTnHdXlCGAok2I6OT0rtmC\nL6SYWunAawnpfY7/+j0yvaySiDbX1kODBtQtJm4PySGchqhZ+os+6338/mN7\nYHhARH41mrvG41WQqPqfgLGObTXBRG8NLErT825/pdN/jI1M1rnq2ETJEWd3\nW8sYa2ynA02m444sRiaGN1TUv9CmYnJiERFz29pJJlgwG6TNUfzX9HBllpap\nuC/Xh+vl2rbStjljSyRwm1W++kIZUPY0XaKd1CLYr8NGfMC5Gs1S89BK3TPO\ngpK/07QYCIddbuw4j60Cvd05+tGJ0xPMa5i0rRxupPd8FsuC/RYhZiOIGfE4\nQF9D\r\n=qN9S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d7a96f899bb0d90ef0b2ea7a098df9467bd90670","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.8","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.8","@storybook/router":"5.1.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.8","react-helmet-async":"^1.0.2","@storybook/components":"5.1.8","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.8","@storybook/client-logger":"5.1.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.8_1560515461056_0.5007263180819759","host":"s3://npm-registry-packages"}},"5.2.0-alpha.27":{"name":"@storybook/ui","version":"5.2.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"27f187b4f53123c7e9baa119dbb1bbf11ac3d259","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.27.tgz","fileCount":151,"integrity":"sha512-DEMZU8vZ078USj2Ojr7C9kcWvqhn2QjR1tpksDR4GKdCoDHfP6B0/rTKbfIYE98wg1nZc+REw09KiwHxArs3jg==","signatures":[{"sig":"MEUCIQDDCkdrWPjJsVVC5SQItjJchHu7qOntXFARb0Qdufcm7wIgW4zEf6Xesqzyq94XOhAuNJTY3fLWY0DzWf/gbEZ3ujY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":942610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBskmCRA9TVsSAnZWagAA9gkP/3Jv82XJ5TKsYVfF8xHR\nfZYQvO/8e5L4E7mpyhlBWRpIrqUsldZfiqa6DiHw0RtxHHxTsoy9fWNVP9i/\nYW8sV3Gv5/tnPJCfG2TsNVE+A4ZYf2wrHlI7kJiwHFSZH+8ykpa1z82T2VkZ\nT8C/sTI+LpQt1yYI3Ue18hF9n3ROzIfPlDF8i+Y90h4f/mGgXF2F7oJoEWOO\ni3qBVYAT7dGjnnEI855948c+f2c+nRq2D9rKnbhyaOcKbTYzyhFFoSgdA1KI\nBAwzRGQtAMFQ/fwe9cPQCBdBqMU7P6vyVWLWn/98osj3j0JqezPzJMc+LcFC\nIetdTEtkuffZVFC2LuNWQQE7LgxjYbeSO3kRkrZIuHN57ao7114gTagoqcE/\n/7R6KEVoDLks5AR5D41TqHoH5sG7wts45TfNqn89dBbP5uDL9L7v/3kEm1S0\nrTLf2uDs1N/a4HjSRmsCDXiL+l5SfpUYdk5fOphQfuIUsOSS8Xu+LRbdM1fM\nLuv+4bOlEGAMGjo2xF1bgwJLQHgPL7SeZiSLCPvaIB2jw7uk9BmWVRQmuUx8\nFL6vDRq2rTIag8Wqdl1iMMq+T0KjvPS9zJrRyMqVAsZ4hScA9CJZYYSZXlbS\nDG2JCNGLF2bH0sFOk2BDpGqwJwWGxJ7ypALtGUmffwO4WWXnguiCW1azMX63\nwTUt\r\n=zL95\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"ccfd082e797ae50ee6f45e822f759051eea949a2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.27","util-deprecate":"^1.0.2","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.27","@storybook/router":"5.2.0-alpha.27","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.27","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.27","@storybook/components":"5.2.0-alpha.27","@storybook/core-events":"5.2.0-alpha.27","@storybook/client-logger":"5.2.0-alpha.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.27_1560725797862_0.5927905654776948","host":"s3://npm-registry-packages"}},"5.2.0-alpha.28":{"name":"@storybook/ui","version":"5.2.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f96b9eadf05ab393ef004a8bee9647190ab745b1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.28.tgz","fileCount":151,"integrity":"sha512-GlppMZNnXHoNru+7k4Sq7uKv7c+mYOhhxsSS4EnL2d8IOR2RzmoTdUVAFZEAxc3b3hBh4ZK4n4mB97pVz66fsw==","signatures":[{"sig":"MEUCIQCWMzwyh3goZzS4J/6WTGTc5p1x03ixwuL0HCLjR6s4RAIgR0z2qXm+RoYQd9thkzs2N8tONq7kr+QHLajzs0Sna/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":989344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdB6wyCRA9TVsSAnZWagAApjYQAJX5z57aDu9jlA49VMht\nzyN5/KuR/0T7/n4xsMAccWQ7sIR5DUVYQgMhNpWKa2GQExgXYb7qGFGzQnJN\nQc/siCmg1bnB6O4tA2H7yhkQc7EbDjh9+XOFdgotN87nQUYgKHt1VJgN6Nvl\ntnFfg/wvwGu4hSzCcnLT02AoexoVjBRI792kH4SMqz6Yke5npzFTtfT/Efx/\nF4VwCTdjwKP4O+RpYPKyfhsz95KNT/AWe8l21QjkQ8Da3BXe4lOsNnLti5ij\npWCTHEf3epyhb6zL3d0Cil9L8aRfdShts9gvVFnQD/vjifrXJOR7i4PZIKfx\n/VBtLIpxklIOecL5/HDVxC09RuTVb8XAEnMAvzZbRrsiO3jWSXDtwVYU+QTa\nyUqv3fhjDxwAMxKUvAaJg74alPVfqllHvxDe4LhQQquTVgA991ZxDZEPoBwR\n0esRTj6ZU4TuE3zKCWIk5ra01mIw1nh4kdC8AQPNlSlw3AzvpHiZU/AqKGlV\nYe+xxQLKwOSY8iIEsjpAlgIujuO4MV39ZZP+cSRnMFu2tI6FQhehrcBMtQkx\nCPVHuefUCYkRIL/kdIF0Hg2dmKUJ/VOpqEpEQLKyZQbgkcpbkWsLp3CzZXNB\nY+RJERa0S441Ml56491Qd3HQw0/7XYDEr5o73bTYttY0k1aC6tpQ4fMG04do\nkdMc\r\n=BKX2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"f4576d1118d3afc4b588f97c6070355515dcabc4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.28","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.28","@storybook/router":"5.2.0-alpha.28","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.28","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.28","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.28","@storybook/core-events":"5.2.0-alpha.28","@storybook/client-logger":"5.2.0-alpha.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.28_1560783921751_0.6128234170791946","host":"s3://npm-registry-packages"}},"5.2.0-alpha.29":{"name":"@storybook/ui","version":"5.2.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f5e3f1f767fe872fccbb9ccfe9873c0e2af90906","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.29.tgz","fileCount":151,"integrity":"sha512-fsJbXLNcHA5Bmy4WgVOO2YGia99qSX+JvKuXLYTUcYgb2qlwv9O3xAQKUrgDSlWwXzjPvFPYKawxJJ6hRGNQQg==","signatures":[{"sig":"MEQCIHdF9b3rfD42wQ7NiidS8ezY8Lst8Ncee0X5geajf7KyAiBAcQlrH03glrAM27m5Q7NKEyUmP1kggbbn1cwEkVM/8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":989344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdB7EmCRA9TVsSAnZWagAAnVEP/A5yBPxovbeD+EXqIC/B\nReNFMrAWp3iWIWfAmZXcxuD3dmB24RYCMYLMkJeX8Ud5H3l/+8rZeEH/Assg\nJUtrju/OPCcp/7nFTCTQoqOWAcGKfo1xEV/VjZmFAbREEfHg7EdjI9BHQ3Tp\nKiTw331FaSTtNnhqtH5WbkY3OXyFvKmKXpuIhn1jF5Be8MnBfZqHopJ7KGDE\n8nCLf0dPDeJzgGmKDxzKx+DMqedsphCegwAHQot0D8GdTYqoMm/Kn9zJZbfK\nfFJTOZTMP6sWObtHW+qnQ53gokW2HKhGOF6wuFZwYCk6GhLKPrBe86JCZCKt\ntMtRuBVqqhRxFD4qalTHimKpLnIZLGPXzDUpdrGW5CU193sXe4oexOltzvSh\natBO0vGa/V6E68L4fpNQo4rvJGd+lgGB6e4jeSuIV5uzSdmU11MpeWXgHm0G\nL8yMQ6GcMbR/bREvCLnGlVH171wrl1LJgckaGNuWIGcIEQ6luST5CGYK6wt4\nlVCpybwE0pVpGS+3yDngwle2jJSMkZi1BFJpoU1VCzm4D77r5H12dENzltu8\nOEEVfydPOSmgRkQKx30bRo/jfpYuhs4AGkLH+K03h88LQ7yOnt2PCYwJFOkO\nJzkCC0zrhoMzalcRqa+NbgbVhnBW3XT5ArW/mrPZ+9K5AgHxkzbQ862L5wE0\nqPx1\r\n=t7XK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"113beb6a0a39cbca06d6a57bf6983948e9bffd55","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.29","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.29","@storybook/router":"5.2.0-alpha.29","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.29","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.29","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.29","@storybook/core-events":"5.2.0-alpha.29","@storybook/client-logger":"5.2.0-alpha.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.29_1560785189945_0.7925280953982885","host":"s3://npm-registry-packages"}},"5.1.9":{"name":"@storybook/ui","version":"5.1.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"406667469e6dbdf320086647d8d80776bb051a51","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.9.tgz","fileCount":151,"integrity":"sha512-guzKv4VYM+06BzMXeO3QqlX0IwUHyeS6lwdPCL8Oy2V4Gi2IYHHiD6Hr1NgnBO18j9luxE38f4Ii7gEIzXMFbQ==","signatures":[{"sig":"MEYCIQCErfishrbB/zBNGd476Lkdo3M9pNwuKGU+xEHOdmIRtwIhAJHv1UUXvdbrcje3BU2SP1w8VDJw84fEB9psvZRkRZcr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCtUUCRA9TVsSAnZWagAA1gQP/3FR+NUf/AB6XqaLANdy\nefv2Q1dQjgkhEL/LG6jWN/odE12gNYo4FY4WBtWcI1NI0khbUXqs9agVFQT/\nJxtn50TBBCItURbkDy/ykLCWJGTlxLmaqU0crSn7lPifNFcAOgL19URbW++I\n0UlpvNlarnE0ztzf4E/Or2a5oiwJZ5hNFWq9lovPDaCpM57YOXWiRwzW8G7V\nOaiFtAbHqNbXmT+KlJaKN1wq3MJvd8CjK0Hobyom6JPXcmXrbTIEgpL/PflX\nU3Mk1dLW//QVoh6w/I3bwx2wZF2lI9tAu03tH5uEMWlfu7kK9cdDR6LqlU1k\nIRwtHsur5w0499QODgudcfrol/0JcrDQAmKcNecuuV7gYGczrBZyQhbm3aQ1\neN0M1QO8iidDKLjcaRCFYNeMV3RSoJcVjaYWw3gbgmTRUN/lDAKpt12q7B2E\ntE7THKW70y1sSEk/wVEpFQvAZfjOjYi8/svvv0SeiCTZJ8tfizj1k1oCcnHg\nzaDWskp0Sv98UzZ5o6cs9y1OUKBU+dO2L7oMChORjS5Cv7n56eVnUu5PqkPN\n7i4IpBuiVO84gYNyoYFngB0hxI/kqsllwgFE9LwE1bC6BAXqJI0qo466y1OJ\n/pGASOyq5g/Il8IdiPlvd7pzGDS4iaktWsybnrWIyzDavjrMQpSztb0HWUNJ\nnb22\r\n=oR4Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"e211b3765e57bc7cc32b8dd9579d86ea03a6c5ee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.9","@storybook/router":"5.1.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.1.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.1.9","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.9","@storybook/client-logger":"5.1.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.9_1560990995181_0.8541681259378786","host":"s3://npm-registry-packages"}},"5.2.0-alpha.30":{"name":"@storybook/ui","version":"5.2.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"97c86c86472a789ef47ec79d3b221fbc40ea0b10","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.30.tgz","fileCount":151,"integrity":"sha512-pGo1JZDH3zhsPDceRz1OS7cDtvOc4rssHOFoq0H1mA3aKBT7Oy2xiDV8r8JzCWIAbL3QZoQgmsS90PnIqEqpqA==","signatures":[{"sig":"MEQCIBKukY6tYeSDmvGyKrERQ+FlLw/mfHyxa/j6SWsBXy2sAiB9IdvupD/z1xyrjMAWcxHNa8gt3cQ3sOK+xms3bMK1QA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEhK7CRA9TVsSAnZWagAAMWQP/0+bmQaoRctdESFMF+Tx\niklI8XU0bNdnAAjySh/rWOH2GZzoUzKbHmwObuCpvh4lSz0n0cQkdAejRfUf\nkFJxrHoDpORTXZ5wyC+2OWRS1USFbW5O3r0bX6IQ89py9ORxHlecHh/IFZ5f\nfkxdA7gDK+u3WU7a3iC4Kx64YuJmDsuQLzPGU3c9Inu8EeHq5Lm2qt0Mx7iS\n9tXnpKUvQihXjatY+zbvbMbgeicNbvtkOw/cKI6iLCeKCNt+qozDEyu18En9\n6si2FEhtHilEt5HbD+N2UNi47Awkz+yOpHOi4dY8vccUDz0BaN5KUpu2fqLK\ns0AZSWnF2J8Ku9w5wci9on50XO2I7D8w0Ucven6BR3Iy6TMHKg3k5og/9qJU\nrlzgeEwwtAdcY+RSw7pKJTGKYS+U78qoJa9kEelIWF/iZ1DTrcc3jgbp5/OA\nKItm9OEEzzLRnj1tHqwmOcish3C6Ovnd8tMOJE3ELipKD3eM9OjQqvQc1b3O\nlre/vQ7UU2tGFfrLM1vDyUELBzoQSychfAKmuHSJ1zt+mF62wqsPYD+0VY9t\nYOV96eke3Z7+TXGyv6EHzL2+cBclp2AG2qbMxTpdKy54a5zc67h3BIlN+GLP\ngsqlxVRCTEMlJip07E6waGMo9RKcNPsCWcwILT0EQkVw6KAWyDVdr5EdNB68\nM28c\r\n=zA8k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n","gitHead":"e5e0aab372783c76e8d1209df7240f4dc2cc57f9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.30","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.30","@storybook/router":"5.2.0-alpha.30","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.30","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.30","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.30","@storybook/core-events":"5.2.0-alpha.30","@storybook/client-logger":"5.2.0-alpha.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.30_1561465530324_0.0728310007165982","host":"s3://npm-registry-packages"}},"5.2.0-alpha.31":{"name":"@storybook/ui","version":"5.2.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8a1e83df07a8dc01f5a807771f4fbe1fb9d4fe6c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.31.tgz","fileCount":151,"integrity":"sha512-VNdQv5RRvZkYcXfTkoAtU3q0WWjdFr0jHLOKByqVjzGJsemCfQ/WvqgTmsj4N3bMRBuGYvzJR6FM6aRFlBmxXQ==","signatures":[{"sig":"MEUCIQCLWqpwv6OJkb71Y5SEKkxEbfdqTDYa9cFOx4/9j+BFRQIgY36qt3Vcak+cysane3n01eXahaulAtFni0NwL5E2EF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":987858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFEe0CRA9TVsSAnZWagAAIpIP/0fAOto8wFoap598g+5g\n8lAO3vyQVhoqEFIyUJbfsbEuqu06ffMftmtlpZBqb17kRRoa/6h/+eAcVEsE\nzuy1cVUf3YK6YQ3LQwmPeE+8QiZcTv4LfQHdhLQ+DpwUPQULmUsgkxB5adIv\nbRdRkPw7odLoMUXzPsa29ySwJXbcQcaKHGveKIY+xb8zRyfKB+YAvYn1ifST\nK6WoYbU0IMp3Dx1nhwucBOXLsm9pumNrXvOrYQoch1N5Knh8bWynA4WhvODr\nV3b7dC+2VLD1mHBPjgmLL+CN+UTpNU5dAK1ID6jRkQU3FWu5VuKQUjvV6gjN\nJZ4WUsmKiY7Z0TquiXTFJBz7yFMmuDUKVFnQ9ldR6dIcwj+ozt0s3XQ+Lmbz\nXB+kX3jVIFmJ2X6cLLakeKmbAxOjKPTLez2rnDDaeI/cI4P783WE/hjQUBK3\nTIsCBjLnX5/2Jtik1KjxI4TBTWGfk+svmDv4Ni54HQiq67+HzIBawCq6l/lQ\n1vVyBYUJXC9pZ48iCwAhjSxPPIFidbsrvqdOj8AVdh/i0Cd90DycTeM6wOPE\nUM+gNF2KyAgZi/jk0vxrUgRLqEyp4WL7xai1MmR5gCkf4qh37dNdmFNT708M\nfMhL7/+mpzzNcs6T2vKb8Bm0nnJ1jlhYivqEmUZi5tC28VPvVgY2b/qI2K12\nkRKc\r\n=n7H8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d6843e3e5ec041832f281ad53dd95965f8de7e61","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.31","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.31","@storybook/router":"5.2.0-alpha.31","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.31","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.31","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.31","@storybook/core-events":"5.2.0-alpha.31","@storybook/client-logger":"5.2.0-alpha.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.31_1561610163671_0.7113417801837203","host":"s3://npm-registry-packages"}},"5.2.0-alpha.32":{"name":"@storybook/ui","version":"5.2.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ed036f0b2015e64968bd3a21c0f0fc44875b3af4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.32.tgz","fileCount":151,"integrity":"sha512-Qrofa7R+BOAawbR+NCRJ1pwkgm+2K5bUPm5E99pOZwn3BAl85cWibs80RpiU4ZJPPw3yP0Ru6Yixq569TDgEYg==","signatures":[{"sig":"MEQCICPIVnluISu/smaow1EOnbEdx4y4Ma3ZGUyru9J4FbVKAiBTQ9HXrLCbYnyjxrFx0hY8KD2NgfA/HFXPTrX2mzWgow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":987672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFtvwCRA9TVsSAnZWagAAJ+UP/1VU6OF7Y5RHw0ZjQz9h\nLIwuAxgyOgek2Mu5F0ZtAwu/XHrvYkjv8H7I6+tSFKVtJX4mnd9escm8C8xu\nJ1SCOpyAGQhziVQ1ZhM7RqVO5rNvG82HaLBxtn8ZmfArQm7aQfm6grid2/PF\nxsH1QPuD4IH44z692XcpJBX/8qprMooZqZhGF2CyifijahqKWw8OGugYA2xB\ncAo62MTJiL5qLfTa97kyIjiYHB6LIRcz2c7Ek3fTsAqBaeruVAASAz29NZR/\n0fpCH0HJvXldXIGI1zPw6KC1GmjtQYXxpyQqisGohh2pbNK39DHvXQEfaYdV\n4dkDBWxiNwOpvIBkjThXkHtTXwSmMaeEwvcAgrpVb+AHY9zX6TBjk9a16M1U\noKsX7vcJNWvNZAbAehYhgNrrb3pj9+7UsxEhVD2HFigRw9p/OkL8H2Y+9S93\nkC9HLBrDG+oiDklKKj60hOqes1k/v+sT/wRNq0hMEDvNE4TTWWmbTYyb1jon\nb50yu2tjscu5GY3un8JrHlEkQBeEUYyjkcrC6Ivyp5dKU4tdCuNHoJDCg1oy\naAsn2tUbTBCZgnU0uRF+9m8yEM3DoED30aBQa6/8YIEy5d45jkfLjIhLOthE\ncJQ9vSyZJHhvVOyhX9Z70uDg4iKOsKi5VCwE3u0AC6OcbZ4MnYRlBWBNfmrV\n+3Ss\r\n=85eS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"298866f7372d24a9914a8ea19091bf222f090e77","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.32","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.32","@storybook/router":"5.2.0-alpha.32","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.32","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.32","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.32","@storybook/core-events":"5.2.0-alpha.32","@storybook/client-logger":"5.2.0-alpha.32"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.32_1561779183272_0.6101247590653058","host":"s3://npm-registry-packages"}},"5.2.0-alpha.33":{"name":"@storybook/ui","version":"5.2.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"27db55b1155a756f204e4790a5791e950c5bcc1a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.33.tgz","fileCount":151,"integrity":"sha512-Hsh+kp9/U6UCkMCWSdBKtOol57Dkuy0DlTBuNiA+u+o5y2sgsYOJk1CU+D9OymbVo+76+S1n9Tw3v4mvs7tpmQ==","signatures":[{"sig":"MEUCIGQi6rg9AdvRBoEr56rwqm7/MjtZYsIlaYkNtDhIMFkCAiEAldSQvsv6YxcZ7HtyLm4v3iEHvPIS0cRVjclWa046gBQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGewbCRA9TVsSAnZWagAAALsP/0ykt52oVqxZ9ppjyvaG\ngcer5Cs+dx+doY+rr1MDw1QUtHos+LDxn2oY8dUduSs/aa8ctfX4VACyjj/V\nuy4I4sd0RWgHU+JbjVgblOxAmHZocZBq7y37HahS9oAJ+rjXpxcUhFjHisL9\ngIXeEOio6zGQY/DlrR0eDPoi5IcjAQ9nQI0qHLK6HO3+SfUj9E3GBEinWHYN\nV3Th5f16Bcy3vxHOLjz3EvMTZAIZ2qxsIdnbBjLK46M7WbRjpeYTQMYqba7k\ncmSL4FzzB7MLPEdy2VirBIgyRDh0b46S4iP3M6m93ikppBxt6DzCMfNzawIL\nuNmnzJo4B1UVmIhxgERakxgZr7/iicbHEoPbKXI4hE9h3TVTLw+INfJ+Q4+y\nUP5Oa5AQpZRIEuVj2i431Z4NSV0BHjzVucXgVPx70nVSTjre5hLaY/HcvKQG\naKJ6q9KtoThoyZkd/TxD12Ssbm7gSh7BjaD3AiQJuoekLznhVEogoKafL6HL\nzMVlaRf086zV2AmAL1q5gcq9kFclZc2/SEzKtE0n30tILDA7Clsv+SQY1tBn\n2fKtVr3b4C0pfPSvZYKFtbyzZW+M+HoIXAgjJ0Hdo5hmV6RtHKSVi5bEg6YC\nTyaQkaEN61UWZNqIld6m9WQoLgtzjy+/eq0JtJWd+aSe8pqeM7nczCbL4pba\niDtx\r\n=+grq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a0561d267a393bbdc0e9c5e4114fbd07bab54618","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.33","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.33","@storybook/router":"5.2.0-alpha.33","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.33","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.33","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.33","@storybook/core-events":"5.2.0-alpha.33","@storybook/client-logger":"5.2.0-alpha.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.33_1561979930643_0.1650406695724067","host":"s3://npm-registry-packages"}},"5.2.0-alpha.34":{"name":"@storybook/ui","version":"5.2.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.34","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2f52ded5c8b1912ec903ce97175b5d1888c300e8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.34.tgz","fileCount":151,"integrity":"sha512-ljH/A9u1pjFucViOmYEBJmXZPBtA3mlkLSSneYkHaGv/8hI7DSUp66wel/wNi/+tWJeZMEn/bGu5gHaMpZmniw==","signatures":[{"sig":"MEQCICZuq63nrscNAK9mnBcOFgRwP+zL0T/cJhBOiIVqK0xGAiAYmuiUKWjem6w/dodysD/KEUfaeEe72JU4XckATWjATQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGrXeCRA9TVsSAnZWagAAkvAP/05vo+tXbIaOkpXm3f0R\nbI68cml561cILzpOgusJ+u4jSJwduq36RfKRCxsL0DxuN8EDOHsLUGGYRCR7\nMJL5bl1zHKfhAbeIc8Acz7KRAv0z8Wdts6tFCxIFZg6qNzvRecaHk0qVeG57\nReducU7rVWeN+LiWTZBVISyGzf0/cogIfZShkaiT1KA/NnZ2DIPwBpoVo1dE\n/VxMSjMEhVdRWIB+fpE1VUSUHr5VJScZ1k81prNbvirAt8Vvu8uEnzpDAlgb\nwn15AGY1FRRYoxSxA8pGhkVRZe70glQGXve9jVDWACpkxLjDBYKYxdeQOKKd\n+X8dPt8SoA8Q2VKKzliJ8mmJFF3jeAGu2+qXnF+M+11kpbGaXVEuLAavohjU\nNJ4OWz0UIa8QrSNvGmKijOZlN3V3rTqthdFQ5moWUldEEGZ+4H84Yt1w794t\nmxS9kBBxqj1uDTU9mHpwXYqGeuXINhIJYMKPp2wJs2MYCkjMR7oK93EgGLyy\nn7x/cr5p4Q9uCBczx/EFgDCXy8AkGEKL5GWaIHG1vhUVua2VENQbqYOwvK7f\nFExp8r7AxP3e+LtqE8k6ZS0WaT10cPrefDweJDBRlvclFtZxYJX5x+//YPUx\na3Nkmt2l4pCkx4v/hPzkcl4YceSJbUETb9dmAygffTZa+hCEMW9mAzOnK61o\nlVbm\r\n=uhUs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"367f72455f59e5bddd0054d421a05f3ba04f0424","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.34","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.34","@storybook/router":"5.2.0-alpha.34","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.34","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.34","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.34","@storybook/core-events":"5.2.0-alpha.34","@storybook/client-logger":"5.2.0-alpha.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.34_1562031582045_0.6231696801168303","host":"s3://npm-registry-packages"}},"5.2.0-alpha.35":{"name":"@storybook/ui","version":"5.2.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.35","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9b79d1d0ffcacf780fba8696b105331135870f40","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.35.tgz","fileCount":151,"integrity":"sha512-TgT2LuAhJ2sjckfqL+fvnCUbq3tL1deSfzL8J/joNfrVkwOOLLnjF9Bgafq5ZWENZvkjd7jsj6BBSGjqVsMLSQ==","signatures":[{"sig":"MEQCIDlIpjVVOgmiJbm06qhnIdeChnODHsDBf4LUl+rnfxxHAiAhhTdBrQWkb7BoC3qqp0DuubS72vyyYMXEVjFSvQV9uQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG4Y1CRA9TVsSAnZWagAAuzMP/RZznGwg8lpMLOzxJaB6\nJNmKktvppWDUesKGkcmbaaCsL1HN6+C6hMXbID+sQHLJqH8+kD+wN9bL/gXL\nMeeyeRpfdRxa8qT14ymWr03KYgJGhLEcU8iGDBu1E5tRrhsgPOX4DrWbstdZ\nbqIDTL1nCiJeKnC+qbmRCuMDbNjEre1hFKgivlUoIk+OsLXWsvnx1hRdlm8K\nKyXWe+MdqWbUHJLHvA2Vz+zuM/tkjzZOcWmgdyNYXBUJ7J0ErvdIC7xY33m8\n1GRsn72O3eJsFGMk9zGK+ksNd988pyOn56InifxjqBWOWEFHE7JAp+CcaGWm\nkHh9EKgUHAVoKYs//WEYGakavy0WC0CiQAE9Q47TwoY/0QChrHHFI9AcpchT\nr/iWjB2inKGiHlZx4ecbYGOw2bQsZ2MTqbrAyOAqWHR1HJ3QGtAsFns2x7Kg\nwS8H9T0b3Swa+6Gdh+JUQT/8hnvgBGEcR9qA2iSffJO52uVJcD5388WcDcYz\n8PpVrJm9Ba6YSpntZVIpeT+0xqKjAc40SuJU5GcXKu1aqPCIf9HP2zaYGpTk\nZO/5LvUCys6sqpb3O08kYp8MaLmV31HUExb3r3A5NYaoQoKU5n1Riawq3qcf\n0oU5w3u2/XBRtvQmxrs8BlcoP3GAQCzowaVaJnQtsfUu/Rippw8rKCtqOh4t\nZpxi\r\n=ycZI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"69ae9c7d545e18d782c79b73a6ff3ea613beca75","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v10.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"10.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.35","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.35","@storybook/router":"5.2.0-alpha.35","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.35","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.35","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.35","@storybook/core-events":"5.2.0-alpha.35","@storybook/client-logger":"5.2.0-alpha.35"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.35_1562084916859_0.4751022414149455","host":"s3://npm-registry-packages"}},"5.2.0-alpha.36":{"name":"@storybook/ui","version":"5.2.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dc71701d8226c8eaaa7d790b2c6d5739669d6435","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.36.tgz","fileCount":143,"integrity":"sha512-+qMnnCiBVYRq1HlalW48wxOF21rYXYDfzm3mkEzU2iSccxtXzpvBC9JIP5avB2w51ZsWXCam3XZdGuyhoLQycQ==","signatures":[{"sig":"MEUCIHdZhPRu7LapCaxEQ+3O6Vx+OvGAYFuUCviZYqJ0jzjuAiEAjTBOnoJF1uv+pbnYuicmLNaLdQ9vVv3vKrd7RboIhww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":567144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHyRRCRA9TVsSAnZWagAA74QP/2N+lPVTXxEZHAbbgKx6\nbXcOVcYFJwzW+MDYAK3s5u7GUu/pnQ00Fk54Lq71LbGP+59eZwc5NwzRPebo\n5gBcISjanBrXhgANdcfbJA9boihyAI3P94Be8jStBILnWsDiD+Ds80hmQ5QM\nDN4sHpsiXC5Xv9Wa/WJidaEF0lAFX0A0ZakMciVoiQ2vgRt+q4MGfhzawMn8\nF3OkekAbNM8s36kX8Yx9ck64msa5nlPrYSUMJIDNO/E0M65F88N5rLZelv3o\nrGQ70ZjAgeim1YXHc/sBMcH6gf+L6GzVpXHynFb2TYUYD2iDgVOExhB2YXzK\nJscTat7IGc5apU2fInfdCGRV/Dn85j2y7NWY3F8BIt29fgqmA3eiSqonBccA\nY630LgWXyC0KbgW8sMlx5U2hpri9zmrr9FqliFl7ue+6Fem+1NwSgzGTyG2M\nLhKWZEy69kLX35D1HHvbfyaWD1+ab79WIt8ZPUgpKOD6x2TiSYFYb8z162Aw\nGSNmAqTuEeRneg3qmGNHSqM5BfWbqQcbJxUi35T3qaGhium3y7CjotXW0eT7\nqROsw6QBYlLSpqaZSr+1vypQBlO2unME6D1F9e6lV5QsfRBVHBN8U7KW0tFf\n/oQfVxc2YzjDUuIZ+V3tMBCugiJiSzuxhtQSR4UZJkWRwocZmjiWbTL7FrhJ\nUcHA\r\n=T8Fj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"65db79f6ece38afbc56d28abb37f5eb21c40a5d3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.36","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.36","@storybook/router":"5.2.0-alpha.36","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.36","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.36","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.36","@storybook/core-events":"5.2.0-alpha.36","@storybook/client-logger":"5.2.0-alpha.36"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.36_1562322000660_0.6624374835174516","host":"s3://npm-registry-packages"}},"5.2.0-alpha.37":{"name":"@storybook/ui","version":"5.2.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d3060ae4dfb28c98bcfc8d764175e90c954bcb30","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.37.tgz","fileCount":143,"integrity":"sha512-oomHQ1ow/OZva4GYzZPSDsKeawMZo2bzNDLycZUJK0ydRIJOVlopb6pWyd/XyNblsvQaXQ9kTBuICeeD4nZs2g==","signatures":[{"sig":"MEUCICs48LHyzvEPdQOkZxbypnqirTSxPoEqA2GD/MnNKkP4AiEA46eAQ4r75Uj2jt3mLWwXCG4pf7gKIqhdFsrB0KajbT4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":567144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdItBXCRA9TVsSAnZWagAA5TUP/R1SXRjEEazVWABrOuts\nilB4IuahbIE4/wePwJ+EDTNXudoIZiL4Q8b7Yh3bDccDxFndDWEczrrOJNMw\n5s/0kayQe3neQ4FZd41fdGuMhPiD8NSngd9JQsId1PehxCY4tqHQN77BmiYd\nzxH7C66ulIVm/GfsV1DyBNGyaTzJh2fRTQIhot1VI0og+ospgbNLJERHtpxs\nbbyVdkpOcIuS1x0RwPHrxq/Mcdt5KnHeih7HpKxgyKxravxts4uJ/n3xB8t2\nI2F8APTVCiDE3hxP86d3zVu0t2PBOa6tY99AWdB9yZvXwoOviCOn0O1PLNJv\nD0UAwG7CjArB66GOdWru1bIkGSvI5yBhBiAPc5AhqwjuAU9MmTORUuDsmGkx\n0YVyCICSLRokaDlXH9wa7KdiceuPDloGjj4rZdjgp5VTl4OcxSJHVc5RF1tC\n/h6RKq1X4oZ6u4Vg4CZiSBC85ed6mfzpds+aDPkoTvpFKbESHGLszlY20Fm6\nvueP8xi8QzrA7hDkytMgeMIPcUMmGz/19o4yMfA8EbtxltLXhiok04VGAxDA\njBSnjJZEDhTVu5BNOeUxeHqNq+zzYib53oINMlcsKp7ptkH975cm2vdI+hUV\ntJ5EAjr9p5y8wx0E1DxB8bVTK5AF7LSBf1qMlBLQ9ekj6z0T+v96ybJ3RrOY\n+9ZL\r\n=2Gr/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8d82c6a62b4cb827f759e292f053f2d8cdf428fe","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.37","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.37","@storybook/router":"5.2.0-alpha.37","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.37","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.37","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.37","@storybook/core-events":"5.2.0-alpha.37","@storybook/client-logger":"5.2.0-alpha.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.37_1562562646687_0.8623813943478784","host":"s3://npm-registry-packages"}},"5.2.0-alpha.38":{"name":"@storybook/ui","version":"5.2.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.38","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fcf1b936979fae0d9d1b1133c94d16bb40e80ea0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.38.tgz","fileCount":143,"integrity":"sha512-rD/QvXOBkhDoLExz25qR6ZAFD1bBqDeaOkx8ARoKMbkayXUYdH34wMaRyU7GQBX+yz+ehU/9cgkCBW25+VqU9Q==","signatures":[{"sig":"MEQCIDD8So2FV4T2IuBSpnf4Cdr4HvvilaKl8rupuFwXiesKAiBM974Y006uE6R4gHG8KCK3mTFfo1oePq1i3JPADrVWUg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":568235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI45gCRA9TVsSAnZWagAA8FYP/3j48L5WlrAN65wQgj4/\nYF/HnZm1VV028OjOEk+zTtZR5CkwKCh/GTkxo7ysvPj34BdJfDawxVqaHN0u\niLf9X7w3urkWHcRc32TWdn82DLC/dFhn9aClVF/tu8oMZyonmmSVINUOc3je\n1nuHPrb4aInm4K1Nbhnthhlnri1wjRI3fxgawkEAbh/sdkJClBvYPLlEgkgp\nMOV25aRemYFGgnPpNk8zwLnIUBtpByVyVME2thTHc0vImwuNR/BJ+3zrQAzg\nhzDat9hbOUK4s2EDjS2F9UavRQ1kGmGlFNfRdjhuJqrr2+4aubzIOaE2aV5/\nO25A7d1nS6qS2SOm4OBN0/tCe2R1KuEGROuIRrVchtWlwbhs8Ca1fqYG7gND\nh/uxv8mcb+OptnBFEANwWeB59TgtzQOs3ITGcEackEmt/yFmdaDYXN4AmT8f\nFDOKeWIs1r8tO/vSqvosXEqXVdxEZqqLfyEfCth0JJFxOO513VdjI7S6Poyq\nHaJDEuD29MoaQbpABFhFFyzorPO5R08/yFA/SYr3nWl6fi/6IDEek/13zE3n\nmiosl/BpmXZQ6aHLUIufxjmDqFhwayYOoU2iXL2qvsu6zN8XC/WixU5xUfS8\nJMBvYvVLKIikG5O+DYJVbyV5uGqOSSQeXlG9Ri0iy2FATJ73XHlG3f4pR9MA\n2c+q\r\n=V11B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"30078af6de38ce9793a46b1c50a3e378dc70225c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.38","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.38","@storybook/router":"5.2.0-alpha.38","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.38","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.38","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.38","@storybook/core-events":"5.2.0-alpha.38","@storybook/client-logger":"5.2.0-alpha.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.38_1562611295389_0.5408645120418669","host":"s3://npm-registry-packages"}},"5.2.0-alpha.39":{"name":"@storybook/ui","version":"5.2.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7bf84375fb3c21131719c5a4c44636103b9348a5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.39.tgz","fileCount":140,"integrity":"sha512-flQIMBbtBbGFAmyz++CuYSVjiAKdUWAfEVbjQL8CZ0+Aaqqvx2qwnBqPsCPSREX93Ez3b/RofEQLy7KFS6aZWw==","signatures":[{"sig":"MEUCIBBj2lcEFMxJ/FozbwLVsy+lv6wGlraSZwmXTZMMN4sgAiEAq4k+LvtRk6c/w8KgBl1lemP2NjiFqTSuKzoIcUpVvSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":549459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJVJJCRA9TVsSAnZWagAAnzAQAIaEeGSi9E9lPDfJ8SYD\nw5HPXpFbPOPX5/IKKyFtW55Ku27yFEejcqTr9KNTqXuG9j+JAqFOQ5JGr0fI\nM/oQYFw0+SCUvSizt1Z3lk8EdnF1DVEBXDayDugBlqcdDL88kzCfgLzb1CoJ\nyJFgwWRDYDd4kClWfK+rhfgfo9y+C0pkfuL0tkl9VA2liMmUx8Aw+uwv/DNp\nyrUhezY1obtLt974tCUEIMnfLCAS5cKvSMFy5BJwsWywwErRIYlt3xGVXvsO\nTZrMWxupogA7ExPu87sSXUuq+S4DZzG7dVatwIN4MiDr0hkz0j3L+yG0RFle\nA6Bjdzi2ZKTUyhX8NukjjD4lDVW0VRbz3PFgL2ytAnm+Mf92VQDhDoHNY1Eh\nYim9Fl2K4AN87FHOszjhmAOr2q91KwUpD6uhXFq4/yOPt1LmKa+45BI9f22q\nHnCKSPKgb8lbLAfx68DWUKfWZzD8KUyb2DTkhtlu3HDEXVWO96Z3xYnWLR6m\n3pJWlqmlZpiGKNZOrxnplw6NSXeaJL3jygn5U3P20j2A7mM4y57sFBIoU8gl\nRk7CZ4cJ2/WSGZZnVytbgmbjTsfNYJFw+7kjT6QwBCfsF4p4faRQUlrvGxvs\nLldpye2EBhNbwo4YDEiKxWm2JGP6mYAB9PwRhe/a9MDVqxN0tm8MqNWnfu6M\ngbfN\r\n=cYX9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3b17da48003c5b242b3c8505dd01747293fc4cc7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.39","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.39","@storybook/router":"5.2.0-alpha.39","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.39","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.39","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.39","@storybook/core-events":"5.2.0-alpha.39","@storybook/client-logger":"5.2.0-alpha.39"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.39_1562726984475_0.3851255129855824","host":"s3://npm-registry-packages"}},"5.2.0-alpha.40":{"name":"@storybook/ui","version":"5.2.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8025b7459ab8da389d56d30ac8c2a5e9f1676fcd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.40.tgz","fileCount":140,"integrity":"sha512-64hab41kAh7wX7S551vk0Ydx/Imo8ltuCjTysMPA0+llrpfbn8/NqSIGHCbTSn/TNfL1Xg933Zlb0BS7A7jbdA==","signatures":[{"sig":"MEQCIGlPjVdjmETTCeeZCSYaUfNmd19z5x12K0y6KNppsKLRAiAOYnKMiUKCg5HhP5OV9RLyCxCd8T95BYF1PVzEgym1RA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":549838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJeXHCRA9TVsSAnZWagAA9IwP/Rrx3fNcB+hADosh3V+8\nUvPfbWZBr4KTQAobwS9qe05d2oig96CUfgORkXT4iWgbun1CYl522daosYNL\nyOT+cUAmwxnOyBwKXe29hQURbe4g9AdS99XXra6dKckFKYnZNZQpkhqdx9F6\nubO4ugsaBCDVmZVI0dAfsMe/IGrP18RN7xbXPc1SrKY912r9dxzcPmuCGm2j\n3DBvsO5dnOI/VCmCuiL+e2OCSzQHI8qpxUjcVkxK5y5pQyw2+1/bQHeId5aY\n+/3mHtSwMw5XgKj87iRIVfC1MELa84nZ+VAYjS3h8v7kdnmZafllvSo+xMOT\nGdsYYTquVh9QgGawFNPBK7LhhO6pkEcygDrX2882XcXc1qjKPXXk2a3tGM73\nsDqpzQLcXogT2pBVQcST0zcnSQI9YvYCdwfhBjPkZAYVkrC3uHxwKw5aHhQG\nFiHjqHZRnoU+BSuO816S3OM4WPBsIKwe7sujZ0kQEgEkeo3DqRsNTyHxjm1c\nZrTsmU29Q5yehb/PyR34YalNx8ZTqH1uxsQWFs/vpZAi9CaMwIBW2A/levXt\nGroo78cdQ6/w0SVY+zxzjD3/C1UQ1G/sqw6uV+9mwcaU205aCB0lj7m/egt8\nwOJ/4Myvpt1thgjwgbgU6sP7DfxaQTboW+b8OUbYdwQjUCzvJXNgq/4dO+hj\nY3ws\r\n=qYhg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c41dafcbfe4d4e87ce6f6663bae2093078d2ef87","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.40","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.40","@storybook/router":"5.2.0-alpha.40","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.40","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.40","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.40","@storybook/core-events":"5.2.0-alpha.40","@storybook/client-logger":"5.2.0-alpha.40"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.40_1562764742931_0.110300510325676","host":"s3://npm-registry-packages"}},"5.2.0-alpha.41":{"name":"@storybook/ui","version":"5.2.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.41","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"615c3ae85eb38d4937dae5a216144c8c4e0ee1ae","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.41.tgz","fileCount":140,"integrity":"sha512-dMuxY7ocLNGzWJ07oHuVn00xO9ZmJpvnYV9xj0LUciRF1NpLFCOe9FUXtgYo4g4KNRKbxQFTCTvlq6pts3NkvA==","signatures":[{"sig":"MEQCIBx8ROPtRV/z1aTqr64YlOPArU/dMgtgDR8kU+uB3Uk4AiBnMy+6NmMIEe+P4PLi/fivoaqZwz8MjfEYgNHjNkmaww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":549839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJn3DCRA9TVsSAnZWagAAd6QQAI6ikmmdv5fEdfhP04tp\nMC6LnMTwWKW8f6tXPtLK+oijQIUoe5BA4bWRTocuX0XujZfcFaseH7rNcxkl\nG9kFD6ZRp+SkqfvR85vM2rpcy70KQGU5RXE8jVmuPzYx5PUI+XAq3+Kn5eJp\n1sbhiJbtTc8iXi5n3ECQRf11GKtd7mm3Jh8apA3g/IwxlVfU7vKTNeQ6/g6H\n6z3nxPZ1AE2W/AlyQY5qXOODZ8awQjADUeE8u+2RUfM8HdjLgyhUouSD9Yfn\ni+YkPkugXrHzX6sw9i0b9G1ta7uJ88LXFoR2lKE4rHFd4Pcdp6DyFSFsDyid\n+oeiUEBNhgojnDiZJbAmQFqpC7ucjNk2aHy1htNXYXONxmczRrowb0c9J7Wz\n3bXl6W12A0j9rnMoGpxaHwWnhqbUhcYGnwZQ9ALznnC/GHdB2i7qBtREepZg\nV3zXGEEeHBcOST97OiuZIpln+zMOLsvOD4/Qh8esmuv9+ThX/kIKAqL2v/HV\nZG50Fx8zh2LHbLBmlWZX3ASJYaK5rq4g7Bz173NAMLvMlYW/FfjztdYkvUlI\nIBc8einOzSa942dUZx5Y2PDbBhdtwuXVSkOr8OU4waJ5cYFbGuFD/TzIJ66w\n9DPHYTwlmw32LGHuT3M6jLFzYGFr419E3DLVx3/tjQWa+6BLeIqYEHTq7q9h\nH4uw\r\n=sHUL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9b21aea75b615a4673a14b3ad2963d0fc924eb9a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.41","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.41","@storybook/router":"5.2.0-alpha.41","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.41","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.41","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.41","@storybook/core-events":"5.2.0-alpha.41","@storybook/client-logger":"5.2.0-alpha.41"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.41_1562803650616_0.5582409413102953","host":"s3://npm-registry-packages"}},"5.2.0-alpha.42":{"name":"@storybook/ui","version":"5.2.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.42","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"057c7524501317351c39750d1a946d17e249b9a6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.42.tgz","fileCount":140,"integrity":"sha512-cBf6+MkYLqV0I/2NFuMFi9ZLarvCX2Id+NabUp4ly+qzrC+eI52VNaa8k0cXpxSVfOn6QFzlDurEtRrxbZ3r3A==","signatures":[{"sig":"MEUCIGhjqI4MIHoSjubtGNWmsuKp8zjgT/czsUT0/xFjFD/lAiEAlqK6KCZKKGlUvAu6M6jo90FJd8Mc6RaAZdvnJTZh4y0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":550195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKAHsCRA9TVsSAnZWagAApLUQAKOj0C0qaW07X8ctxkwm\njlXNGZG5Vw3/1ynYt6DqyanzS8D1UFw5x5zKri7N+5sz83cI4eCWEIkdPTM3\nVGsY6QiNnrfwEc5drJJObnzZT6CE3Ggsq7k64VUjmYJwhZOBZlA8WW0A9dei\n6odH1t+N2Kv2LYLK65Lq0f3ZvwQhUeNlay8k7QWpGcb7fVKCeq1IOBn77T15\nmlESmIQ6gt3cnGcMxLtRtuXKEsYxEM39UVYHx5xop4iEJlH/SNqYVWtVKI+E\nw6DuIufQB1UeK15a45JWfm0ZMaOEsuXjSG0UNxUYVsCkd8mai29xmZ9fFK2C\noc5EvuLt562IBFAdKEsUsojVFbsP8mN3loLGCivwg+ftWzFzIiikaX8rSLBh\nv6O+3dhe8W5gwzTJ0yTkVk1Lep2KoX0JPxvyyj5BuE8H1s3fjMD55Odz5lX8\nKxhadD8m+HoIc+0X7/e+7d3tRkOpSaev9RxhfjovocTVNLfAk5n1xl0ZYNHl\nFNcnxiqdeHyO4QDW1J6B9Eg5bUtT9wS3+bFal8uD3zN5sJseUDMZ1goXDC/Z\nnw4bPE0gkNiQpJJN0x/Ds8DbRUqMf8d4qYw3tju3lV8VjWLyyqEf3FfolzTk\ncUHnnDSU9TMkEKGLTxD+IipvADGZLYUMNokYR8y1R/8sgfHHKm4LSi8LGtuj\ndXCB\r\n=5wgT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b6ae7280391f1d2648b6a530dc1c8629bd0ae51a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.42","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.42","@storybook/router":"5.2.0-alpha.42","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.42","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.42","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.42","@storybook/core-events":"5.2.0-alpha.42","@storybook/client-logger":"5.2.0-alpha.42"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.42_1562903019872_0.53374595139722","host":"s3://npm-registry-packages"}},"5.2.0-alpha.43":{"name":"@storybook/ui","version":"5.2.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.43","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9b06488d1d27de18150b539014f58ec83cf03ea5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.43.tgz","fileCount":140,"integrity":"sha512-I4bCp4/nATSDgd6XfpJOUSVSuiJ6lBYXaRGDyCvZ79KcSMymxOMiYsv7usiQwaepYxCu2FdJ0ChGLZE6ed6rRw==","signatures":[{"sig":"MEUCIQCsPB1zjpD35Ali2mBdD6SOB3/iitS+XcWMXrCXsj75mAIgO5N5zo2WLpUJ03VBuhgsPPJui1ODGlw2c+tjJ+RaWXA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKeMUCRA9TVsSAnZWagAAuj0QAJVDnBzWkNaKExgDWeYg\n/UgaDe8NRzLo57ZDMEmWLJluhBwBDHS4nLdjPKmVug3a83iAOePPZhuvQDUq\nvLB1UdwaKVzyDn8noq36IBfs/iI8wUdrS6ooq5Bdw6I7RVPXP0Sq4vwHd7pm\nl2p1eyQznlEww8k6pCCdOa1qnuF8AYmhMRziAh6NV0h25he27rLpXQQXgMvc\n5rsz0UXDzQ0BTZKDNeIkeJUNqZfMf2su6fqHYkZtctOx/Gl6U0mR+9LMgMjc\nqQwuAQRq7Hu0+Y6e0ygdCJebMsYqdJRE7fhWSLIIJb/Sm6sa+WbAG/B97l00\nao8Vf9d4/CMXgO78joylvkZwkycsBpKXx5yp7tlMGnDC3Byunq7MMTECHeAR\nJ1I+2e1ml36C0/3opk/wztavq3EOd7U1qBdHvMdJTCt9HUa+wYHWuRzbpEqn\nuqEVrlaYGo+QM8IIlNIBeucYnFt5ykRZrrnYtHhYlLA8y3dmTkS0spouI91U\n1Kgg6pnK/rlbNjLs2pTZVR0TUHpZbnXqrO9Xlv8MtAq3Ntsg2QI2v2rpHfJg\nl23bpvIuFdthvnKYdzvuzNhsIt87wpbJTTpk7nNmgvtK0o8jk+QTUqcNj49S\n+t5PzeQ+FWUm2eKC7ZlRE424hiSAUzJFBt7NrC+lHfnrhYZ5V2Lwuo5Ff+X/\nghUL\r\n=OCJZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2cbb9614f1bf8ac711ab2d8155d6f12befe8bdda","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.43","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.43","@storybook/router":"5.2.0-alpha.43","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.43","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.43","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.43","@storybook/core-events":"5.2.0-alpha.43","@storybook/client-logger":"5.2.0-alpha.43"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.43_1563026195610_0.10177133973261898","host":"s3://npm-registry-packages"}},"5.2.0-alpha.44":{"name":"@storybook/ui","version":"5.2.0-alpha.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-alpha.44","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"88d250de7a4ab05dfc6c38db9a584014a9c067f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-alpha.44.tgz","fileCount":140,"integrity":"sha512-8HLLJJNSgcrGBHkiBDWNeQCPT7/DU52k+fQ7uNi3N4sBNT9YbV6quOG6cyKaHLbuR6QhGGPcxYd7ksEnkJXzFQ==","signatures":[{"sig":"MEUCIB6eCTx45oVucgeXz1PLdZ7x9r6CjAx8jqlewVArkqV1AiEAuUZYJeZ6SnBmaUnttrlOunDA0aRx2GRVhT0VQMW4FWU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdK9jwCRA9TVsSAnZWagAAsRkP/3VdL/FL9nbfj72DCPws\nm7F8lHdqBNbATnI9LZYx5etoxbroRCPuK2+As3d7ORbO+HFa6WOJsQZKK2pC\nS1NCgupr5JZ2L9ubrDvhWW6DTcQZmnJIWTBh9U/6yShkorbpcgGi5q8QLaMP\nHtd+IyIJCqKX6DWI/SeApI0RWw62lMbkyDEd7MGzwznmoBrJtArsUdH66Mdr\nda2mNF+EtxYeHrRajwXJggn+XklbYyJH2MVrIXaNVAKrYR2Y9ruYnveNsQLY\n85AtR+Qr9AjTF7OgI0ZhUhj3bJORIkBSPanPfP3Msjfy5ZgKe22XWfhlUwMZ\n3WVtNwCUqPxrznwbIN4p/YRozolN3cxLRpPgnSaUyLlN7poFcUeb5nVOd81F\n/CgQqXNG0urBQPryssZPyl24w0+Dc/cXaCdb61RSKesi4K8qzUr28erk7pOz\n0/OtQKjYZ06l4Ty6ESErJkCG7CDct7ipJ37ogpMbrxUQBTtWADF5BN59+QSU\nIJ6H9ImApmm9scznZXgRrUB3ynTfFn6uQa2dGt/4dJDw4iE0fmF8PT4acjni\nHx11jbmD/ZHwTTMNFEf24agFeAZ2LuQSlr8QK5awRZXWagmPxzxGJ1eWQl3n\nAvc1q5rY+S/1z5rqCc7SUwYIHbAVEuXHiQC8xEqVBY+Oy4L1iafLs48lbHZi\nr+/H\r\n=htNd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f3487c68e4d171d88c9ea66fc76802279ef75dc4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-alpha.44","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-alpha.44","@storybook/router":"5.2.0-alpha.44","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-alpha.44","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-alpha.44","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-alpha.44","@storybook/core-events":"5.2.0-alpha.44","@storybook/client-logger":"5.2.0-alpha.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-alpha.44_1563154671645_0.19497105343288879","host":"s3://npm-registry-packages"}},"5.2.0-beta.0":{"name":"@storybook/ui","version":"5.2.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"65ef546f6dd4f09df49a142e54e9491ccc621e8f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.0.tgz","fileCount":140,"integrity":"sha512-0u+qn20wyIr0E5sBjt/+cG/V62dh5fdt4V2jjaZpgyh3lbrlVnixjUaMmdG5yIUI55ZRg8dAbmC9W4/8vZI2qw==","signatures":[{"sig":"MEUCIQCiFWi0LJsc42+X7HDr2kv6PcrCq0nQjiXgSZK6EZ4e6AIgSdW0fer/xNQmHVbGnHaV3iGpn1w0F4G8IXNp0S/50ok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLHgQCRA9TVsSAnZWagAAQzMP/ilGXVF9aUnKN7zFFTEA\na1zv4aQTCMeDMe7i+EcDabgFi+4Yo9X7ycHf4oDEeFOaAigLqxavcO2GH/WJ\nG96T/bmRhDplpS/tMWr9sS3Mo4rs+0POagtymeNd1MrMkrLsVuBblMtNSCxu\nKY60Ilat4E0fT0CWzsxxpbwcpFOjw3Jed9o66Vb+cnV3kwSYEWyOPa8FWZGp\nNJpzfDYrC7BYAfmijsBNgTqSMdJrE9b/biYTZvQU2vDZjuominoHuRnYLqgS\nkbrlb7z4OVgK7UZZR1Zc7DYZvn88NP3HNy9yIr1XNRel3n1Wdr4qE1Plw3p4\nka+e+eVbtVwzlwWEMK2ubsnDgwlRuXEge8AULmRshjqQi1oJuIeEb/D02ZRp\nbLYvNzKIywNGhF8kSk5ka10GxavNvsq7HQ+ea7AKHZH9f2Jb6Vr+zAuI6+b7\nzBiTgEnpKceb+pwgAf9i5cxNJ0dmFcWf0ynANKbhHglp+HBboNNiPgrdwaQ0\nDkcZDl9WAAqlqwq73iwaSCduT9UDYPmKE7CKsWOPWgzLVuBba4SIMKH/6rVN\nt8g50oUQlWcme2RwJ/nnLnHYEhHB5ca8W6Aw8mA4KEcyXjA0ogwdqGQ9D+Zo\nVY8435SjWmBpGuYf7RerDjyzh6QHD9CfV/hNW5yoVCMlADY2iAA0TwJErzpb\n8Mm9\r\n=Jf1H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fbf724f2a1efac7a33e66713fbec1c9a6af0a7e6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.0","@storybook/router":"5.2.0-beta.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.0","@storybook/core-events":"5.2.0-beta.0","@storybook/client-logger":"5.2.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.0_1563195407766_0.7468736386178823","host":"s3://npm-registry-packages"}},"5.2.0-beta.1":{"name":"@storybook/ui","version":"5.2.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d3fdd7f339dc55fce07a52803f550722f896213c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.1.tgz","fileCount":140,"integrity":"sha512-t+5HQ91Rh3n5m2vmvZ4R09s+8Dt7R8f7AH6+k78VIPKYFL+C80aQBe1l5+1PujobhK3PvQ7cQVytDwhOTDR04g==","signatures":[{"sig":"MEUCIBmbyRkP2yqGv3FLZhWhFs5t47T+YPantSFavMJ00DVuAiEAo0KOaclxHdeHtVsdqYMGURcpISumC+VL/2zhYPRHhH0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL9ZICRA9TVsSAnZWagAA8mQP/igFHx7qYC+ZurLWAvhU\nUq7yEoqU43O1AeAuXG/15p3hu9fHAyU5s4NL6B12Y2spQdVT4ZGGR8kp9TZU\nyy+mJAFH6jO1+jMmOE1hl2xgt+EInTIwDN3C7x7qkOC2h34RFdMs5144fZiD\nnYF1lz1HzuVkJJw2BPDvp2Mn8WqH8wVys5epH63b1PY5MpbKTFpdAG9suCGE\n+hkC5l/veqZ8HdO7v644gPdDENKQ6uCY1lp4pO2EKZoyuVeM9X7grHE9v6Wh\nhFo6RRaT7mMpaVi3kELZLMJmohPv6uR5TTOOiTcW/3rl+kjDqdfLQTexgTgk\nwjMQQcrEI0YF5uCNgc3vJBdzjORP+1A9PvbAq0RRHAzHOCxxhrB2qkk4ItFV\nvQnRqMXU87DQSCY7ge/Dofyt0M9ltRDKRQEejG1+AqR9drj4TwUQcSFEhP39\nfo5o2SJP+KQdz7zSjSoh6Vdp449bukGHL16i1FiO92xX6/u7R+rE0RyBYM2P\nFJ+mTp50T8hF/jhjcdNyMahy3cnWPy7eztTcZqp5SM8nUPV+K8rDheuBXy/c\nQXea/jA9LBYED8hqOXcwRzX71C++6M/1KpRNV7Jwjw74BI7CctT1Lx/WH1xh\n/y5Y4hXtnSTiPrEL1+vxrZJITKbDNR8DE2q3bZGmUbBqcrnp3uU+SJ9eI0Qk\nwPDu\r\n=R1Ty\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cec7d5c2825c520d4fbd6a31d7f5ceb54d84150e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.1","@storybook/router":"5.2.0-beta.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.1","@storybook/core-events":"5.2.0-beta.1","@storybook/client-logger":"5.2.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.1_1563416135444_0.003738371869917323","host":"s3://npm-registry-packages"}},"5.2.0-beta.2":{"name":"@storybook/ui","version":"5.2.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a4c865af7c155f327e04ebd1377b9e34e96f54e0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.2.tgz","fileCount":140,"integrity":"sha512-H5hjkxqIitkdcq5B+M8BKzs+tehheTC/91QkUf9uVudxpQT3SRvNSaIoqhn9NvhDXkfirnIAdUMVTWSt5yLYUg==","signatures":[{"sig":"MEYCIQC5gLl84afaqMYS1SUtayVEi6JxuVUgahFMlAHVU6yT8wIhANkBMsY2l/hD11cUxK3HzwyqtNNBAMrx6qzkGfD8wgCE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMIG5CRA9TVsSAnZWagAAtBYP/R1zt33M56au3zB8BfM8\nOyFGTo/kMZ9i3X5WMe4d5s4rasqsvr2GcDECmP2fkPhOHGowcEubHVpXcwJh\nSmWXEujOR4QQhG/mNOMYEUvu8l6PGnd1bCJ9Bjzf2VohBJzAMaKhou2WqNko\nt0SwIEnTzW+J8LzBgVCmOn7XzWoYJWoM56MHlnTTpbsLkwJ0IScN0gfpQc3k\n09q3/eNanIQaZsicbg71LvwX7UcFFIulUP2tdx2Jz1+zvUPQVxu5wqvsTVoM\npPEwcKi62XBzTMcdST7U46fx3VcvRMThXproe1Tu++H3j8AuGwyl/1Yd24Wd\np37sb4KwiBjy0rswBSsIldM7QJ2Q482mAiqMJ+w2SkCGd07pmRpzMF3f+O/1\nXr+LcwFoVMnpmr8mHbYldQb3ZwpxXZNVcvsbfQ5JLYd8j8v1re0Cfgv/bOzX\nvTDsRVwptCYQQXvXSPlgfFQjrOMIMyBi1H7mxV4suOXb3OVWcFW3b6KRG3Ye\nmphklQ2L7z+YRW3xxCFT8Qj/904Bqo9aw9Ki/GJKT7pfBg0NsLDnsm422a7E\n47/Ejkcyi8phrQ2NhcE+0I2iou8lEkXWlg5+kzp3iGq6ZWUXaiAzI9uL1naK\nIa623LBVVdKDS7KfJsbaw2YFUnFzsIl9u6RsuJlPVzqXe/bFCWmZuICX9eSl\n6hWI\r\n=b9Mc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d597cdd048644c70c05c9c00bf0a999dc1f5b545","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.2","@storybook/router":"5.2.0-beta.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.2","@storybook/core-events":"5.2.0-beta.2","@storybook/client-logger":"5.2.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.2_1563460024545_0.7169593710962858","host":"s3://npm-registry-packages"}},"5.2.0-beta.3":{"name":"@storybook/ui","version":"5.2.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"debc7bd142c942c9ea1b1748aaac274d787f8988","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.3.tgz","fileCount":140,"integrity":"sha512-sGandmRstTa1QPC4MTKewlyIZy1ahdtRvD1KIK+OoHy/ZJp36iTVkNACgBW4jCkNlwh3dsThaEi37iCL5ejixw==","signatures":[{"sig":"MEUCIAEU5likUvavAs9I0m1s0tUB9B1Op+UN7w0TbDxaI5z+AiEAyxGLvH8G20qZm4oNDx/Up+XuRRDY1ZqluWeY39z3FCU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMbZJCRA9TVsSAnZWagAA1T8P/32he6r3jVUadwGTYSrO\nbgrozSLNvyuLGneKKADw8n3PqHcoIh7ptVpo4LMF2+I85iL7KtYlZiVx34yt\nbJknTAq0RQt8YgfvcqO5tJvpzWStMOuXtp2X54GS9db4R8rZu/ZeyxVf8m2V\n/v2dtYa9noz/GYTTNRa/lgnkEOG/kaDvgvULjnbyg3tcGi5Yl3dKlmJr+Uof\n7s4upJq2SUUU8XqoFZNZ3DFQl+2bnPOueH/zWo0q0VLM8xMU7oKTlMspEtRl\nfrUh+fmvuPeWrNnRFCRRm556SKrD6GMbCKPeQsNCR3ZFmT/tb0qhwlRz7yxf\ns0LTEbOzICENGKB4QrP161+LaEJL/NfUOtjyRAx1s2FG1GL8EnZzb6q4Jg60\n0RA3EdJCudY44hlqRlQxQihXZkXLqRM6NZuNj9otSsNeQnhy/E7krVL0wKMD\ndiaJKg+fIXmI4jtYAVO8jeOo6AK+mO6AepDpeHI+yqW5tLV8F2B6jwq6pR7P\nrtLsh6Q7bIU26pyweyGSrCblhJ7s87Mb4tGXQB8a3r/mbfP/My8ExmVyOQnL\nUw0e2243BHAlft0jeeOypYmlsjyjZIz2ie6i7PGTD/Bwb4EkRIqfTh0tPEfx\nT0BlsoXpavmJbjH5i1Itg8zpbK2XljlO+21wsG6NX5/pQkOvwnbwTAw0YY2m\nkHKK\r\n=xcJq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e788841935adb431c9b9acc2b23ebf6410aadfb7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.3","@storybook/router":"5.2.0-beta.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.3","@storybook/core-events":"5.2.0-beta.3","@storybook/client-logger":"5.2.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.3_1563539016657_0.6925614602304084","host":"s3://npm-registry-packages"}},"5.2.0-beta.4":{"name":"@storybook/ui","version":"5.2.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"eaa37ec55e967b8a05d3cc03ef708c0c9c2ce9bc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.4.tgz","fileCount":140,"integrity":"sha512-NF0cCJshnT+qymbteY+54mXJtZku+3uT3KeHo4SfRPdY8b76KYu9TX2h9g6G+XbtImsZRBcrFIUmDBACvX1zZg==","signatures":[{"sig":"MEQCIH5Q0nSwUhyL2ByKsSgxpUeCQWnFLo1FiVz3LpacZis2AiAg9e+sCHjORAS5wzSxwLGxqdwvdY2NY7pRCm3Lv//Zaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMpzACRA9TVsSAnZWagAAn4wP/RGeoi48i2I7U1WoU08/\nv74m/2Oig/7YQqE/hUq5A6pY4NY1BBZtqmzZHGUOULXLEh/+HFelE93zTYA/\n3TubWLNS0W1s84oJpJfDXnCtHJyJ7omkz9jJjFtMmTRRW7C2W6zan0Bf6P3j\nCJplch9D/v4qNeHkzNtDMJ/2PeMnHNedYsq+BCOai3RLepFgaxTpoVCBqQoo\n90A3d8gvw6zYEnjRXe9IB9Y0bwtrV712gQg79SmokZhvvuBS9hKfBC+d/hrN\nCg0GGWDVJSkHgIeEm5IuR6Yz8FWh5AFDn010hObdMiJfCX7dNIrK9F17rxTI\nIlOIIJy0Q8LU5JudNimaENgCB2E5emEkFxomgN8r6Ys2E4wSGPb+moMzhkwi\nB9HMU59VzbawzklxCn/iuDS/wVgOqXUandKZ4sy7QzBpUABvW4T0+C86BeNK\neW9iqROPTL3dPoJxx7V3kK1QwHxO6K21RcVyR13arKCbTh24QAjm9x2ZSYsF\niL5WOp2INKfyD7/4JIFBfzZzxX/Bm0/qhDHysBJjkcCi88FY4xog3d6f0Tqc\nOyKBwRB3HJcwlnAO6BGxX6Obww8Nh7Gm8139s9rE00pu/9lRsqN3wtudlTlN\nIBG9c9NceL9Fm2LoJLNP7nRGaWHvzeXHzCZv6K1ZWjEXLEbsbJdcI7ii5Kwr\nFlQB\r\n=AjQf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"bd77e15c32f641b4bd40f430d5b928db594c7696","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.4","@storybook/router":"5.2.0-beta.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.4","@storybook/core-events":"5.2.0-beta.4","@storybook/client-logger":"5.2.0-beta.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.4_1563598016320_0.5589107688855519","host":"s3://npm-registry-packages"}},"5.2.0-beta.5":{"name":"@storybook/ui","version":"5.2.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c8f768ac6c159467eef6e1763c03d9cf26f85c4e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.5.tgz","fileCount":140,"integrity":"sha512-MfXJ84vrIUhzKPRCGNL18Rt4qt+IQpAoH/taX9IZYLYBqKJrTaMiMT3BDt0z78o5HpZ4m+SD0VPcfkR4wYH7zA==","signatures":[{"sig":"MEYCIQDjAzx6GGRFFKSnQJz4vUTs4P1AccVmJmNOnA4auUEcMQIhALr5tGKw7Xv29e9Jnldbfm9cyPP7OemHW87ZKGA+5I3l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdM8hSCRA9TVsSAnZWagAAMNAP/jENQ1AWIj2GLl2ThP0h\netx8b1n+ENjx++jcgvIPBV0nRHpTuem9i21aP/6weZ1wWdUU3So2Huzg2l+B\npPcxX6kp5dj8fWybztz0JUiH7JrcIdAotZjAVevIKu8HdohjrJRIjG8xezfo\n1bRHjtDApVE7HnP2svQd/fBe2NbCmPxu61D64y3CjrSYmL/oWhhzZYOhBmSu\nQTZpchXUE11dE6AQovG4cpzs0uxoop4TNUwUGOgeMBugmrlgtykIRCX8sqbQ\nutxSLLHtScJml9md1xp0vTc8/ndioJEJdkD3n3rpvSMUbsoN4vewYqJ+q4K/\ncmKBefgABPwpZnHT/mh2iQw67vFR7+yrPwP0lpBb5taNdT9j6cjqY2mSgn1b\n+Y0zeRFKJXX2BjM4b8jYY/WFhlq/99TY55Ptwobon/5EMrkAe+dbURPza34P\n4yAK7/yl1rm8lhxsjVBBe0dubSxNr4iKS2443qKi5AKqVsb9RyGPGaMef8uq\nyGvuk/2CCajCUGYVJrpR5MmvlbmujkvkkINkznvpnZNCy5eSi20tEeyeZCCl\nbWYA/SFqPEqmldf0SAM453+x1XXjzXwbT3P3ZEBN3b3qZ+/AGFGbcFsJgEQL\nmRFOMv9+535v7XDCqULh7vgQ5z7PO+N5kot4GgVSeg2iaEzsLXZU+r365hhr\nG3fk\r\n=GT05\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ac9176fd4fd9df7d4c9aa3b165e73723bd603553","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.5","@storybook/router":"5.2.0-beta.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.5","@storybook/core-events":"5.2.0-beta.5","@storybook/client-logger":"5.2.0-beta.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.5_1563674706213_0.547146707660777","host":"s3://npm-registry-packages"}},"5.2.0-beta.6":{"name":"@storybook/ui","version":"5.2.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ac2dedc471f245fa935cd7c6356e6f8be45ffe9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.6.tgz","fileCount":140,"integrity":"sha512-i6os7qR1Dw5QTL7NiwzsJB7V0iWUaRa1fANZEvSmG0/ZBnv+0BDFk0owOAJA6KZ6AK+sT6GC5Nh+NWcMes/jyA==","signatures":[{"sig":"MEUCIQC2HUFKhDvttWGv7CIknYAatRwm6IxXAo9J9NtovGak4QIgQ8HshZ/7nDx5ek7j623r9EFC8w939nPSNUHtvWDVo84=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNfwiCRA9TVsSAnZWagAA2f8P/0KvK3ooW4u38PNeVU2r\nkOgyg1eYt8R2Qsi8N1UHHCSPgz+aQSRJPiAhsTkYnfr+1dk8Ws5uAZylmLEo\nu9A6mgNHX4yJzMLA20PgMCHycyTKN2QUcD79annSZKlUr8DiVKXoS3k/xYId\n0h0/rNqtYnizMgvN/XUXNusm72TkGtcpOjkL109qYndJPFlgqfNDjcYWL3aM\nLeCP5xqQKt0rmJR4xo0oxnw6BpEQGhvgTM1uxvQJaT37DY6TVX4Qu6PEQv3E\n0589/XNl+7h4zFuoY7ctm8rPVatcE5p438BeavHIOwX3kDWJzS7ur9Ezecv1\nMmYx7TuraOKwjncJWZDUqcv0CmWt7OZhmDUWefENavocxwfEnNdetKEktU01\nd8tCTOuHtJc2Fci5bSbdGpoHYad4nWamOQGC+SVewjZo0yUZlNGh46OvqnHV\n/jc1xLoz8jmQLEZb59rUWxFaFrlwmigYohWzGru6k7ubUKTY4sYca6fWmx7s\nuZKqvjoxSpIsOHFTeibv1pFi3oYwzkkBI6MUIxXPXYrHj9xLMxYvmIhdHZl/\nw9aKSrf5nDQ4O3qtRYpKjEqojGSPU/+FKp6Ellg8hyybTX+AAcuB4XD1Ni/u\natmIwdpIjjRewIYZcGgF7ryecbeiIiKjYZS3PF/njyGx60Netbaw4Yp8TVZy\nj+wv\r\n=IoQI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6853a5b95ae9145c52ccf9241d7738283b2f7eff","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.6","@storybook/router":"5.2.0-beta.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.6","@storybook/core-events":"5.2.0-beta.6","@storybook/client-logger":"5.2.0-beta.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.6_1563819041533_0.18310835765254185","host":"s3://npm-registry-packages"}},"5.2.0-beta.7":{"name":"@storybook/ui","version":"5.2.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"46f68e8fe169c166ead1957a2942403d7961a1c6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.7.tgz","fileCount":140,"integrity":"sha512-0cCfsbN+bObWrKBqjVieYZQP3KhzLMN0QkI4o5eAKtkyhgAe80CbI0jZH4Tk+5tp7x9/eyEVrAFAQdEyztHi8g==","signatures":[{"sig":"MEYCIQCYxIMyqDWlqbvqcvsi9OK+dZiXewGszgRsCPKcOht2awIhANPwiiLpRLh4sgyDT8qT6geUSirCkfjzi6W4a2qwjTfh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNtr9CRA9TVsSAnZWagAAD0IP/0tH9abHqOIcLGRNKX4H\ne4vIpaWB0CXuGVhol75lFbEINPQzgCBAbaiabROp5RIe+LvqxDsmIQBhMx54\nr3YBeNCSgcweP2iH4HexB7sHPJ6YQkCIfaX4fH+bzGPwGe9yelrmLvkVyEHE\nu+h2durAU/kIKT1SlfQXF6Uko7tfWSHwW8H5BdVVmBIuE3vm53fzqOVvi6n0\nwRRu7aJ3hQOSinQ3ftV8p9WoXSXifE9i4ZSkDYHLgXAyK2N4zzR7Cyvg0QhT\n63CKzyNSWgTQwVXmk/osKMYMusg9CxflbTGdbYLe3O+jDDED3anTUP/eylsP\n+fPuiFoeMG/xnVXOoCpBnynsfxV7I0xobfmRmcjfJ/uy7BS4r3NpLjCIlpD1\njBF6OvKf66fnj11DtZyLZbSUlYMrPlbuHPXgsEQk79s7lcgVVDnKv2EUtRdI\nXgGbU7dwwpbZGNrLYyoxhskadqt2KsXbEZRVL0wyU4WLhYpvLbJ0PUmMNlcj\n0USKhim8+VFkpJMs2G3DsGaB/eL6sos0wSYr46RdsK4d2urXHOIF33qJITBT\nwcxQad9+ew/Zl15Hba9RZGx2UC/0S74yuV/3AY6Yj+dxoZnq2lUoiC+z4CV5\nDNJvF7Vc1rl+wBGUtX8pkP9CAR/OVds+uXQLSAJ5yPAZAsFbxeZsGGJAQR6A\nJza4\r\n=u5ID\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0232df78f63549ed94e4809517d23def69ec419d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.7","@storybook/router":"5.2.0-beta.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.7","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.7","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.7","@storybook/core-events":"5.2.0-beta.7","@storybook/client-logger":"5.2.0-beta.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.7_1563876093394_0.596871741306306","host":"s3://npm-registry-packages"}},"5.2.0-beta.8":{"name":"@storybook/ui","version":"5.2.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b68c92ab218298272152c0d4e530d2627eca6845","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.8.tgz","fileCount":140,"integrity":"sha512-ga2CVrDMWiKYkWsvtBdMn/LbP3cAb6pEfGSWgD37NTVzJM7xZmCsOXs3ePph0SHVGMQUTP69AvasBloLMu+F9A==","signatures":[{"sig":"MEYCIQDflJBATlaUjAyH6rtjnOgUY38+XSv2htzqeK1d8b8gJwIhAP4gA9MPDnTSkKX3+TE4ujENxThUneSXz2inS/dp2zOU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOYQZCRA9TVsSAnZWagAAMMcP/2432AC5hwKxQnqfhm2/\n3SKK0NqJHjEAQ3YbPgvdkc05RSXRTn8J8YC3bfL1VbeNu4x7PJUi3S3iqb1y\nIqwScbbZeW1tfkaxli46728JTKuEa887w/w2IY7zJBvxHCnX7+cxhr4f3jm2\nOhDna2VxE9RIrsOj0TnANAsnMnvZ993i/HcZY6OQlVQhYFvNyTMAz2SdJJw+\nV/pOQzLubjXuMJYeW6XXZhfntO3ol6o+ETMcSD8MpAUEgxFg4NkBVumXXfrk\n5O6aZ5tmEa84p0kWV0JF0WIDAdvxH9Bt2aHvadeXwrma68gB4pXe33zgqc1f\nCpOixki5W954ZmHm/+8GWIv3YJNujGZtAYSoxPO11h8MnhPdfAM8noZ5C1Od\nfKF/K8V5ZquzCCPx1gBkGaY0JuvJM0oHpS4VvFLN2nNz4Xem/iL4uYt5TBO9\ndCsLnLtzofSIh/MEeBkl0XZKB84FH1M3uZ46Gfgd1Mbk5Ecu6TTFOgGfceBH\nu4C1vkiEWAazEOLpUTGilbFnIYl2T57TztOkESrBXX0bKoUdpIyi/unKRgRD\nULcMD0UPEQ3Yk63MpBQCon2hjnbv79cZriB6JsK29YFQX7WGnCfSMRN34udG\nMsmcnyIjB1ah4EiRpfT5CizrclluPqVl1o1DhfGUpueNQtbxgpb5FTm0QZZu\nQEdN\r\n=gcyu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a4dd95bb3727b0ecea0cb575aee5914c94231214","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.8","@storybook/router":"5.2.0-beta.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.8","@storybook/core-events":"5.2.0-beta.8","@storybook/client-logger":"5.2.0-beta.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.8_1564050456371_0.2421323197400167","host":"s3://npm-registry-packages"}},"5.2.0-beta.9":{"name":"@storybook/ui","version":"5.2.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4befb7e51963c0a4f2ca8358112521a47222cd59","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.9.tgz","fileCount":140,"integrity":"sha512-9E4ciOt8Hmso0qQrf2PoKScWxRvTTA0gRPkeEbcXS/3yc1VhA8VLNyG/4DQ0vP7H2EDEJkdgbKXndzTn6e2p/A==","signatures":[{"sig":"MEUCIQDBET7xFdtCtDH7Y7qtsLgAp8VyLDV+KFnjukpdCDWHDwIgGmPNhnIsfpjeCJ8W3NfWIlFdpLLLDQrRrXWJjfVuDx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOeR/CRA9TVsSAnZWagAAc9AP/jY1FASJ5PAm8JEnvI6j\nl+SzYdMf76JDHGCO15zU5c4w9GEFZW199NPBwCOvwLVwBv7yZEX7T8nm4Fso\nhAMnlYqXkp1I1MuSktBejtv0EIMoTzVJKKMEbYyOYf8bmryf+nhBzTB1ypnB\nXb8E1ZFr871Pg3CcI9DaZNKYS8/KdZ7bRmkOYq5yrlkH2VRJzlBhs7g1QOOI\nfkBDK6crkyKDK2r1T/cTYoL2r/ZdbKbV9xvQvilUOAxTgXNlJf1NRIRsJplq\nx2gvMCMdyRvjRrYF7LU1iNq4wpVZ0+/K9R3FD/jOMByBgbh+6/1zANmDAhRu\nG0NWrJOG1nL6X7Ye8749fdLnN37rsYPT2dUjtI88i8HZ0nNrPt+xzko/GIQJ\njtANplUPQO6gQvwbuIUBr1BskWtvp6ZULdHrKwZi6qGex1Iupp7kUBWTDdeu\nW1Fq3gHpQTYBAJRx97rG9bUqbPSX+JUE3l25fji+TNPChE9yEdvXBQ720yIi\nJx0DB9cI31TZSJsxw5qa1Uql1eVqWWltzyhGsMZlMBr9xuhaITAAdGnQrJEd\nbhRs3EHEoSK8Y/pgR3plh2xdJ0YIxoHwPL00kPXiGHfY4Pbdo64pJrlbEEZ/\n0rEjjrjkHk6QFyiS5GQJ0hr73rezwBBaU9hEhVTXv/4YhiceDGPKM4xT9HvW\nSVcL\r\n=9dp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7ddc50f117aaf1b81b0d371df74d27a5822a4a82","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.9","@storybook/router":"5.2.0-beta.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.9","@storybook/core-events":"5.2.0-beta.9","@storybook/client-logger":"5.2.0-beta.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.9_1564075135066_0.9848183715290109","host":"s3://npm-registry-packages"}},"5.2.0-beta.10":{"name":"@storybook/ui","version":"5.2.0-beta.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"116572106d3d273899f44e2dcbe802f50fa68b7c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.10.tgz","fileCount":140,"integrity":"sha512-tOM2qfJWupFZ7HEqLDGE/q/6byFuCwLdPH/lYFTTEy4HKFrs29RI0lKd0SaHnVPC3knUjA/5bCOUrjisO5WCQw==","signatures":[{"sig":"MEUCIE/5/AXJwO8LXvl05s3p1EjQX5eG/dpIrZkbkdNHYSmGAiEA2ZwmfpHXNYw27Wl/bbMsRp2rrzFhzKJtaQq/Ue/Zy3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOum/CRA9TVsSAnZWagAAswkP/2ZfJ6ZR9VlXI9q+yCj6\nY7HjjC3OJ7PinHF2Csqt0ThtZUD70VS3rmElST6RKTzy2wPj+1+PF/c4bgmL\nNwx+f0gu20MD4V5glaI25fNpj2ngOPqBwCyPg+cJqTVQf+NUXiHrWjsK+uAW\ns3hPP92ygFWffGmNG1wZim+w13cWDq08GpSH10IgMSStFaBeaOnbLKDbme+6\nIhsub0gSqd6BuP/+URwUIRlYvTmdmrpXRODMdNewISDfZRShsuvn1Cfd5oY8\n6ZGlv7MIAL82hn7aOnQ/eGR/5YS5q3wyLrUW4aWUVFwxVGtF0XF3t9baI58i\nmlDicskuJK12PQpilPnNW1l+LAoTJViuZRDGP5OXdBnVB6gMxHuszl6morRl\nELAtN9KFIwnxG/1hZhhrjyDlUAKAIfZuIlCVa2To7u197BppodmO10Otz01n\ngYbLr5HL3DG82gmQtsnvybrJMwi/7aeyJ86ozteUdl7pgxIUXh2yTYZ0rzk3\n5CnFRRIkaWFnMZ6VwhKKnIoYrFwRSt3gR39jzmG9wmTooZ4jVB2ym4ygXKW5\nPn/kheAX28CH9BSCKKIwqCqbgWcVgl2h9wbLO0D8LmawhJOJdUibNt/FKtUL\nfNaMEIsIViA745jrDfX3WjYn1zZuEYDCCZxC8vcOCatBQfRdYFoIWAlfzGuB\ne0Gd\r\n=qsqV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c30383e066d1c7fd4337cb2a16a99792c5ada73b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.10","@storybook/router":"5.2.0-beta.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.10","@storybook/core-events":"5.2.0-beta.10","@storybook/client-logger":"5.2.0-beta.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.10_1564142014232_0.3656661999893682","host":"s3://npm-registry-packages"}},"5.2.0-beta.12":{"name":"@storybook/ui","version":"5.2.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c1ad922e2293a3c7f048b535c61c68c5ef0cca6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.12.tgz","fileCount":140,"integrity":"sha512-iIjw297/bJqLm8NirTDeZ/b7ebYazMfekLZJZsaRDaPueOwb2AGS9UyCD2TGjVmnUaFWCnZPWfeN2qUFodYODg==","signatures":[{"sig":"MEYCIQDxkBwrdHWRYuctumKWJXqOM+SkY6k84pTgQ4NvrdyP4wIhAKQrbTFJIK0QWPA/OK7PSJsbwls6Ix9vL9yrhLFACUaJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO67PCRA9TVsSAnZWagAARV0QAI1cG+aU8Rrd8Cn1Kd+x\nzKFqzyN4dJOfPwTtKpfxqBFCPndo8RBKTVyqmf29UXYXovn95A/aUUKxz3xO\nN8M4eaj68AP1drdPV99ziLlptufKCFQVyCnjdS+sFM1goGoJJC7g7DiBs9XV\no4SKbBpNKIj/T81FfVsbYjiK3ppPKM4KxoTuIibSGsLFhht2kfChAgdNwBSx\nVqFusPhp9buKRe6ui1TrUXrC3JMJfl/6DHphFetQ5jfZDYaFbGSH+4Xo4hMh\nusQFHIv5aEcG9T0/3YVFI4PUWzk1/YaLa5VrtA/MHa+H7DaeBZRvUGLU8yxe\nh/YDI8ieZP74mzs4mJfOK0nX1Ul/UmW1T0ImMOdaS9mZReFvaBsXpRGlXeXm\nH3aMNH0IVuU3iZ3i9TeKt4UnxIlaIH6CuJZpDx8HmeO683btPxlZ2XPOMDwJ\n1nxmH5UyXlERBd36LepK1lNCoclJVQmxPSckHclP8quMLHUnTWage2bmws2L\n4nqtGQESHgVmMDk+CZqtJNU9EEAwvkNSsMoYF8cd2ESZA3QPaD2zJnf/cMCT\nFjWAxKK/jnKcHjacW8nwNqHOemBJw5JM+PBUSPv13afO4YhBygixOYnR6W1U\nzJKJOwhurYJ9+XBAdzGs40oPUwJnufj+KuJZkaXi2pJtu2wnbp7b+Q9EBsYG\nTnl9\r\n=ilYG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6f21ef46c276b7419c3214a1aa7170fdbf5aa35c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.12","@storybook/router":"5.2.0-beta.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.12","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.12","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.12","@storybook/core-events":"5.2.0-beta.12","@storybook/client-logger":"5.2.0-beta.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.12_1564192462338_0.5652611916386665","host":"s3://npm-registry-packages"}},"5.2.0-beta.13":{"name":"@storybook/ui","version":"5.2.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e59c6c7e461cb8331a76ab1a0fac23a8996fb719","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.13.tgz","fileCount":140,"integrity":"sha512-tgf4nCgfYSrIIlfDWukEZUqtx2Dr3katVlLj6G40ioiUzusPW019uKzRTD3gTwAZaoDQUI3ntQ7dYfzVCLo2Kw==","signatures":[{"sig":"MEYCIQDVm8IxfItYQ4sNWpJnkap3///9H5XZKLM5kg7Cksg31AIhAN0xwC0dqYLEZAm8EDd4gK4ayUzmDYHUwHlNNO8s4aWQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPA6ECRA9TVsSAnZWagAA2PIP/3RhFhUHzp0arwJq1qzH\nVmCTNhRW5dT8POjhh5KtVHE8MfnCejYOYvd5JA8p8HzKvVSQfEaOptvISOqD\nBrU+HR0KozbPAmS55d/O67A4fQcC7+pxIFttGnWKbk48k2yqrDUZTc4IxFGe\n6BSkTRB8/eyS8YgNZOEiaQvn6FOiTx52kZSdNr8+YbpT2R8sgMq7JMRE/1Ih\nRKSgPPztw68kvfVwhs3J4HlcxzkkLgRWE0HzvCT0SxHCkmy4CCmJKussjCDD\n/TMRelzy579nYlCPWsQNDvA26cxgLtcvVjYe2CgGYnOSlSZ4XUWdHMfVyVhu\nh6DVdjz7vDb3g4l0/U4YZvZpwTo5a3gtNAANW10lMek7Xsw6r5LkLxxnukdH\ntbSqH762mZcM4jTyxXIhYI7ADBnl486xOJSZmmsL7XIYnRjokJL96org9U+9\nIup2MxEymOiyxbVZx5ANGbO8mSF+P/yt9IWSAoFu0HBdrN2HXWo0fodSxN7n\npumJEA69LtyMDLv+z00ePl2XlwMBlUSAtFBdRISa6nn2DCU5eVeMzRky9uOS\neNlMSL/JVwqVCEypMOl08yGToHEzXz7hCsfT9gPtTvr+DlgbNeVkVrLhnMee\nkW+IRitWsYfL1Ee23LZY/H90N/P4xE25XNqDWhTQ7//COv51ahT3ONRRK3Kv\nPxWK\r\n=Yn00\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d590ef6190895ca5370cbfa8eb5e9b5f8f9c6236","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.13","@storybook/router":"5.2.0-beta.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.13","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.13","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.13","@storybook/core-events":"5.2.0-beta.13","@storybook/client-logger":"5.2.0-beta.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.13_1564216963484_0.8451279103003804","host":"s3://npm-registry-packages"}},"5.2.0-beta.14":{"name":"@storybook/ui","version":"5.2.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ed95343809d685a7e63753ff22689006a3fc58f0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.14.tgz","fileCount":140,"integrity":"sha512-+klpnHeBzkVqxtUEASjPk0Att/puAAjebDcwnNupJiVqpaPmx3JRgfAdgY6b8+svsS2AWpvm2rboDQqOXmYlPQ==","signatures":[{"sig":"MEUCIQC7M+ONOnBeR8vAgYXk8dLyVxMraRsO2Wtu9jZj3L1C6AIgG8iQy7GEzgGFfpV/LnypCDIksV1qeyivbSsLYpxp7FU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPneNCRA9TVsSAnZWagAAxpAP/0sSovXfLtpnpO8CSngQ\nIfV8tWQpvKP8i+SXgzUuUAnp3aKY/pv9aJirN5bueweDvGoxo6PurgGc0b7y\nG7sVogC7pg6fI6tO+btlg9si+gQu2R8GQyloqYrFTOQRiayMcDFr5W561He7\n8wJI3cnKReivmaOqBavulWxNX7doMLYAIxVXETg7zDNXCHktK5BJvEc1xtgd\nbuJWMLpesSyBezBdjAXcAPvtrw9/vK8hpfzvDuq3MZi4fHxhNWNxmq2+3KQL\nzpxF7Jpv/b03eyI81BRyovBq+0gtUCWa56j1SnErT6vQYXtJYsyQlsMmNyAX\ng9bGxcV5dfaa+gx/bcQW050HkDcmPAQA9i8Qptapw8T+y0s8G/5r4dotL4Wo\nzm0uJoDLcKmmu1ALp2W+07aci6xCcHtKFcEIJA26j+Tvmb+nsh07yO//lxpv\nB/82x0pPpY9/ROTcj1yAW63yHLMJujhB9/6tE3vTKqWEHThD9TUEbt/YKpLN\nn93ZvB3z85IRF+B6Ma3AhfCJblHa8d3Fn3lLLcDm6XGnL8NsxCNv4/zStpWI\nefZ+Sx3Fw6cmMng5RV2iAWCFxrCO2iCeDEC/hFvdIjyEDSx4FDKYrLbXVk/+\nVfMDrSe4lJABpv3PdcLwyVBXf/es4HGUsPtGJ+2OaDp4dJyXEuliZys9XjCS\nWT4f\r\n=YlAt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"85ac41c10c923e86a5cd677edc1cffa929dd55dd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.14","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.14","@storybook/router":"5.2.0-beta.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.14","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.14","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.14","@storybook/core-events":"5.2.0-beta.14","@storybook/client-logger":"5.2.0-beta.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.14_1564374924680_0.3011446049712123","host":"s3://npm-registry-packages"}},"5.2.0-beta.15":{"name":"@storybook/ui","version":"5.2.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"26d484c1ba3c75f95781a8684166da6b6bcb2d68","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.15.tgz","fileCount":140,"integrity":"sha512-rOfq3obD0v9E9b8I5LJCr9OcDrWOouvSi5PyHpl466Y9fXQhvg4I59JYQwMmStyoOsk790+D2GEYk54xq9+baw==","signatures":[{"sig":"MEQCIDzDbiZM3eP1UBigl8XHLc7qkku8TRfQaMQAoyqzonFMAiB+p3v3uIqgPjEPT2Fd5CPk6yaRqeOuDt/hiGcgsnAWsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPnthCRA9TVsSAnZWagAAKhkP/RMnx0bESpFd3xWs0YU8\ngyxhlPf+Ghyd4xWYgE/LEN3D+oPkadtcJcLrX5jP7CvfAG5//8PNZumFoFfS\nn8IvWksflL/Mrcm/1W7eSrD6KD4IZFmK9XhefLdcSZLJNFCh7KR+vA5nt6pa\nE7ubqfCHX7CLqiSC2ZGZN4jNQxBtzy0Az7/TstgRFba4RaKnYKOSv9SFK3QG\nKMg4tgmzW7ipoC9kxZlitD/p1eVS02R1XweC3JWI9xEl4ceNb0NJDuZFsnxX\nSYmmdh3HuJDbD2M0+DwOE1qwYefjpYUIF8fwN+hCmsEf1fwdx4lejaDjyKAH\nddhB7cGQ88wAU04mW2Pij01Wzo/0n4ez+Z2D4y9+a9yGX7m/PIyoh1JJrMR4\n7HTqPABZRI+34h5H8WMpdbhFnjIg68ohAYkma4lp+y6qi6rh1hF3CKVuLS7M\nAGVMGKJjrkBJKx2jRz6duP8LsQEtn/AN8I7LWfKwxpNKCUWD0VwFcQu4wrAZ\nNFA3HXno2vFNhI9LH+YjW9QgsdzLhkb7Dt3pCqyBgxmxEOrEBsh/2BVVuDYC\n7bgnwO345sPUpojB1rJYdT/XCNMwyt2oH1z0OI6bGNpHRbY7o5DspeqllZmu\nwsnwytsELXfcVG9uKP1PeGAAlbjg9OLfQKbZaMmvImqu8t8AigtAoqnvR8cC\nsVBM\r\n=Ff5t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6bb8f167de41e5bc54d6e8cbee5f10ef9586fd7e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.15","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.15","@storybook/router":"5.2.0-beta.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.15","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.15","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.15","@storybook/core-events":"5.2.0-beta.15","@storybook/client-logger":"5.2.0-beta.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.15_1564375905404_0.7866170043812253","host":"s3://npm-registry-packages"}},"5.2.0-beta.16":{"name":"@storybook/ui","version":"5.2.0-beta.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7fe087bfa9297237da9b61e50cb1feac0d4d1250","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.16.tgz","fileCount":140,"integrity":"sha512-d+GXoISgUirjrbZ3kP4ZzkidcIzhSrVl1Z116KRbolGE+S3i1kZSYp885QcmfcaiUo6qonWtsuDBjA9aao5Tfw==","signatures":[{"sig":"MEYCIQCB6bouosGYmfCTwoEisqlPfJEQpA+NL+dgWFXel5ub5gIhAMLM+4/u28EfMPqzf7CR6Dobyw8HKlqNFBqc7fFmnz++","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPq9cCRA9TVsSAnZWagAAggsP/AiA/7EqanmUjZnwIfKV\nt2R7TgJFp3l+TZ69Voea7bmNX3K3WmAhzHdL3JdNVNk42geFT5vzGRSXaf0W\nUdjXswo4ESBf/jrxPB9hVoUGMw21irydhEe7hEGTg2bpD+jmH/E3z0CtUDKN\nL7jupvtm+nK+iP2X9QoEmRBxCH7aMS62DxBeptRynDla8W6ednaj/Blc5sRT\ntnTuB7QmZ08HKh/+QD48g09gFqCDKILVKOfVFKVdgI+mWzkqmAa1tzyt2U0M\nDUr7Pt3XZufoWyc7p4nMVZcJEHGRi1W2R1KqrsZKZRyFyOMf8TBH6PzVBQjP\nVtzozFqlPWZ29Gr2woStdX6Nv9Ley1XYFr4DUn/h59BnzYmoxxcYk8kc89B7\nbhyCdNKMn8s+xt+JY2UcMVAEBTpLHOMzVGKjDeERCqX4ekKGIZ4e2Yp7ZiVN\nMxLHlQQbHmeugPJ3F0HIxc3gnWxWo/Vx535L4MCnZyvikwOHYeRjXoV7x+Ef\n67rK0SojliQHIpkGFDHF2rowatPYXpqEMbbvVv6kewo3n17NxSkQa5jPBo2Q\nPp3BOaolB2U9wWtOK80PzaWW4XU7QlaQ3/33MNRGeqDCnANVP6MJ4ZIwsTji\noHnOgq4McHuyBtFd9voMnwPhL0WQFUML2AtrSdkfHEN7KGmL0CUgkohuoRBM\nMTJH\r\n=+A3+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2019fbda8679c18a3b0ddf66314c4b9f4acf1a34","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.16","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.16","@storybook/router":"5.2.0-beta.16","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.16","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.16","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.16","@storybook/core-events":"5.2.0-beta.16","@storybook/client-logger":"5.2.0-beta.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.16_1564389211843_0.3099154841879861","host":"s3://npm-registry-packages"}},"5.2.0-beta.17":{"name":"@storybook/ui","version":"5.2.0-beta.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b3e5b1248f642658fe0a704b12245b851707ef28","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.17.tgz","fileCount":140,"integrity":"sha512-PtSaoMctfCyEh/vmeDXGvxBpT7o8aDnYDW9AGPA0Aml5LMO3qc30pUNS5TKhpatAvzgi9Fg7W+CPibcBRM0drQ==","signatures":[{"sig":"MEUCIQDpj61Qf+crMcAYIOnnImxvMPKdzQ9XhgYHdMzIH29AKAIgW+gkYD+YypbFlvI5eYq38TVhXHrT2MXwf+NkKQKj41o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPtPUCRA9TVsSAnZWagAAG/sQAJCEhCIO5B+Yc83tLkbG\nubxic+V0i/6TctHDXg2qQD7OS/KL9GkD7tKgcqwDgZc9sOW5c0OCnNyfqMZp\nI4yGRmA/N6Bmnw4/Vd//DD3njWpOysBplP/09QbMHk8Cv0wM4LTJcDsu2YW+\n9i8KE2m2kophyEPaQkjzEG/2/Tc/CGr4s9+SIk73JRF+cGikTzCWuieY9UNo\nktIQi12oYuXUUMAA9l8iN53t+S/05BXLT71Vn6W8qLo4bg+N4GvlH1sdSQKj\nqIFOzEkzP/VWz7QAVB/7zsntyvHkhWPE9bJJn+KC1sZIqOPptIPAjAqE004J\nDnmFXxd9KFrEzpBV2+ZHD6J+3BwKCAPq0B4U1eD4zPi1p/BG29XiJUNkFiLP\ntW53lXwqTGH87+rqYJrFZ/3FzGCjFeRcIxpPfyjidZA1YU+F20MDgHfywD7z\nvY7sHAwkxK+WljIjdjUSkAH4sGji1cUonoBLlPGkBvn2BRIy6BXiMuGjbjXI\nn1CHU/Z25tOklX5GA/dfevWWpNujrW49e5S2s0dqfB7tVXLfyAoS/Xa9OoCR\nKNN9TGb87wkiufUPGKmNGRjbq/mRKhc4LBiZR4Aq4TMtMGBRXw2PaAwrJKSE\n2pI+qhc93ifSinD7L/da1jM8G34jcETmLCJ+M+ZA/CZsSE9LUgOopZOBPEUc\nsX2/\r\n=lDOF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"65d8502ed719e57df1deb5d8c7e0b87ab4f00b5c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.17","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.17","@storybook/router":"5.2.0-beta.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.17","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.17","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.17","@storybook/core-events":"5.2.0-beta.17","@storybook/client-logger":"5.2.0-beta.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.17_1564398547490_0.6320232652673481","host":"s3://npm-registry-packages"}},"5.2.0-beta.18":{"name":"@storybook/ui","version":"5.2.0-beta.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"01bf393796df65932daffe8a32d9372344a3f17f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.18.tgz","fileCount":140,"integrity":"sha512-yVUPDlY7qD/r1JF3RL6BmqhHVcQLlpY6Ac33sdEynZzrFQ/AZB/CiJHoLrKD/rq5/ivr/+RjsI6iuwJ2dgIjfw==","signatures":[{"sig":"MEQCIDa3nF8tXgEHP98VprhLwb4AP01pWnK1TESD8Qt0eoOCAiAO0Xv3ejhGF4RPVh+VRbb+P/DSe+Av6vShDe/InT9E8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP4UZCRA9TVsSAnZWagAAi8UP/0dxREjDKLpLIQNm1aog\nXiL01FnxCavhuY+JkxSU3/s0IMpdibKsQKD/79MLqnqf10I7VVmjekw0leFO\nrMEi1LHTPghVofWKGHfTbWk42HO9QBgfKtPMiITpXkCs038yqYDtAHf73Ks7\nKLifuyQ0A2d5FS76extyN7Um/VD/l/ba5ukB5ADIjrfCY1ikJWN0NeH+C7X9\nlH0g6ZizQXPVUCgidNRaxwxBAbBDiq5OBWq4YASyaFRp5K4W8suT5LqbeY3b\nvDBqLXGeaAWXZaqrUxm0By/wYI48fETejEostS8QIVX9Pq6HqZswCOS/Kj34\nSRnH8WLnjdwVfl3z2NKczKvH8bwdPgBAz9SfW+dGPr0hL1HSdTiMMnAhHNIt\nxBHdObxoL57WoiaP/M727HJTvtgEnoDayb2eV9Tre3dghNPsDuGq1eJP/kXO\nm50SVCMMNPDiaV8t/mdRU3M8vLFTW0cIxbMnS5/o+NAL7DxapO2LKMxrpuya\nuNlP1IkvC7+g/Sz1lWJ95XeSVEmgoPLAxiA6o/M4qGxmvpI2PZslsCVjS99e\nr3ODJ7H3d+Vh7iDp/PjebLApwkqliQ6RGfa4n9E5ts0N9aHJ4+JDlshS38ow\nHg1LkkR+Hf50iI01v6OV/qYUIqPxthhVl+8uQlOhTcoOC38vGstynI6t4HPZ\nx34d\r\n=EE75\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e8293faf1d7bc834dbc4c011a41c73b737fd3a59","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.18","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.18","@storybook/router":"5.2.0-beta.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.18","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.18","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.18","@storybook/core-events":"5.2.0-beta.18","@storybook/client-logger":"5.2.0-beta.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.18_1564443928658_0.9968985374934247","host":"s3://npm-registry-packages"}},"5.1.10":{"name":"@storybook/ui","version":"5.1.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4262b1b09efa43d125d694452ae879b89071edd1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.10.tgz","fileCount":143,"integrity":"sha512-ezkoVtzoKh93z2wzkqVIqyrIzTkj8tizgAkoPa7mUAbLCxu6LErHITODQoyEiJWI4Epy3yU9GYXFWwT71hdwsA==","signatures":[{"sig":"MEUCIQDiG9sPgSVY+BNFI6VwVOY85wsTqr7RgAkRf/k2MVC7YgIgU2FfYTOuZdGCHP8ckbCyQ3vB18aA6Qqn3QzcI+FnD+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":757490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVhiCRA9TVsSAnZWagAAZ6gQAJDAkp/FFRCjLd1bELmD\nKrxaxcCg03xbrAVhjboT2s5lx75cBqZGXn0XEdS04hN67KhjJQ61FWUcGfX7\n05STK3b4yH1tggaA4m1K1xrSJoLkaNrSYL1SVQCSdlnuk3KmhTxMi7UpUF83\nAIAUe0vWc7UX0vE2vCHBcSircvqEkpKNNN7amy6jjmkgpwG+DBdmNiJKyX0G\nnH7CbeNmgozrG21glkaASeEWr76bbx0zipfISPFvS/JODQA3MVvySOUb8OXL\nBoeYq2HJJBDFCXpNLe2ysR5GZtDCsxtPvR4PMGkmDTBmgVWl/XF16d3VJP0T\nNkYjq6wAIARC+YlnKTNOnYGAFGjLFXtpw1kGhbmDucyl+ktBTVU0QRaGZGoh\ndGLw7tPbH/PXgL7bLUjVioNHhbSOx4A7lqIVUR7B1yoGJiOl7XKjd2q/dUe0\n80nx7RuOCxKS0OVnI3zSqmZ9+HNhD21QKeqsEAfwmQ0DgwX5AhEvRv3vr6/i\nn0ZT76oR2xJt1WKjM4v1cQOyps2mRBQ+FLi0NvcFcI0PlcBSM9r0/UMLFu5H\nYGIcJtrWvxZpoPTTYMYzFD6twlQ8htBaD2EpZ9qGzM+n6BCBOI+Wap+CY/LY\n8qru0J2ZJeIh+3v6vgHSM/DTwJS7MH6UjHLWkUm0Lp2skIOQpRh7h4MW1wc0\ne9T9\r\n=IgrC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"000361f27f8a9c78201ffce1fac080178f0a62a0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.10","@storybook/router":"5.1.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.1.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.1.10","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.10","@storybook/client-logger":"5.1.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.10_1564563553555_0.380916519954448","host":"s3://npm-registry-packages"}},"5.2.0-beta.19":{"name":"@storybook/ui","version":"5.2.0-beta.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"baafc7637b2f4090ca0c7adcd5e20297c871e120","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.19.tgz","fileCount":140,"integrity":"sha512-6cktJnRlL5BANkc4AZRWbIuGPN1xXOqX6AiJQTDo/4ND3kbgXz4UNVL+gQafDQaUy2hVQrmm0Yk9SY0R4+HqUw==","signatures":[{"sig":"MEUCID/1p+b7+fEuLpiXQb3ta0h6eAnoo76Pn92biuITC5XUAiEAwXIlgSdHrQ9pG0KQDFt1MNoiQVdGKu+egrctnUZM2Ss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":546338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQV4hCRA9TVsSAnZWagAAHK4P/RSXOSJ2NGCMPbIOXKeZ\nZUuoqXs/oWkpNm3yawScR9h0KHDKXsaqQnB9JPLz4Iq8DfIjrVZXTY9lwK+Q\nwNSowdRmTrPCY/TvH7rRXrvtkCAbguy0eUM2Mem5npd9HB3BrGp2f7AzGG3F\nuiROP+V0S0R+edoSU87QgbCdGOKadA3K5FBAkjzUAUAvl4m8eH+vkHz2i29I\nXPIF0lEPHE1jLYwjNlgieoCg9e9iaRtSZq13Zvl3lzo9LwjGeEhb8ydMkmvc\nFnI7mqW3sXggdlN59Jpce1VpMb172/6ET2TWK7MdyJfF8BmJnCKnjbFDImH8\nrGwXPiI4VLAneN8uesNxUzjnjtDpgF57h370DHv+OdmDv3Y4ul3BSqE6PS1H\n3vpmrnBNVPSHOo8rB5gX+i2SXr9rdjuobrjfE0lvKyWYQOidjG21PhWCxFof\nDQBfXwoTUP2PUSLHxeySSQ3mc+Q7oujgLIZBPMXkknmWRiB8HFL//ufNogve\n+Ksj5LVtdesBWc1hq4lVmyzpNZh3G+EjU+4M7Vl2R9VQ7N/P3EjKCG1uxjGq\nZKYM5EBeSM0kMoaZNB49JWzuKrZcZtkWgfEUU0hhVAx8OGSzRL5Q1mHQMCXm\n2NVoFvGr6/LV02oZjVhqwhKqEOTsVPmHdDQSjaQneoJb+o8tsD1eE5dhydvs\nCltC\r\n=8uTf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b3108225d71d9e087370df0b16fb798ff69ee0ff","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.19","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.19","@storybook/router":"5.2.0-beta.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.19","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.19","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.19","@storybook/core-events":"5.2.0-beta.19","@storybook/client-logger":"5.2.0-beta.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.19_1564565025180_0.5149227629721012","host":"s3://npm-registry-packages"}},"5.2.0-beta.20":{"name":"@storybook/ui","version":"5.2.0-beta.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c632e8147cbdb3813e5c6d4f1ceaf25292c64256","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.20.tgz","fileCount":154,"integrity":"sha512-CIQjNhkTl48IfNh0/m7yXuYdC7josA+k/RYwM/ke2a/dvkSPWF89oUfOvKi2MpO0XlNAQKzK0g0c1QjBrrRasQ==","signatures":[{"sig":"MEUCIQCD0FwL3rdVQxd2EbzV6t4Pcca3CNJZ66zbMw4nT3lWfAIgHvwOT/7MKVBoi2JuAmBLQsN3gx5waVdrV/1NBabpltU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQwmhCRA9TVsSAnZWagAADvgQAIIUou+fmqTkB91ZMW0B\n65lo9RSRVURv9YFZpm/HL+6XB5FNzvBA3npfl4tRtb0zdcAtvEA2N93SHDBr\nLsQV9a341gS5MxauudhkpYmg8akQR9rlN/iDLAObHiFYwCx7uxi6med5n15A\nZHUXpR6TbUbP9XP1tqkZIU8d+1iNkyujx+oZPokvm35AP+2R7m9QZHXaf44j\nD1tt0tKXd6OzGw2Cv7JoaNKYJhoZc56g0WtqsoIMRSdp90yUqyBsYS9X9dff\n/jVCjNGlzPCWLRYsfDehlGybfwn1jdDZ/b1ukwR6VhLfQUIN8iWIjcnRWRbJ\n/EsMOol8WQ/H+5LX+1FSgmYVQp+0EuLXwWvgY2CxS+EoIALHiIXpMDXy2tSd\nm++sDk9sHtQtBXPXRS8eL1Tl/yMbIf3RzX1pZc5IG0LVXCvNohx2YwBhAc31\nGxHRRGZ+YFu20PE5kBVT2VS00QEhYCJkPk7gHC9gokdzgsrO9uyh8uuwef2Z\nu3+OGSrK3NREvpxLsm1OF4rfAohLHj3GjH2DVp+pADwZjBVXKwW8Ul9i7Yhq\nux9YOVzI8sdqE5AmlOnB+4/TBRlJTuEaNbzPIc5bUeXy36pTlyfS+wkQiVt0\nnOy5nr4BG81BZzBDPdZR3PkWlEpBS5MGi6S9SOQkk6us4IwIt0hCa50BnimP\naBAz\r\n=unpR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"49f313b884577bf619949579eafa39899670861f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.20","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.20","@storybook/router":"5.2.0-beta.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.20","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.20","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.20","@storybook/addon-knobs":"5.2.0-beta.20","@storybook/core-events":"5.2.0-beta.20","@storybook/addon-actions":"5.2.0-beta.20","@storybook/client-logger":"5.2.0-beta.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.20_1564674465179_0.21068799118148496","host":"s3://npm-registry-packages"}},"5.2.0-beta.21":{"name":"@storybook/ui","version":"5.2.0-beta.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c357542e36dd45aa04149042c5b7bf2953565d38","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.21.tgz","fileCount":154,"integrity":"sha512-2SPqut193lt9bgd8D28DJsBCUZmeDLUaZi/yK6MMujt/nFZUlSmggUivSVxwaCOUYCLewO3gI7iZyzsSiPeZpg==","signatures":[{"sig":"MEQCIBhxD50U9Xw6WotrRYjP6nLLzU+pIMBagVC5pN7wlRt2AiAwUHoCTPboH+iVIFatZZnPwSmdEUEghXBpowklMUDD0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRGW2CRA9TVsSAnZWagAALX4P/1Z2hssSGWBP/R85lV2z\nj5Bxh1LT50QsT6JAT55UUgazTyvuMZKevOrwObUpl+bfe1TKewjq/O/m7eQw\nna7WQEhA0xu4Lr++7XYEcoGnsgmafIo/Y45IJHbIRcGvXeKI7w/gfZKCZYH1\n1lVnVIWCk+MLR34BhMHc5EUyDJf8p8uMVz/fv2FAqLgtro9HUtpC/L4YPrUg\n6PiPXWkmziruueYVePKPttOzmr9nxywUo3QNRGJdiqbsTM8dT+qPBqf3l2ip\nb+O/122S6D48ovVHOBeOes5HKFnYhdMbGtgQ1NLENP9ClYQv9DG3KtoT1xL6\niE0ejFAdUawRIjU+RlVxUnSPST9xf73UW0aWpcCtQxuw8WwiHClN5Kn4PgPK\nQV9yQJgL3RDcbc0hGvNminaIW0Tnf8OB7xb9MInWtBOb2j49IbBzjVl8NIMa\nUIpwW90GuIFS5JVxWsMkfQcfYL2zIRAkINLnjdgYrOf/eMiGC1OQDgyMD5aM\nnsAfB8wvZIZrEn+6O17ykxab44w/fH8XQIb1O/8/HexPK8nnAsNdSH+cyDyj\nqprRDDcWMpjI6Zip+RTTbH/MiikpuXDR2YVeQg6jvq2U97u/0A6EjP1y2GPD\ndX+GkAAo0HkRKvpdhwy9JlnoNGZgd1cPVfdNJ+VDJ4VwjR3UpD+2ThyF8tpm\nP9Gr\r\n=TVEx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ae8baa22ef8bf019d2cee07a5ef51bb6aa711359","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.21","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.21","@storybook/router":"5.2.0-beta.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.21","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.21","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.21","@storybook/addon-knobs":"5.2.0-beta.21","@storybook/core-events":"5.2.0-beta.21","@storybook/addon-actions":"5.2.0-beta.21","@storybook/client-logger":"5.2.0-beta.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.21_1564763573752_0.16561120930838835","host":"s3://npm-registry-packages"}},"5.2.0-beta.22":{"name":"@storybook/ui","version":"5.2.0-beta.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"03d37301f2bb4eaf16a9f7c72bedb8b8add672cc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.22.tgz","fileCount":154,"integrity":"sha512-UIiSte5vClSfKJn/8pv0689pSPJ/C1N2OJ/5zPoEPJVm0c8uFBDuQ8x2Hfxh9u1dlG7bmkFr/33PuIR+s4kqYA==","signatures":[{"sig":"MEUCIFYXVxK0SCuJi5uN9b+tLJvHvf1Y0blwb1UvHLj4YvcnAiEAhMEHHXVzfPGLweg8Xa6PnxkL1kcnMg0zRk+v6C5NtRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRQmyCRA9TVsSAnZWagAAljEP/jMDjjK4Bdm6P/Wu4jzB\ntBxn4EfCxZI9aGDZUZAhxZPaWck7zYA7cttWCaMzXlQUawMROwlg6nK5L1aq\nxwTNmGFlpze0knnda+ZidpkbUH0RPJwOgND6euz41Mrv3ltIvicV1E45qXZJ\nFAG5GF6cJOCissrYp8IlwBq1antjVJuXFd82iqiTDUxFgVCb4OvgIKIpnPR5\n+XjRPVFjlJ9fw55PcNUYpJfezpY/6YnzvzdQRqBMUJukKfIW/7NrLK5MN5im\n4laIiQHD09acV2+gx3yEKCgbd70Pblcxsl7aIBIvUPmI6fk/JP9qcy5MbN1k\nLI25tc3E52eXeD5PbxSdULEOf9byZtTjVu9qdE1eEPe/8MEH/oybKgvooZV7\n2SM7oLR1AjkT2rfrVpYfBTdsWX3T5yWG/vx0Sbya8KRgKUcTZLUvS8SkTb81\nUWbcft7TqdX11UH/j3p4x693higxO9svFgzYubQJp+hNow27bYBjKFHbXe5I\nb/W9QBVnoM0D0KWWm32WG+yVDS8ohSxB2WFSpOsq1OtNPHY8FjHCS8XBrUsG\nPYhXVzRZA3Xyd1VJug75CtZ7mElYTwZBcZZXoTaPe5+1xjtm4LA/UnC0QIig\nwcEk3bAX0b72CGCIBud6ObdWR5+aZOUnFzNVcLVgcY/gitPhr6ZgDtuTVAme\n2jXP\r\n=2tbt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1449efdab4975330e31fdfbdf618d45c96a8d357","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.22","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.22","@storybook/router":"5.2.0-beta.22","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.22","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.22","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.22","@storybook/addon-knobs":"5.2.0-beta.22","@storybook/core-events":"5.2.0-beta.22","@storybook/addon-actions":"5.2.0-beta.22","@storybook/client-logger":"5.2.0-beta.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.22_1564805553643_0.3114649239597047","host":"s3://npm-registry-packages"}},"5.2.0-beta.23":{"name":"@storybook/ui","version":"5.2.0-beta.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ced7c24b55796ab72cb7a2e894d1cf3dad2ad3b6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.23.tgz","fileCount":154,"integrity":"sha512-FSZZxdtXJyXkm8FfI4bARhpVOqOBM1SI/TXHx8jO3ajcXfNyvst4ZZh2h8vm0UOzy25vwVZMpK148xMZhXyPeg==","signatures":[{"sig":"MEYCIQD/lltxpzZZaFj1Ps5Y3KpnqXuOksSZRvnrvz9Cn/pfbgIhAMdJFZTqJgjwLtPDDdII2AJOmoDglukWJlm92dkW7DyR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSFxjCRA9TVsSAnZWagAAdMIP/3as0VKmXKtVrgAi/xBH\nY8O5RLcN8yRAndbdZ0XRdidzbJimssDtYHA4gtgme9j9H57Ks+gqsIYhDehV\n2ElBVKPvylYMnF24mV4ROlHIxQVi1C6M87+DvsDiYDdbSZ03KSPDbfRDGgo2\nlN1F5c2LGnCxLakjY7WFaJWYf/P1f7By9f5LXGAdEu0HtJ9e2RAbWVd4pANH\nc59IOOyXUxMhnRXKXg+xMdewL6w96e3zgPXIT/RRStpc8IFbSY3Ap4sRHCqy\nzrwmODT5wdCYsqEt3m9A4AuUAWAHaBJT2CrJHLfPTLhBo29TAIfVpuK6KqdP\npsnyKFNdZ6R3qYSpMG2l23lnViTafu78qM5tTA/TWEx6JOsL1uoU7iabZF4n\nGO36onLFZblqaE2AcBU+gzK7MASkIxXK0IKzzrT0qjXBtOXoMj3siYGImjqN\nCfO+gZ5ORxWjltCC9YSk/UM40mZWpntK6Vao3mFbSIIYviVsAyPIA6uFsYHZ\nttaUw8TbBCSInBvD8jflWgjVmR1JFE0c17RI3ULTucGuhMXYixqFOvjPNav9\ngNIzXwqXL2qCsrA+/cT3Mp8IB7uc+EWg5Yq9VSR6aMtnl5OL2zsh2BZKVQOC\n+uSDdlWRAXGo2lSS7XucuNL87IDlYTlS/V2kDkSs/f3+TvwjdbbPetXnjLBl\njegF\r\n=tTdy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c54cd126010ddc918222de12a34d45eddba9dbf2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.23","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.23","@storybook/router":"5.2.0-beta.23","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.23","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.23","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.23","@storybook/addon-knobs":"5.2.0-beta.23","@storybook/core-events":"5.2.0-beta.23","@storybook/addon-actions":"5.2.0-beta.23","@storybook/client-logger":"5.2.0-beta.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.23_1565023330574_0.13760854588564642","host":"s3://npm-registry-packages"}},"5.2.0-beta.24":{"name":"@storybook/ui","version":"5.2.0-beta.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d5540a9500ec9f6893f4caeea7cedac9e91fc540","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.24.tgz","fileCount":154,"integrity":"sha512-coEF0b54v42BXynzWikEPl8SCAfUCKXCfSVcyrswwaU+cW9eOpZ3bgF5GDu6D88DN9eOcalL1gn1lYTk0bJ1Wg==","signatures":[{"sig":"MEUCIQDRGwAUxf+OAIXL+UZWh6gFxwtxBRcwFW+W8ix+rNr8SgIgALlQTWLbj9w7UeSdn7Gi/DUm11vpHNkJ+Pn2W5qK2bQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSkPRCRA9TVsSAnZWagAA8bEQAJSycZMs8KMcC/sPmy66\naCAynALs+w9en2gKxIDAXMY6rRMumQQpngCO19muvN0CEekPPOfpZzE/FWMU\nV9TwU07+Kd31X+Kw+tVU6EWgGa23QFJqNFwVRf8Vb89+Gr3JlopvgjneoZhM\nAy83ZX6DC4yv/9B73EIFmK9XWSqBmgAHb/IwaLNCcqoMMclotb1LOP9Fq909\nDvV5mvZWG2orIDYqClkjhetjPm8zSguazOXbNA7IoPU13YcZBXhK3KNpWkXu\n5WHxxBEv3MI5LU/Kh67lB9vHi9eYiBEtumgjtrcbC3exiity56uFC6GCvbYe\nf7T/l4OEu1RotC/RdxGdseerCsYS1FtahcWsNyFlYgKd/wbNFIXwRWUnQuMK\nCYx3bjrUg2hEqrJt4U/Lh1T9vnIm/p6gVX5WHjj70Or6XFtzTWi8Jw/7Giiq\ntRrXbUnLWjFDqvTpvdlXOigqe6+KeQCg9EQC5qp5mrBjL19C7+qmg9om1Ch+\nrdmVT50wx+XnWGRGmrYu6kx7SFwfOlSlHAx8CSOh/WR7e+ZiAf+lh08fTyQz\nlaHof3OseSdPW0tw0Eeahu5Cjd6Z8dV7XkHV773bwZqNTGcJlo7wp9YYMTuG\nhUATpwjLZcE+BA300oOR25RpFIJcFMNqUESqQz5cwy3zgGwNkfjnJvY2AMpB\n3Oi3\r\n=O8CR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5dd5fc022782e2f9540d4310e26f0a724c14c811","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.24","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.24","@storybook/router":"5.2.0-beta.24","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.24","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.24","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.24","@storybook/addon-knobs":"5.2.0-beta.24","@storybook/core-events":"5.2.0-beta.24","@storybook/addon-actions":"5.2.0-beta.24","@storybook/client-logger":"5.2.0-beta.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.24_1565148112795_0.8411940103581148","host":"s3://npm-registry-packages"}},"5.2.0-beta.25":{"name":"@storybook/ui","version":"5.2.0-beta.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bce5ab5c19c474a0620dc184e5e53027ee6d6c47","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.25.tgz","fileCount":154,"integrity":"sha512-l1KbVFn6rB1qmFU2g0VaSK5WinzozxQy7VBZhTxCFLaAKf7H3ZstCD8+9bN2LV7IDIG3zAbIDOLN55fMKPxxvA==","signatures":[{"sig":"MEQCICys1D3zF5mmqRg26TzXPjzyq0mLB3KY20ZuSGcU0eghAiAPUIk3S/WvlOKWxNpIbp6gzn5D7s+3u430oPgR5EJPFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS4KUCRA9TVsSAnZWagAAQnsP/iyki3m0dNOromMwzQjl\njKiDnaDVwXzJqzVYpxJAro9GUiwf1HqkUbt/tkxmjBXXvh5FsxaJ2Q2RzDDb\nykEK6GG4LSJUPTzvVBistHUVtnM/JwlJpqjLxxQ1doVEUK3FDMAhZhI07TtX\nH8lgFugmC7V8+nSJNW+ghaB12hlgWk5B+yVpqjalCASb4d4/S7K29OqwBwrF\nsiE/BYxMLWkJtnOtTumv9lTi9KDlsYbGAp/hnzf65ttphBYMTKd1qfOMce9q\nKxWolG7btx5lTuVkpl0iadQ7YG1pQVbdTPeHI94hxgfRxlRnrVEpeJSPqR+D\n9C4cuILwaygghrjKnC+EWvw2IDLVfQ2OrXpvtx68V1ZUy9qla9Byg9+bio8s\nUP1zNnsZZ4U+Fpz/m8+b7q/RUl/17408hZhz8lrKtiEenuVqSGyVsC9OJelK\n56SWzyniRreaF73bBhN/SnKorKLhbfu57L4kDlbzGUJ8nWnWgNDqfNRd7ppf\n5HBH1OYZGvgR1pps/pyZTsqK5bAUt15u/f0a9TBKsHU1v8Xz1xo8UN6wNcav\nrFsQ5vSmuKGqEAV581hlZbbc+4R+ylXprlN06UR0zX63fhvpnshQ1MuOgP0l\nLm8OvcXOxXN+SNnmyBGo/ejjqlh6sXF+3hrsPFT6toH3jT7hsHojFqihgswW\np2ki\r\n=PyVu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"452b6dff54fc3a5ba711dae9484c331b6c4e708a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.25","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.25","@storybook/router":"5.2.0-beta.25","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.25","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.25","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.25","@storybook/addon-knobs":"5.2.0-beta.25","@storybook/core-events":"5.2.0-beta.25","@storybook/addon-actions":"5.2.0-beta.25","@storybook/client-logger":"5.2.0-beta.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.25_1565229716147_0.33299770550037167","host":"s3://npm-registry-packages"}},"5.2.0-beta.26":{"name":"@storybook/ui","version":"5.2.0-beta.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5a24955591831ae4ded63d19347de1cfd5a8128f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.26.tgz","fileCount":154,"integrity":"sha512-oL+oA4X/jXluKUgaoi+3uEolcv5GwkLYvuC9cQNJMzyYFnjtKX4PIdD5CDKWyY11mWTzyXuYLbwD6Dv4ub851g==","signatures":[{"sig":"MEQCIAiRX/ah2DcMahocoFPxzkOJ3tofOqB9HRBdj+oDYS1uAiA2fBjkUWj6gZg4uf4a27/ItITXpbuGUtxblmBlnhS/1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":557506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTN1UCRA9TVsSAnZWagAAWdYQAJpnr8+6cEbeVntq4Aj1\n+gVUABFDuN8IROMkc7TGbw1TTJKK/1IHxzTpKdYgVq6njkgm4lBD3ZYFbmNz\nd3Sr5J8tOKuA6dhakFP8j6uhvdkdAqlo31LdZl9UOSwKzi0xsg2DJ2m/jeAC\nSERce3ZBT8mH6l5Ogf/8Hw+DaqGSEE8Tye5AATZufzd/jxs44EtsZ2MSIsX5\nrFZIMI2lKweZbqi2Cc6LmxCyX5LnHs0RzyMGro1pWW9aF69YdFOja1bKE8VY\n+l/KTYpoCNWuo9UbrrutedE8BymO/NiMaJtMdRyq+vpUKcqFia9iHci3OvbT\n74kDOuBXtRFQkZw4yE1DKLXoYz/1EFiTOe7eUwf3nITwTZhdMyZmBRNlp7ru\ng3atX3BMfS3RyMbL9sv8wncyPyWLfd2QQPFQi2B+w25RDeHQBx8xQj+O5EAD\nosWAhhP+a3OwGH0v+r7O3AlB77dj19ZNdsXRCDPuugmA8ywoV1BBzWXEe8+q\nFUtWZGUA6KQrDXnXoRbk3+azuFeSBwTo7yYPc2B6nOmAf7Y6xXMledIknziC\nDjOqjZlGxvuy5b5zp/0Cbq4CXLq8J0kiUI1ag/hYmACODtF5tU7VoNvROw2G\npij2CpzV+ovvpyJYkBoFPrPNfjwVKhHaVzcpOuL8hs5K33g1F5BwpHhPMv4x\njWwb\r\n=6ddg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"901ff4fa05aa62cc75a0443bb9bbaf58ddc0edb0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.26","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.26","@storybook/router":"5.2.0-beta.26","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.26","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.26","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.26","@storybook/addon-knobs":"5.2.0-beta.26","@storybook/core-events":"5.2.0-beta.26","@storybook/addon-actions":"5.2.0-beta.26","@storybook/client-logger":"5.2.0-beta.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.26_1565318483835_0.11135938640977261","host":"s3://npm-registry-packages"}},"5.2.0-beta.28":{"name":"@storybook/ui","version":"5.2.0-beta.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f9a49e6b46265409f4226f4210daecefc9ed6314","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.28.tgz","fileCount":154,"integrity":"sha512-vgdjtnnMpxSFAPQRzV3iD5zbOgmMkxZ0l+OQYXr9DebaMPlkqI4r7CVZeOvGUx/JP7J2Z7GDx8NCc5eQYUESTw==","signatures":[{"sig":"MEUCIArqKcmC9FrV5thXjb7iL0jjbLpFXPt1jjpWeTSDMc9sAiEA1Kfuy+q41p5I8KGuamph6Hg+9OxIfw2JFKOX3I8LnS8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":561288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTryhCRA9TVsSAnZWagAAmi8P/RbVnDeESVgogDhY4K9I\nCpCTdHCjIMVs1ccUHHYs83k4hGioxpf4YPeEGpeE6Q03wUuBRqz/CS2Z3kUe\nUGOJKQR7Yr0/PwwumkppxEt2i0Bfiu/VBKTOMCGkd4yIo2P7f/J1fuGVl2Fs\nbEkT5L3O59iueNIRqmVSIdhhQ0uS//kIPbqTjMzwJOkyQmbKQMEY03IdVI3f\nmeyvnVWQXw2ijL6moYhp3y3gxsuKhjSN96jlljVCQ8ZIVIe/Qn8rDc20RxSU\nFNlDMZqYpDQDSIdU2hZhFHhkC2dFVvcXVV4YkGZ10DW+Il7if6mndOPOMl0u\n/Ata6vGwWVvuTeihcekKzPCrkUpD3PSr0lKQeOmjawOOqIATRVif57ei9U0y\nVw4ME269EHVcRR5RPJbq9EXhC+Q1d+y4AR6KBMagRQPF8mhk6+7fWUI1hwB3\nC+gXy7abcprrTu6/uHEyl4Bbq+2Kvvox4hnEGVIApz+F8wRUBLl95q1e9adc\ny0JadmcCfFJd9/km056GlXb8oRwBP/vV5yzsOQzu7/oe0ZZYStdY7ZoHFVBc\nZxXhIZR0SfBF7QZkGQdEu7TeMl0rwEPA+cx7MR0oRr0bRAXwZOmjJ10EdNKE\n+B+Z1YsabXy8y9a1mDaJClxhKulwr2mGAPDMwmTNvdbpexEXmz6IZavns5Ee\nABug\r\n=UHYl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"54dfb23ab34f941db6acd385efb0b1e5ab880934","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.28","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.28","@storybook/router":"5.2.0-beta.28","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.28","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.28","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.28","@storybook/addon-knobs":"5.2.0-beta.28","@storybook/core-events":"5.2.0-beta.28","@storybook/addon-actions":"5.2.0-beta.28","@storybook/client-logger":"5.2.0-beta.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.28_1565441184525_0.8434029134534018","host":"s3://npm-registry-packages"}},"5.2.0-beta.29":{"name":"@storybook/ui","version":"5.2.0-beta.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e0d678b4b4589e069a6b077bbb095f09bb163579","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.29.tgz","fileCount":156,"integrity":"sha512-G/qpUnS5gALQuIo45sejNVyCQ7CnairLe7ni1al4oDO7froX0MQhChpDmLOnw9pUCRg4UOLe5/ZrGZvO8/jX2w==","signatures":[{"sig":"MEYCIQDhMqs33XGJpp085+jISFvE90nVBb3vwRXKNaWSZLqsVQIhANi+RSNFfVC/QRTOeTjvOm30vT4QacNdUSKMVu6zbHrz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUhEtCRA9TVsSAnZWagAAXLAP/Am3MWzJtInPVpMIkGJZ\nKf/KcdA4BxLPyIn2JT3IUU8CeBMsCSPcm/ZUExi/m9yhjJ+sHm+hBSAZbb7u\n18qCLRyZKj1jUkguYRlm1MEbARMrtoXIdhiygQYwWaJ0ZIOpIzUBurL/AmzE\nWaxnyhXXS3wjzHZtQ/xUsvXGnsMOi0YuAGbbPoEz02PILLKPGF/6LHJ74Mux\nqLBAx0aSHdiRdkIDagyBnlHEgpY71Du9LeL/jsSGqy16IhyC0onb9xNOggWu\nw8egS8paW1pb7rQrQgBmMf9cXqCRi6r+IkGyvWRcUyrNojMwugoaRm1uWjWG\nBGUKnjHtQR0ukd26tMP474xMGWirGQlFDA8ZNXoFsRLvUII5BDGZtxxXPpb1\nAR+G5aIj0KtBCt0La+laz5xFuHejjwJEp7qEWxvOPQak37m/bBUTO5Ucw9XX\nW+75q2oWtWPLZYXXFNl3bZkt/+cqKTx3eQ6171OsVNRL8JmFmdgH3vgZ6I+3\nvir9Q3E+hxY+d0HUUXak/RQjASpo3i57IVnhwgCIMNzOZH8dL0aWCMoKe59f\nRwxJRSij2J90n/6ncqhX/Ase6EL3B/bUcPQayN/XSTOZKzE0QzJj8IMQHGXs\n6StoM6CIkx2MTrZkErLk6DS7QHkqGHsBl08+OYBinow+7bEqzgdy4LEEZM6B\nGcE7\r\n=ifHn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a7625dec1e6af5c1ad2a51054eff5f6f0a9ab727","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.29","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.29","@storybook/router":"5.2.0-beta.29","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.29","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.29","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.29","@storybook/addon-knobs":"5.2.0-beta.29","@storybook/core-events":"5.2.0-beta.29","@storybook/addon-actions":"5.2.0-beta.29","@storybook/client-logger":"5.2.0-beta.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.29_1565659437387_0.26753301928616247","host":"s3://npm-registry-packages"}},"5.1.11":{"name":"@storybook/ui","version":"5.1.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.1.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"02246f7656f644a36908430de12abbdf4e2a8a72","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.1.11.tgz","fileCount":143,"integrity":"sha512-mopuFSwtodvH4HRdaSBlgYxzYca1qyvzZ0BxOPocXhiFfFR+V9NyNJqKKRA3vinWuuZWpYcnPTu3h8skmjMirg==","signatures":[{"sig":"MEQCIA8YwY3jNpNMaSROf95ukR7m5I+F0XyUlCq9epC/JDkKAiAruAb559NYS3KFpAcUYuLiAay/BoWdGSED8+KJLb+bmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":757490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUhipCRA9TVsSAnZWagAAlJ4P/RTz91tXIwiUH95MQV1r\nnYZ9Kdq9QlJXbuGQs1tuM62KdXnbafMxhDFDO0taj6nG0lPc1hodcmShnzIF\nVlCzcrh+iIQhVImO3qshiL9kwuv3y9aFD2mdgsMBP6u34cZmluE2MhfX+tDi\nXq4/1mxapCPb8A9WqCK96MxmUVoQRFarJooqTcSCwGLgSsNHJ1OIW/fBm4Vh\nB9wyu1NHIpgjgMKHUE108YWSQCbkLjDpSLAMqaL1CWLpIW0DXbkAo917otZV\n+dK7xY3GeKmkKkSr/WnzAtKLPzbdqFYW8UypbHm2VKFgkKPLBApiRjpVYlhm\nbnyjICxVI245WyRH4DOsWZ28fiJBpe1rxS6mpb5iUzheWxozrF+q+UwcF3u1\nLTpXVkssMNtTnz13gK51w3lkLH4sqgI7sD1WyBSsXYUswLO8W83KCO0bpS/y\noLlw9izW03hg3IGCcPAGhTTnSuMZsgIbw80hkh6LsNJDWFFGZRY01D7+8uM9\n1qlRUe++pOlmi8GPmTwysaCEcilLbsargegiMLmqai8nTDvHhqbCT2u4ASBT\nK1wfE25/HhUYtaY4UZISFwDG4R8MiTdxfcvZdzDXRAT8D4u2oDZFJLlsWAaR\nqD0sa7bQPygqEszvo2FsiTv0t1Q5WS5N66ZoAIp/aC7rhYsCmrovNBNYVGh4\no/+K\r\n=dIvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"aeeafda2de3e97cd91e36c3dc7bdb0543d073429","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.1","react-dom":"^16.8.3","recompose":"^0.30.0","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.1.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.10","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.1.11","@storybook/router":"5.1.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.1.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.1.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.1.11","react-resize-detector":"^4.0.5","@storybook/core-events":"5.1.11","@storybook/client-logger":"5.1.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.1.11_1565661353000_0.7273538482081126","host":"s3://npm-registry-packages"}},"5.2.0-beta.30":{"name":"@storybook/ui","version":"5.2.0-beta.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5c0ef27c877d34e85a9e64567b19190635c74ba3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.30.tgz","fileCount":156,"integrity":"sha512-Ee7z4r3iozW2ej+9e8lMqp6lFoGXiRRcDjwfUl1aJcK1WAZnkNRGr0OKrWjY8oj9Pc7yfYCMhWT4CHwLG1tqug==","signatures":[{"sig":"MEUCIH2WyEHkUgVcXDSEhxCHDWkUrkBPVd94REoVxULuF0JLAiEAzwaHmuUXdzT1fvllXpyxjbgcFwxN5VQijlZCYXRniNU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU8ChCRA9TVsSAnZWagAAgpgQAIA0lBGs1n0JwguwBd5a\nuTPZ+a9tvsKuW13ODe3PoddzM2xFDeN7TMda3dAztQaAye0Y7j7WZOUZnpV8\nGYF8/lrBOWGIdD1T1NEe6mQ5+Bln06ggGQF0vYD4flqSBJ2GOtk9tRf1woWF\n4yGjiJJpWWA/eC6HBk3V2KzADaTSIu1mxeMdYz9l/1X/K/HHslcdQ1IDb8gz\nm9wwXNDgcjT7xnIDANG29tvvbruQA0BwLsJJ3wGLyyXLEboJbGSBocd7Mxp/\nLyoBGP/+7yiJqi28P6WqmG0u/o6THmVRG84dSvD8E86/sA+b7c5HNjoJmflj\nPRjf8+sG8R2Nus+pTaHSNzDLVjxYIJ+1R7cv2rx/t3mUDo2K3yicgb4EUzxj\n7+fisil9q9NOpow6uojuHFbzhYcXlTrAa64EQa1p251Und94x4d4HIHUcshg\n7xzgmDeW9aUF0lM9Y4vNsTJiCKI6y0xgwc9NrPgUaIbrM7g5OBmq+4Zk15Tp\nY0f18WdPqrjwIIArqEWauvqc2KYvF0+qoSy5bDQ0t+L9mf4WSj5p/MN6tTbq\nZOHJkc0q321pX03XU4WxL3M/NCsfX+Ppyb925ogqzdxI+5l1zsAlZijHoWyc\ncu3mQOYTDhrG7AQhK/CTvo3awFI+Fvo5du/QrEcm23PQl/kUAN8DRft7CN80\nIsMI\r\n=ZxgB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f3c9692a6aeed8aa9580433c0d28a8b3914b3ae1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.30","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.30","@storybook/router":"5.2.0-beta.30","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.30","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.30","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.30","@storybook/addon-knobs":"5.2.0-beta.30","@storybook/core-events":"5.2.0-beta.30","@storybook/addon-actions":"5.2.0-beta.30","@storybook/client-logger":"5.2.0-beta.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.30_1565769888806_0.9874315913913203","host":"s3://npm-registry-packages"}},"5.2.0-beta.31":{"name":"@storybook/ui","version":"5.2.0-beta.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d4736db97560a2626a4f9ff6c48994d333127f39","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.31.tgz","fileCount":156,"integrity":"sha512-n06rDLYYFq/J+71oWWnGpgL4pYCuVj49we/fAbOu4Vo5WGYlVrKo1Bd7psqCRPlvVx2xk1bBJozR8ang5o236Q==","signatures":[{"sig":"MEUCIQCgnNF2yciHTGnrIxkuYpoB004ciCWRwn4IUgVnN3SwJgIgIv85TTxTwiyfmt9ynaPV700DKQOx+3bQNnQWuDXX+N4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVoMxCRA9TVsSAnZWagAAsmkP/jyXuiLeVszpd0Vc2rxR\nlsaZN7W+ks1pVDNyLVG/xQIwLPQxwdxDXmbwe2jy8J3Yjupu60lZ1DpGsTpC\nS7oaCC/Acm99NJy3XCTWLHwebTrAlPaRsHmaP3d8sX5qsMUNsRx7eH4woOeZ\n0I10o+TX4qecGsiu2TEaYA/yvTiaaiRasC77ynCC3GKNIo439FC/PYfHxKGL\nlf50ZFrjANbIXLak91ReivVuSTgpEn5lH7SxbaHeGYRwtgaNZzsyx93dfYt2\nrQyIRAq75AT+jxA4DXV6405KfQbe9vVAsQYxszYwskKKmtv7/4Lu40Pqm29G\nZ7T+d/sWumoh9kuMKVHPCEC3v2p5dab/lbCqPP+nKfKhCNbjNY7Oie90h8f0\n2jKKAVlLxHNxUQcdAheqQX5Z7A5ZxSgdvp5q/5KVgwLD1ob4bW1ZuHLz7Kr/\nk4AsCgC6yzuzQL9eLtGosOr3gx684r7qNlwPszpUy/ITkAA7rCVx25rPFnWr\nB5/4IDcrLh09t3hLZQEX30q2aCImMIfCnAAC7819n63hZflmV8VWubEoojTs\nx4BGbBAT5Um48/IoUaS8NeQzGBZnngHQYGe/JtD0DlsM5eMlmBs6GDpyVYpl\ntnX7Yqt2UtI+ZhCUu02PWtpuRvxXQhcT6mmMvYSO/IsV3bA0nStnUBOOSOtZ\nKXYc\r\n=tcvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"eaef302c73969f5dc804ff8340349fc29780d7eb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.31","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.31","@storybook/router":"5.2.0-beta.31","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.31","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.31","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.31","@storybook/addon-knobs":"5.2.0-beta.31","@storybook/core-events":"5.2.0-beta.31","@storybook/addon-actions":"5.2.0-beta.31","@storybook/client-logger":"5.2.0-beta.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.31_1565950768369_0.8277290845979877","host":"s3://npm-registry-packages"}},"5.2.0-beta.32":{"name":"@storybook/ui","version":"5.2.0-beta.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a8861dfa0604ee1710e1763e82cfe93b54843811","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.32.tgz","fileCount":156,"integrity":"sha512-7to5Khk79R85f7nAQKCgPMF0C5lUkhRRLW0lxoppdJvBhjNEiYl39P6+ygMJQs1/KSD9lbwZr4TqCxFJQH/M9A==","signatures":[{"sig":"MEUCIAlNKpC6Dgv2BwIp2z4k0TdnrWKJIW/kXE3y0+5yToD4AiEAqAcfF8FFcFzwvdZPejRRYfxcLDYpRFNsoxl/bnQuYMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWAVeCRA9TVsSAnZWagAAxxoP/2NMLH0COlKG5a2bnFwA\n7NsiklzNA1HEHaHNdYgGUpf2WDLz/fVdwyCWxs6mslu2Fswyq3tf+MokYSuX\nc+eMQI2IjZNdAlVCgRysYdMUl+YbV+YROrZIF/VhDmw9bPLbTsV7nsquxDmJ\nzi2eKFsQLwC4boqEADN3K8Nh0kTBkQL4Me7WzfQ/nEdJDvHg5mgyy4VOPKZR\nIbm98RKDe6jAYVURl0mZ7ejTqYGWJ8OCpA99/ZMv/W3tKYfvz6gf05IGSqas\nx/VF1x38wsDlYXmgRiUVbT7xqljegohZsn3Vnrbg4p46nOB5FavIm9iJLcFF\npqVIL2DlGnk/kp4Byv+kiNpDuzZZSH5wObMHZ6piIvdzfYPRXNdrq/iu4w7+\n1EpoFUFDS+S2UBGhzqMYt2zZ5PTYKU4RnKNBiiupS7jM5cimLDaxw9Gta3so\n15tRo3BDIVO5j8Xvd1ZfVe48HNo1JkzapbT077rznZPK5FPhEq8qJXxu/F/R\n/A4jXTxkS92kqjkKxDAgjpLCZfsx6GSX2LdQs3CStv1PJUeQTZvympqjq783\n+JOxj+MLOw0wQQgKunqaS9FWlRW/O2B/l3jc7bmUfHYNa612IK3dnRRJv83T\nrXATqAVmk+Z95PSRiewbl4de525Rc1pVuxAd1mfv6lJOCC6LPBVDzAKOlRMr\nsSrT\r\n=F9Y2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1c67f9dae7094cf7ee0aad007c48e20cdcb42e3c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.32","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.32","@storybook/router":"5.2.0-beta.32","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.32","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.32","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.32","@storybook/addon-knobs":"5.2.0-beta.32","@storybook/core-events":"5.2.0-beta.32","@storybook/addon-actions":"5.2.0-beta.32","@storybook/client-logger":"5.2.0-beta.32"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.32_1566049630253_0.4738648309518083","host":"s3://npm-registry-packages"}},"5.2.0-beta.33":{"name":"@storybook/ui","version":"5.2.0-beta.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fc3c3630aef96cc7f02940de55ec5d2456eb4750","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.33.tgz","fileCount":156,"integrity":"sha512-bL/j8ljLBR3tCMZNmEAAo2RZuOnIvygm6M87ohlhRPy0qPf86ocYwYsI5m9aT48iCR2ypiUsKjY0Bi4Nc0sesA==","signatures":[{"sig":"MEYCIQC6S0aOleVLp791f+oYMFdQShmDwz3nJDo7saNHmY/U1AIhAKXtbvO3mCoFd+Ia2+7HhUUuyXDUYXWlKlBivDqhCPzf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWVckCRA9TVsSAnZWagAAoIQP/jL5/iVD8viRGEQXG30g\n4WVyB8JevrN6ZGD3p+qQugDNrsuc0GEGloSMzLZ+ly2hUxFcRhK0Zdwei33j\nISTNgRE6MdHnXj3JAn2ALfqD8/Y5ALb+KJABGUXqdYs1hT2RI/dqkzv/63An\nXagzr/ldQU+9P0ZRCAOsrSy9zEbtJwwp2Ww1NNpjTOWjUhbRACrdXVVL1LGV\n0Lo3RMUACtyUAsyqFlAEPLDaaCXSOqiy3se28mqogSV8hMCrm6HGRPKP/6GF\nndtT3s8qO0rUuMCY/S6nl29odz3jXscS4kbtl5rgjZi6+7a+tLDrOYTioaVP\nIXfKQ9ZQhS73rgOCcmkDFJATYzPugFJaIisrZaXtrBIAPwH6foVZTnIxe0bn\ngc42YaS6zrtmIgHN14FWojhdzo8RXLz1uL9dr0BTBfB93VGaKT3fCaY0WOCD\nmt+iRf9ikr66C8B40IiAk7EE+WwqJDffGk4RRZVHFSqRItUv5KWttG5Ys1Qz\n5ulU6XeHo9BDtXE4SELzWH8pMAQKuj9XvI2Ml/fuYbAD4/QP+sBwUA8+hZAY\nvXooP5m5U4shbJ9iocvCgZfXezH2bD0/q2om8bL9lk5lGsU/ekH7Cbrf8Rr4\nxiYnpKF40nig6k/jp3j85QxwKXGQdwjn6tzWZmj/6eo+FYg81avVnXFivyRd\n9CBU\r\n=vgAk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a1f0a1ba262a81f20b950902ec845676a08cd39a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.33","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.33","@storybook/router":"5.2.0-beta.33","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.33","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.33","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.33","@storybook/addon-knobs":"5.2.0-beta.33","@storybook/core-events":"5.2.0-beta.33","@storybook/addon-actions":"5.2.0-beta.33","@storybook/client-logger":"5.2.0-beta.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.33_1566136099681_0.34326810634231175","host":"s3://npm-registry-packages"}},"5.2.0-beta.36":{"name":"@storybook/ui","version":"5.2.0-beta.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a22052f13d0e601d8b7c41c7b6efaf4ad1ad611d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.36.tgz","fileCount":156,"integrity":"sha512-1MNQO8ptHTTUpoFdwQLtKAHqWi5/aj4y8VFr54T7ihRtWIo9XxZhLFf0OcLZxwbg5WMqSOYq7tZ+KRQn2CPKSA==","signatures":[{"sig":"MEUCIQDoBmsbN/mp6JO75NEEdS/jZxMgTY41hyxbTrLdzIUFFAIgU37HITbkn8Ip1LfAAGC/y72ibWsrHWxdcxU5iZieho8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWvfuCRA9TVsSAnZWagAAajoP/3k/dDiYHQen9O/l5h8K\noesadSr/vBNiDLzwjbL5OdM8q0A3WSqv9c47yUJwUMqUYJec1Iesg5nrByr0\nS0NoBHE+KWh1ilt5rj6xp/wh71X24uRBdXppms2N9LUwzjc4jBrWeSB8q5eS\nRh7x2/1d/0GNRBWe6OQa2umJtUobPFbdPQFj+eLilztPYSs7Zhqy0lSVZr3G\nt8NwVb/FulILPRLHTr5yDzlO5Pc9tE1+pqPPAQMlarDyj05/TyIYdlwtOwgO\nFytlcmLSD93Zu7CFuCc3NmarwJfsuErXunsXKIi/YsX3b935gYgwvoILtLdI\nawGlDDm/VoFU+3kBicZzVz1A6g6/7KBpTGAt9+nmW0YhD+/zCtrqFQgswktq\nqvYsixzkNIrXCNt8opTwSDW5JPCe3NrdWvkKKGnb98pfphhR0jFEnEmeGobn\nvtLAY0WDmjiuse4IyhFPoNRwRrJlfVgZNOYRvQlzly0iHcMpPjS5O2de9yxb\nkobDQoK2K/6UCji++PihD0t2ASwkeSBaC0DHDrxGD+wyylCGYWUU5RSYB4wo\nWDJhmL8yzcp6oGKi+QOVIoQ5NyN6Tm3EgAp1zcVbfGKzQ3+zlq0pvjUXMJkC\npvGtm1vhI8pdWv1Q7gDhEczzgxCZceCZDFvv1fLGhcNLRTCItS5QtVhZSvAQ\nkRRZ\r\n=ePKB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2c9c448307ad1f9c7509919daab8d1b99dc36176","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.36","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.36","@storybook/router":"5.2.0-beta.36","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.36","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.36","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.36","@storybook/addon-knobs":"5.2.0-beta.36","@storybook/core-events":"5.2.0-beta.36","@storybook/addon-actions":"5.2.0-beta.36","@storybook/client-logger":"5.2.0-beta.36"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.36_1566242797350_0.6626472220726898","host":"s3://npm-registry-packages"}},"5.2.0-beta.37":{"name":"@storybook/ui","version":"5.2.0-beta.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e3c0446d2ba3db61965bde128aefd45e43239ca2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.37.tgz","fileCount":156,"integrity":"sha512-IYGm5yFFXQJVlqFeJa216jcyBgS9oKjbJ5e7Dk7PrQAS3ULIIW06j1RxqWFyj0DjTh3lKrnU4PSmMo+NQIj/Ng==","signatures":[{"sig":"MEUCIEKDpfY9Vvl7RDD11Ra/ZOMSBsOdFvUwNp44izw9BiH4AiEAqpNm4kwkm6Aagaw6oNo2UgssO8gSor1a/jRrYNFuJMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW6owCRA9TVsSAnZWagAAWVAP/ikodeq6CoRqvJMPGeox\n6w5tYzER1/9dYRKtlJy7N8sP1p9S5ZUOoVhdP+NmDDG5Uv5Jei/CD3n+la1b\noPMkYXN2Yb0C3S0Q9d/i8BYPrN2YFmSmbpYz0I8AT9lTSwB3eGI5pS0DMCDT\ncRf2gHP+Ea5xORH3vWPeq9lptan1cHoEEFOW9syTrO7X8jAHNLoBpWL8Biq2\ndlfuzI/48nF1IIH7d0Ux6AU/MU65s60VHHXf0/yiT0q2QgF/1e7f6N9CZtwW\nfB2NDBaSOe3FFkpRgA7hLT78pjfj5mDA/gQk+1FsqoQUqpoV0AD4dWLNRZMJ\noER6jGFd9FdZxQwNI8yKBHQlNRbo7Nyxfn8BvJRpRzAksSVzBri9VzycjchM\ndD/iB7K7jIktGQAqvLXWqN8kO5yzJeTgEmNV/oVvjrQk+HBe/+Gm/mPersOA\np3tkurDKA6Dt9cR/9owAZOI4rr8zNsfpUveMHzMK+EukcAo+MEfPf4I/kzZI\nxhnkf8cdY27d/ABwwe7P5YxZcV8Oa5GCoTGjcjcElA5OBy4XOxnLRy6SEPxC\n4qqnaiCuVIye1c1wBg+KFicJS8ZHCSUwBgajXun8bQlkNKU+fgHl5ubcgBuh\n8aGay0gaWRaozXZnwARBbbxNdOfJUu4kSdKQiuttoAPRUT42xYbNXyTYSaSD\nHEej\r\n=7Gif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"bc4b5e8047edab52adb9e9fd51daca2fe3e0fbdc","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.37","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.37","@storybook/router":"5.2.0-beta.37","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.37","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.37","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.37","@storybook/addon-knobs":"5.2.0-beta.37","@storybook/core-events":"5.2.0-beta.37","@storybook/addon-actions":"5.2.0-beta.37","@storybook/client-logger":"5.2.0-beta.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.37_1566288431877_0.054562115116122634","host":"s3://npm-registry-packages"}},"5.2.0-beta.38":{"name":"@storybook/ui","version":"5.2.0-beta.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.38","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b2b11aca34a6e2e548382fd63cfe38c145f970e1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.38.tgz","fileCount":156,"integrity":"sha512-SNI6Lf3pAZ9wiivx2lzWDuJBJDNr/O8aj9VKbkgDDOntH5PAKWSzJc/TQJrtlNk33zcdAZznV/gWuclv8428JA==","signatures":[{"sig":"MEUCID4riNyjy4j6XfHb+3HTopwNkaCTtQ8yhYdImE913eAkAiEA0i4+EVGL2tDpDBeBJKpm6gVCZbTEuDzWZ2iGpWZfUFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXBvECRA9TVsSAnZWagAAjD8P/idPL/b+NMdPMCdz39ft\nYykm1xkv13Fr85NUZCjDlw6M0pu5cswP+Yl6almEz+E8CIxSZs00i0KmRZP0\n2zbFwHQ4s7pcuVVxRX/DhHzJB0fwQTkCJ4im6vNZzUFlSZ+h+DUwUObnGrwC\nwmSSJH7UOy3wH9WNibdN1eTlqP/qBPVge8PeNx1wMUv4rNkk+qsNyBWVQ83g\nefnmz7sOFrH1BAnQW5H2ORKSV0K90a7xt0mYwlIIQgU/qhB6e3w+XuX1evBs\nxTXjqN2LNXyPDyS/PXj4k5ihW8tr0dBKPjHY6G37XMY38qAM+FaG2CrZmCL/\n+Kq8+jKtXaJDubid3RzoclRujrB+wiPMlJGIbe+0KjNLPt87MTkP+mTNbrT7\neSQIrux3Zershvtyz29MCMCusSTaJvYu0HVHqb3BgHWNOeO8S+Z1NozCbQbm\nF8EYL/AIGn01tTXP/cpb7JZF1KdaepVQjsG1zTxKibJx4a/ly9TcM4Dm+JPK\nv4pahc4CPE5cbS3K9DNrITXDIeq8YCz6fSaMvyz+//iXATZ0h5ttaWjhDWQ1\nKbNeeTD6Q+dS8kfaYM4/R/f3ewzIfHWpfD9nZywy+7yYoUGAvK5WMtiPMq6e\nlUbFSqGjYj4Tbf5XCl6FOSuwUHLCjqoVD1uRIhoQP0Y5N0V+GU5ajGiFXCv6\nCa8J\r\n=MzEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6a6537f41351e610ef59e37c1aa574d26d8b949e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.38","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.38","@storybook/router":"5.2.0-beta.38","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.38","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.38","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.38","@storybook/addon-knobs":"5.2.0-beta.38","@storybook/core-events":"5.2.0-beta.38","@storybook/addon-actions":"5.2.0-beta.38","@storybook/client-logger":"5.2.0-beta.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.38_1566317507826_0.24927018337311746","host":"s3://npm-registry-packages"}},"5.2.0-beta.39":{"name":"@storybook/ui","version":"5.2.0-beta.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9b2ab1b1f211590a727cae500bf1b1f4b9097743","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.39.tgz","fileCount":156,"integrity":"sha512-/KPXi3jHwhBinY8NWKVBdyp0V1Jsq2feR0AKQq4jq4dROpyPa6KBEAn4mzbGcAxnZY731/quSWYOjuo9/DoLZA==","signatures":[{"sig":"MEUCIC/fD5QEHp3BEF+dZJi9kx85yy5dlHGT/cBNu8Wzqh0mAiEA7n7HDdioEimSQ/va3ZOELT1BXO/PWa/hj/GtehEiAgs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXg1nCRA9TVsSAnZWagAAfKMP/1rCtQXVKfDEqDePKcq+\n7KkTqk5KBajuMyJFZ6R0Ati5LyGcTKrdu5/174G8zXO13hXve/uEoO9bnax1\nLu6WJ6JKflUnd7te/HHOo6sSOf60hYLHwTkcwhc6MEalmKgpiWO7ULyr+1sm\n1PyPgk8oRc/LQNYQOcXnpkdXSboKcwkRcP195/kcimegJofkUJ3RLUzTb53z\n6n/gMCqvD1iIFq3ABJScWxYX5HBLX/Cya6Qpf3edXjvu4kwldNfvgUg3mPK+\nZE7lCLm49P3J8FRd3vGNBhK5oOc+pIOfKWCwDUXbDRy+J5Anxv71xyDZVrSK\nrYw3HAnh3t4vOyv37DbcoZp8JFbSWsiyMyH7ZaKxE1mpv/5au32DONDT5gyz\nZf0q0TE3i6qKXDwMpfXIPO4v3nyLrWTJCKAF/4Z1I9bIhOcfSTAoXZXc8Sfv\nihyy1Z88JrGSHiTpZOWrZLCu/HL0CgjItgI8dG2sqXQNJ1Tr0HbNF/ekbFxk\nRyXhUfdxPODu0n16735VHxt7DeQ/LT8ZD6Pibt23Hx20AIJfT03HWgxR3Zu4\nudFRZvN7eBZmg9m4QTpRRMELZhw1Dc66waQ7GFd9DretWluGohJb0PJf3cO5\nybwFrd/+xl3AiyeaFuX6NyDO94Q8FUIklS9dYaJYQj35buWjDdvC/0ZBJjO1\nyqyC\r\n=M9xH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"29944a6973f277ce5a1bee515e9e14c395de2404","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.39","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.39","@storybook/router":"5.2.0-beta.39","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.39","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.39","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.39","@storybook/addon-knobs":"5.2.0-beta.39","@storybook/core-events":"5.2.0-beta.39","@storybook/addon-actions":"5.2.0-beta.39","@storybook/client-logger":"5.2.0-beta.39"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.39_1566444902754_0.8643085099599828","host":"s3://npm-registry-packages"}},"5.2.0-beta.40":{"name":"@storybook/ui","version":"5.2.0-beta.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0fcca2ddacb74e5f580b533d57a19ca8bf6b2749","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.40.tgz","fileCount":156,"integrity":"sha512-2XxllIZns20j+AyvF/eUji0/Lwp+r86/nOIpVqQnpSywV2uh1trjhRYYTGOuYS8kZbwJyMKb4WRPfUsdRwQYwQ==","signatures":[{"sig":"MEUCIAyTMQMaB0uMSXfzYu77MB1NoLZMCFezZ3nel/Fcgyg/AiEA8haU0dSwNmtjAUNr8yk8cYqr+Fmp68iWKqYUvwlq6/Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX/51CRA9TVsSAnZWagAASdUP/0fzLPd6SIu3XKzG7lKH\ntWb36Wy0WMafD82uFojHGafnCA7gFZ90W7uDy13JIl3+p+8lcmxoAQKc/Oc+\nhwEvtw8B+Y+junVraSa2ctQptuc9vb9Ps/VV9EDTpB0AljIqlLoLdc8WvnFI\n2XLq4GYtl+OkhghOzF+2CxGzecj1eQq7VkfjWi88ibyUmT+L3tsIvm8FsSmD\nh51DLY3LONj8iFnLUYeN8RKwDCDAlRD7Abux40HCXY7EpvgH8lChJ2KpzQub\nkc7nQnFEeeRf6IIKZRdAZpFYaeTPCup277SndY2riJDo5wXIRm7cO6ioNwGK\nVqojsNwf5xIUZimUrpMwvUBLhHpD10TWWgBdmSMXk4FCaUPjpi1OiIEqp1Hq\nvGX5dETnTlj6EFGACYtnbSGCw2g9sODk1TbuT5JXYsBzhoh77XVmeKvnYruD\ny9XHCejFrtPDNGJOu0XgNniK8qJA8XA3u4HBW2agLfHfEzxFcytsWnfFTzys\n1IkEOFwj5YV/dpDC7fVurDipg4kSKg6ReCxFb+8WNZi8wfGJRX9Dsg6f/ZDK\nVN+hxj3LC6PpKmqUhhUtv2/Bv6z6I50EDVuvzKe9QG4++r62QIjGNkdjVnGt\nSCSHRFN+I+2TruWI5P9oeyw6O6bDYkROwleqsPVzfOpK2v7t1zJDtoBcg242\nVkeY\r\n=Aq8S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"61916aaf92ab3e03fbcfb618117cb275c73b4b2b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.40","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.40","@storybook/router":"5.2.0-beta.40","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.40","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.40","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.40","@storybook/addon-knobs":"5.2.0-beta.40","@storybook/core-events":"5.2.0-beta.40","@storybook/addon-actions":"5.2.0-beta.40","@storybook/client-logger":"5.2.0-beta.40"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.40_1566572149231_0.8440509919028454","host":"s3://npm-registry-packages"}},"5.2.0-beta.41":{"name":"@storybook/ui","version":"5.2.0-beta.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.41","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d1a9f5cf0a79980afe34606e2ce940164a4ea987","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.41.tgz","fileCount":156,"integrity":"sha512-6+5yCPYgOfyTAr7bKLt9xCv7bMXN2GCYH/zpNc4t/dskXEfUpiPsdwBQdvej2VbME/4Bav6hKhHFUY9eURf8Lw==","signatures":[{"sig":"MEUCIHASTzciXxrSaDu0dNpmso5MRjTr7aU6mNO6hsqKjZKYAiEAo9RalWXrfCofuES6QyJpKscedCFBOof5Li149EOCwH0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZVRzCRA9TVsSAnZWagAACpIP/jSDdXLS4F8HUCF+cn0/\n0XXJDp2Qgqt8qt/0Y4i+v5o4dMTW3krR0+oo89zzj01/QdKuMspLElC7kqAq\nO2fWZgpJdYPXfOlF50rh91muSaJhVmbqkRUHL6Agp74SkFLVJHxFC8oj83KN\nqOgOx7sZkWE3LSVNOC17TmbtlslDWDZe8hcrI1MqYs0ohkSRW/2gXDCBhe6T\n+MRaqnAwVwsv7I11nHqYkqBfVpQeym9wrQR70rQDwTYwBZFoTj9fXhgVjegU\nc5FcJYZfbjBRhPFliWko/pZglGnDOt3a4i4vWZPbGZdeQPohqy59Qs3fn7yu\ngqlVj46Gd6YKADgR6N+SITJFHPalMefjjQxr1YUpWV5+j1tcs7LXWqT/7w9T\nDPtsQZJUm44wbI773XaE7cTLpivzTM6MtJlPyd5hUHMZcZP3AvE3jcFkDk8y\nOxlO7C92tCcOR+UljmR6FRGfrt1I/IaRK0H0MpMaxazZbpBHRM1raC9eksG0\nwxowj8iQfpBNjH5c2lWGRqsLi75u2gNlWZ3MrLKmpPCj4J2Rm2Cdfsx10/tE\npad/jRaieGPr8lEFfSvL8vjtkY/jK51WVNcrpzqPkwOkcZtbYvK7fySV5bFO\nSTUksGkZ+4q28QaimaUABNzlq1EmqBdg24nDmeRYDh/t7uUkmYIT1oWmv4lC\n2EVI\r\n=0r5z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7d272bad69ed5a339ccce4730f267f86f0339cd4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.41","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.41","@storybook/router":"5.2.0-beta.41","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.41","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.41","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.41","@storybook/addon-knobs":"5.2.0-beta.41","@storybook/core-events":"5.2.0-beta.41","@storybook/addon-actions":"5.2.0-beta.41","@storybook/client-logger":"5.2.0-beta.41"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.41_1566921842983_0.527384427194314","host":"s3://npm-registry-packages"}},"5.2.0-beta.42":{"name":"@storybook/ui","version":"5.2.0-beta.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.42","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1b55c234e0e5c0d27f07fffa54bf727d4329ac8f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.42.tgz","fileCount":156,"integrity":"sha512-Ev3SBdb8lEK8TvFfWNi8wQYtHtDRmdtNLoUUrL14Os5czvcRm/SmMr2nlhlg+bFYq3c4XUOFoVgWsk2rJgRyDw==","signatures":[{"sig":"MEQCIC9PJw6BIGC9MVtN2uZsk+E34L1I74+FgkH7T53+/3HFAiB+s1/ePCQ0QErsbyamxq1jJqtuFds3Ldck1nc/Neyb6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZVr6CRA9TVsSAnZWagAAaOMQAIG4YzkmHPEUY7UHJkUF\neHbcDOTuGPcktjQ0HuM5ZJ1RpI11d3+H3ZzvInX9OVeBxlPow3Ivtbf9AL8z\nzAk4UYadyS8rjjM9REoRpz9dj+8QXqVZtu15Q2nrQqqx1zSIDKnVZNzAIYoA\nL/okNNHUVKbZihOQXA/Fm5rz2LqajoK4W5j0dYFgRCCe4mqxZVcNLCRVRafZ\nuw4VSIpM1DdKaXUiClJG7PIZgrphFlPIi/HVoj9cuk2aQIIL++kfBnoH/El0\nSuC6oKgJNWgtvjNr3PaXLsLKOA2amCIuLglLMQ0htFx507Qlpa1gkk8r3tQ0\nDXqMfsLGq/LIlHrgSshS3qX5zoOAeD8XZJ3ie4taMe+P4xGk1OgeIYQWJ5QQ\n6dYG+t0EtQ7l6Ex8tNokTG3VHciHnAF9dBtMtK9Tv65A3tKLdpIbnT7apkxI\n5A+Jwobx/f4jCW7LXkenZz82t0jJRDzvhHALdt8e6EoHzxVxRgc3ZDaQgMDY\nCeR1FWbnrJGj/4Ts2nmeIvZ3ofBA/IKzusC36/CryPJmyqwaGvl3GiSdxVAP\nOm4RaY08z81BpwDaGMgg+v4eUXUShTRjn6E8CjwKpFN79r9eMdxRik3gxKgC\nTNuZLvm6Q12qhqj7qFP/43xW2IVnNc8AHcmxBmJwYa4B11evW0rqnoiiMvq3\nSb6X\r\n=Xshi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"adcf205db03f39bdf398e3e3066de4fa10636271","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.42","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.42","@storybook/router":"5.2.0-beta.42","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.42","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.42","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.42","@storybook/addon-knobs":"5.2.0-beta.42","@storybook/core-events":"5.2.0-beta.42","@storybook/addon-actions":"5.2.0-beta.42","@storybook/client-logger":"5.2.0-beta.42"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.42_1566923513800_0.7281043304362167","host":"s3://npm-registry-packages"}},"5.2.0-beta.43":{"name":"@storybook/ui","version":"5.2.0-beta.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.43","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5725a045e1f0147dddd6b71e6f3d869fd7513aa3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.43.tgz","fileCount":156,"integrity":"sha512-kXAsQkhaErISBaQS6HrV0ciVNkmcWoOIphGXok+GfsG6XpLImU79GOH6TaYevB2RV8UpYomKKphZObotlOf1YQ==","signatures":[{"sig":"MEUCIQD1+/EKXadSVmf2c1JiFVKgz23E/loiPDmYrkRjIeoGJwIgHZsnX/3mGRA/4J6BlrU9WjkgYq8hLzzGt14VwuyXAHg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZcX3CRA9TVsSAnZWagAAcUsP/3RMoMuTxIZPFa06HTn8\nMTXXTdVsrBaRmiV7Vk2e9rSUbqK5Xw8Q2s6g0nP+xqDzCxCiiSs0KPOa+c5x\n7ywQcN7PouLdkwKUP7mLfvnDj7N5GJOQB7AVQU39BtzF2OFbffC2044tPT7o\n3BzSz7dL4WXsOmwbwJd9MnXpdO5cw9GfqGFEMNJ+8BjFdp+9t0Rzv5W9fodC\nyiUBUm6NX8PiQn1ceg2Nc9Vw3vmvte+YnBQgUzelYOkRYSIECnOS6/13+2cA\nj59TfqtUKhTwTQKD+OJXq7sz2YjaK0VvMu/YgKIdHl8B7ISImZ7CxBkjnk+l\nuDNgbc+FND9j5htCJvBJnDjX0G2c+Fh7Ls6BVcmNirhYgXFLPumrq+sT5YJe\nIbRZ0B+UpKitzrCYo5gXha/idO9p18dlo9sB9bfhJ48Mb/Hrj3zP28xVaP/V\nSpFahiteFWgEoUG0XCn/ePofYMTszXWfj9BDVHUCX9TYttLIaRq644nlFFR+\n1sYtxPHv6gj3+BBnviP8trmhXMKK3OYwyyUfOM35ed+VsONaySyKAACsW25E\nc9Mvd4/D2YMLabPgapOBtMTcSFiqunVmcumGAhG9YjsTAS8htp3UycyFYdb9\nG5fNGwU4adzu9QbdWMOlVVLiIulVHMVITqpVdzPs2Wjz7Kv6z07Os8T2KYCj\nhfMX\r\n=ifOe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0f1b6accc5e132d7d22dc8be0614791a62379702","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.43","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.43","@storybook/router":"5.2.0-beta.43","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.43","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.43","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.43","@storybook/addon-knobs":"5.2.0-beta.43","@storybook/core-events":"5.2.0-beta.43","@storybook/addon-actions":"5.2.0-beta.43","@storybook/client-logger":"5.2.0-beta.43"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.43_1566950902779_0.5850846992456606","host":"s3://npm-registry-packages"}},"5.2.0-beta.45":{"name":"@storybook/ui","version":"5.2.0-beta.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.45","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7b74b49a011db106cf3c4c4db5b3e1aab02216ce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.45.tgz","fileCount":156,"integrity":"sha512-zj3kCRVz0OT8VQaHLPaLzvhcUszUzvVY9B6arxvCGwkOQGON/76idAgkFZz6feLtybpogvxkX+z7CPZteB6bPA==","signatures":[{"sig":"MEQCIFyFI49Yv+FLL7k7WB8GXrx+F+epGjxYOuD+HXWDYJJBAiAzOTTe43xGo/pYjKnVfv17qrL7i9VVfvpBHZ7JlHAKsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZnQxCRA9TVsSAnZWagAAOwMP/RXVWTJbb5amHcw34eiW\nmRuEHGJrLS6W64L7A9pnjIkJ0ondmkBcyVI3IXnWEGY7AnpMmJ56pM/gwXfO\nmPWMvq5XQhnl2QIfo8YBPy1nHEoc3kG4cT1Pjw7rtGCjQj9ztUwttpikpNpd\nhm0zXieST/LGAEderavXvNf8byvBV2+9ZzJ7/L86s4dP8jTXfYo3cplJaTR7\nUAIIGDi1VxKk2HSqwltgnlmEt/Ff5uuy8PWbo8s/tsB25RSBNhXTJ7xeqQal\nCin28KVf1RhYFMuzLSgJFQBgeH1bvaPW9/MkdLaGkBYT2t0UM4F2HNYyaSeT\nPYI5uPFUkCOYQ7CTUPyjLXE21+lmz+5p/y+t24ExSIQDtVi4ibcq6Bpq43dJ\n0j74FnHahA6HxdXm2Rc/0dps0RGfw8vI6sjH5caklAJwqdVtfqlR9AKVQYRE\nHyuKv14GShA+NXtSkfIsUhRtDbOyVstnrtnDpMcN/rYPRsjzIxyPLecJ4H4E\naiKqrRPUxxeD6DbU8FhMP99RrR70Xod24MR2KBnMR4/1QbMvZwvUZGtWo5k1\nUJbXqPGs38vs0tJ9uz8bDQGGQhD8/CYKceUBdAJIEKokiKTzG2ULEzaAAk7z\nW9CKD/LenFI27jtUkDQmS34gEjXp20wxwVL2apV4gHcQnqhS145sNoRuER06\nvwAV\r\n=2f4F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ade0b7b9873edc8d6b42115aa3ba956fea6e710b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.45","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.45","@storybook/router":"5.2.0-beta.45","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.45","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.45","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.45","@storybook/addon-knobs":"5.2.0-beta.45","@storybook/core-events":"5.2.0-beta.45","@storybook/addon-actions":"5.2.0-beta.45","@storybook/client-logger":"5.2.0-beta.45"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.45_1566995504983_0.765124037524187","host":"s3://npm-registry-packages"}},"5.2.0-beta.46":{"name":"@storybook/ui","version":"5.2.0-beta.46","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.46","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"023b307f8bf86f22517bea0414422c94244da8b2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.46.tgz","fileCount":156,"integrity":"sha512-0sR1NJM5Ykt4hDULy7d5M5vH12wL7jyPrGFf++lzjSkjMmia40qlwcIx3fCqxU51Y6ql+nXTU2HIbiYv/Om4Kg==","signatures":[{"sig":"MEQCIHJTQNYwvbayA+64lzYSjVWIgNBXJ62s3xgnpt56zLL0AiB5sOMne4AtEPSLmBe2KA9memCkhBEI27ddfLshVcf8Tw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ0qMCRA9TVsSAnZWagAAB30P/2r0jh4BEiRpwM3df1b3\nTFNR5flJKk+4KDFtl4CF83tn76WLRVFjH+SH7WveO9N57ju5odbk9NcjhCkb\n9JCYZDpwA++tqKszoBhZM8TtCWx3C9O6/RJbUocdSgisT2ig7J6Oy6I93YAb\n+/Y64yGtQdO3VNG6i1I1XDbcoOXk4PGfUHWYQ0LAcn2cXE7095Hnah19E8Iq\nw6kyxeOOjPKYPDRjHBpcmQTPEaOfwrJ4k+cVBkTv+dn7ZHMgnlmLeagJ6cdi\nlMP78nxxQv56tKGJVk7zma9YEd1ef3QOQRRcdP0CLnStt9YB67WNd6+Y+Dsi\n3HaURp+HDlrrmb5Iy4Fm5g93cA1vLi2qB2un+z+/YcHojvDcyOTH3UvAdBoS\nwEehT4RgQTLarhZOkWQv8RwMnMpi2C2WyM9RWahLJpY8LRzEtwE0VNFVwCzz\n0vNgfSSQ+bkdmJ03DpeWRGZwpmjl2e1A1WbWbIKR9feNQCsmuzjQzF2oV3Sk\nfVnaiOGCV07Ws0xbt9KaMjSFHVNw6CmScy6HmtwJSFFCN4NwSO994qw6WFLh\nddhLNMur2YR5u3DYxW2+1gnZMoqFNsSzP6LeyqynxGloQtTwNdaV5+nR6kJc\nTFeiuy2qxXcS9KV5tiTBeNW++sSPw7PE6nZUSjg9vQ1ZpGeTFX7VkFNP4fJf\nHdXg\r\n=Z6qu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"30ad57a07ea4cdebe4cd1cf433e78034064953c6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.46","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.46","@storybook/router":"5.2.0-beta.46","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.46","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.46","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.46","@storybook/addon-knobs":"5.2.0-beta.46","@storybook/core-events":"5.2.0-beta.46","@storybook/addon-actions":"5.2.0-beta.46","@storybook/client-logger":"5.2.0-beta.46"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.46_1567050379749_0.14059957335433992","host":"s3://npm-registry-packages"}},"5.2.0-beta.47":{"name":"@storybook/ui","version":"5.2.0-beta.47","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.47","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e8677e9403a1f9e11b057c4c9639b9492f2b8d47","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.47.tgz","fileCount":156,"integrity":"sha512-ftOGjDCKZ3qdV/FEKajxsuLKp4n7PB3C39vr767vjK6IOE0flVB37D/lzTUpSDJ8OZmZl/Xr6QwYJu6VKzTW3Q==","signatures":[{"sig":"MEYCIQCDwiHZ7bzYXGqSZQB490kZeUee6CDgSkHX0Na3uCe3WAIhAOSTPYQUx05nLRfxwu8vqWyRg38WmXayqAAQRkk6ls5j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaALWCRA9TVsSAnZWagAAg8gP/3gtud153wPhsG0s/Pdq\nMUm7rqUUwgsY4dXrmq2fGX3nWuwszp9+QFST9o7jWRPZD4kcjT7FSvR1ez3/\nmh5/aw/aVxcg7ODNI/2DhbbFk7WjZm5yCt7ToiBhkizhObRJqw9/4edAO8jV\ngqYpNvNUy3+RRYyjerM1Q0dwqzfaAHNdRV2hYW5TBsjvum4HzOF7VJ0uM4yH\ncOi6kwIh9cbNtI/wuXJ/FjyCpEr8dwlMKCXUrifXw3rGrcqUi8FdRgAvCvyO\naAzt5RLEugXmfBac91TLHI8nc5So4Akqub8JMFKZFFsMXIVdwLKLC4HT7St6\nzbnLHTopuq1aJov/RK6unqMipR63lYKN/Jm3v0WHkIfBhqsNBqdrLzxpgCpj\nbpWw+avMZWk4RyiF3m9a+MCArOGjgeWbFA/qZ2vJtL1afLuU6jWZRSbOkXik\nFxAZ13Cl1avqA84RIzcyEp+Y6tkTOZDcrMO1Jvf40A7/4w1GtHe3IcEoQ4ru\nVikMAyCYN6BmgrLfv+o06TCpQc4KglKr3vhOPZNRyho8ozMJV+QXFjf85N/u\nMxCdTspV+XqGw/M+DuICeGkkOeBWfIRDDfxpY6QgnLBPdd5E/uL5Tz51EHMj\nzeKaDfB5Ayj9TYcLYI+C5fNppKAvmzGczBu536QKB+S34fA7eGO8QXHgDS7N\nH8jF\r\n=GscT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"91943299dc54b0d0c896ac44b7109025245e9fe3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.47","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.1.1","@storybook/addons":"5.2.0-beta.47","@storybook/router":"5.2.0-beta.47","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.47","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.47","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.47","@storybook/addon-knobs":"5.2.0-beta.47","@storybook/core-events":"5.2.0-beta.47","@storybook/addon-actions":"5.2.0-beta.47","@storybook/client-logger":"5.2.0-beta.47"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.47_1567097557897_0.2749355289977866","host":"s3://npm-registry-packages"}},"5.2.0-beta.48":{"name":"@storybook/ui","version":"5.2.0-beta.48","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-beta.48","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8215916a21ec40675dada087467b784a26e278ac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-beta.48.tgz","fileCount":156,"integrity":"sha512-MgfdjJna+RGoK0kuXTH/4o1QWpN9AyKM/Btwf8Wg/CLYK/R8Ax2d9Pa3sNmTLfaRAJDbB2yQV5xegr25/BPRNw==","signatures":[{"sig":"MEUCIQCNVkemAYkfpdzGkyWtxJxCJX9fQmf7rXbdYq78rplBewIgQiFO0IQJXaqZzusHi1gKIUMyYWzlEvqoikpbj4Ct54M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaKP7CRA9TVsSAnZWagAAGugP/iPbDcvKLcbltop0wAd0\nf2zq56y5uNQn0jjhKhFF6AevTKhG4rvYI/QyEzF/bUMC7zuJOHEax0eS3wtN\nDJv9CLKmqIU0xic/+i/A0MJwDGSrbnactW/e65AaI+UfkFcig4D/qF5NdAgh\nVk7xpIGjak49EEnRKQSdDL2r6eywQXpu4+uAxzHwHggtuQoP3YIr7HZHkp5B\n5L4XzhToD3xGxsJAZtGIAjUXy2hODuCJsbFz0g7A6pMczYpSe9i90CKTrhLP\nyGPX0Gf7aBzSF7AupDQLZJ+VYIfcSNDu/1ezkG1UcNmHNsLTAqKfmaF9hxUk\n1Nndyb8bnWWgzyBQOS9KHyp4neJbGIu1pCTdKSq+1ks6WzAr/UrOoak1JCPv\nmE+uTY48wMCc8n4bCAQpWk5z7/bfKOkSnD0LF8DVUsYg+fuDlfRhIeIzAtqf\nXFDGj6+fOHN6rFLtkAK4ORjZeBG40zek1ep3gZFnPV/36ow3pXwkFrcwqCaa\nnzSsQe+TDgzn3YGYC+EXk6ejE6g/U+rR8DenGzTk706Jp+ucR2QAqqypG4jl\nRlhDuqvURLSytXrrkuYajb89925IgpZnTYp8y1qVd4Mz4Qm/Vyz9ENqedtsL\nAHD9/xqktwRwVx2cbO/0FGY1weTaJ1ghcwjdgUnJin9uSmFXGru3UqTbYUW1\n9ECv\r\n=Anpa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"be34be9529d2554617832378637bad0e53553e90","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-beta.48","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-beta.48","@storybook/router":"5.2.0-beta.48","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-beta.48","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-beta.48","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-beta.48","@storybook/addon-knobs":"5.2.0-beta.48","@storybook/core-events":"5.2.0-beta.48","@storybook/addon-actions":"5.2.0-beta.48","@storybook/client-logger":"5.2.0-beta.48"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-beta.48_1567138810790_0.12277022618833833","host":"s3://npm-registry-packages"}},"5.2.0-rc.0":{"name":"@storybook/ui","version":"5.2.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"935f9b735b8ff0f9b5bd9e6e11d073bdd2d159c0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.0.tgz","fileCount":156,"integrity":"sha512-RLvQT9dWGGmY0sUU8QnF1PWrqw69txt+blYwAxV92Q86Gpuu95rg62no4azYhuRi7qVx4guR1I+2LC37oZI+1w==","signatures":[{"sig":"MEUCIBAWZVqOsrY/M0Cav+EXGjIAUTcnmsYSzltDjmiOIX6sAiEAqB5NrOjawpfnYvKH3y2nQZkOQ9f9WhkI+bUrwsYKtaQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaMX9CRA9TVsSAnZWagAAyMMP/ixDW0vy9l30OcqMjY7s\nq3xPjaB8R5kB5RKL9WLYlnJfkWCyN5qpQHCpdWW68OF1wLFmFyNnF78gmGce\nOr9XPWWhfRNXHxUK3ru9gvYNgxrvF7cR6e1FCLS4YLvdeyQjBd6mIgqAUUkW\nVqxA67Iy5D03H5elq+sT4ePdnoNuw9uFuCfEndp706Yh3XEOWRxojiREO4Mq\nNoqDDGuYFg5Bi+r/hCcqFW6pnA1Qq8tGznu1NP8HJFpwifHWykXjFzymvWVB\nHNjEzFrn3aC9u4mvXHOlDIJw8rObgDCO76vJK03oHOT9zasOGl9mLd3bemyN\nagyzA5hZ4DoutVhkOXvHvCDA71JThu7rMYsFjXJ8qgiOUg0EnPTrj3VKGvi9\nzhgZHvAvqREHo3EHUJN/F5roMY7vxAw1Mk/qXCrdnZeUXzU8KgOcHveIzVDo\nNPI7IFkjDBzW0CcVfae7lkIBfNHzmY6rC0EDBWUPaIdf7FZRUgA9TVWRgC4X\nI8NSLDq9f9yn4TcyuKYpzVx1FOhodWdof0OeU9NwY116xng480b9E6agTjPT\nqf8OYkKV7WbGg641qnG0cGx3XDnYq6e8TQmaOtxPXB0cqKGmDQgznPMCpQBj\nKMk211D7uJxPGCD6nG81JMdVWQKRvLCJKrfa1GCgEvuwM+eKdV7lpwG6NKjW\n5OAJ\r\n=CJcJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"69af3ae2d3a829e6e010fa19b4cc927096d6d326","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.0","@storybook/router":"5.2.0-rc.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.0","@storybook/addon-knobs":"5.2.0-rc.0","@storybook/core-events":"5.2.0-rc.0","@storybook/addon-actions":"5.2.0-rc.0","@storybook/client-logger":"5.2.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.0_1567147516613_0.5971549769369293","host":"s3://npm-registry-packages"}},"5.2.0-rc.1":{"name":"@storybook/ui","version":"5.2.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee41ef002fb046fb1ab5628bd3c25f14b3297491","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.1.tgz","fileCount":156,"integrity":"sha512-7gmV86FQQhyTXxaJyZEVV8WTTjEOvVEUMYxUOOElfjdv8j1XB16ZzMNynE1MDzS1UsP7ZJPXL+MWWB+CX7hTqg==","signatures":[{"sig":"MEQCIEVRmNiMrQ8DqWHlkHcRqJ3XjyvjjxhURZpwm/RApBC4AiAY9VS7ZF66sx50JAIEsYB/6Ts1+rwebYFyZVxoKAjTdw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaeJ4CRA9TVsSAnZWagAAkaEP/RNo+ow6K28bhxkKjJrP\nCX413FJj81i+q4nw5c05eMTIg93rpz1lRf4ukRKdqhPGk8xQZRI3bA05jchb\nI8XUrbLP0ps83E/fanGnw2LdQXvTM+Hhsu4vFKJf/zveKfLuRV9uIZbXV+tm\n0FYcm6D3KDugFxPJYkcB6Dm0kw6WjJ5Pfv6nSgfL7VBpt1OLjB5G1oIi4eyc\ntZDv1dYso5Dt7yDjpLln5n6p7YzQtqnwKi46RnkEG2tuN/v9nYoPyrKIs11i\n0XzgXM3s3kTvCZE2xB7bOXOpAYp34TYH8tezA1PxW8aLQ2oqQ2LeLuIYJSUd\nwIHZq0EgBPWyj3eaVdmIBRrk6fV43doUyClsaaUOw7poOBtGMViLl/C2j2sj\nxC1PA6G/xpxkihI1n+sNOFAKLWzIZYd8GTXNqUgM8yeF/7+3dOyLuouCM+8G\nXZg2JnVrJlbHAyLs+boStgYaHdYJfroCmUczmor+L+/GczgrR4E6/u+jd7pX\nu/PESh0kUZlD/k/x2WfXLhn0bhtaG6RJYvxDjQ5CS/CVYeNG8DydG20wNCT1\n7y1gD9egCVa5aFaYMVGxW/zdFvSWV33LF8TiIXdqKEdhGPUdOCsJT2pp6pyk\nvbsM93YFAyA9KfssMmeMeP3KHRX0kMb3sdYoYeziOslKPCaW17QetFnE1ecD\nAFRf\r\n=RiZJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a5a9838c2926d634f3865affcea8a4e2b19cc02c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.1","@storybook/router":"5.2.0-rc.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.1","@storybook/addon-knobs":"5.2.0-rc.1","@storybook/core-events":"5.2.0-rc.1","@storybook/addon-actions":"5.2.0-rc.1","@storybook/client-logger":"5.2.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.1_1567220344049_0.927291893497328","host":"s3://npm-registry-packages"}},"5.2.0-rc.2":{"name":"@storybook/ui","version":"5.2.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d44f5728b641f20804cfd9e885967d4513aff418","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.2.tgz","fileCount":156,"integrity":"sha512-qn+uPzDoTXxSNKj4mzrxh3ZwD7zORUV8NbV/ojCfRe8ZSHe66cxsnyM++DV2Yxp10OqTDbqNj/ermfk7cJe1TA==","signatures":[{"sig":"MEYCIQDY6aBzhFZLAY0KegWEhUvwNNUFAz1LWifSq8+Vjj/WagIhAKAdWmGAYwiEyRbiJIYcXZprFBAmIuDCl4sd609PonX6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJda16NCRA9TVsSAnZWagAAEmIP/i+XKKxghaO5WZ+4d+PZ\nwFX6gn2hV+N1jg03ecFogQcWC+yg5c734EY2cwyXUi3IeX58eDfNfAHOIjJE\n/2Itdip8YZFvB1dsXUSs+YBbEhF8AIPE3vlFH5wX0EcEJqWipBPNrWDYGrI2\nWVSJNnWBiHKcEMeALMH2cd2QwADIV5ixZ9mi7KLKPDAFGG7qPfIx3e7QBWmG\n88IyJfGpir2ncZCP6xGWxChX+K4ABNeXIXfYdg+qOzIOBSI2uNQMsbUvefkX\nBEOq9iD+YfBlilJ3HOl2M/83gOQnrseGR7WdoxWbccGesZ080MAiMDUUVEGC\no43ZWH6yB5AH+NxCqmfqeqD4U02RBAadThoAEq3Coa0vLg8Sl4hM/snjxYUO\nvqhyK6HLnwh5JFq73isk0DRRe85CTHMtcnj/SVIDX4SWBEVCCG6vO5+GKP9z\nHJtHOrUpi32LpqtQPRlk/vDi42KyFnhtTQ8cSZI5nJ9Dm/Eow0jtKxf2kR+u\nGbTGWwvClZDx/iWApM+yxKo/eL6rs3BiPsUvPe1Y9KsbNK4avkFb8aX1t5aO\nW9c72JefNopldcidPPBVvLzsAG4jTkt3K1QG/TXAOrZdsBQH0AcmdzbbnZoR\nhlTfpDZYTADBifapZpR/DeN/llmrIn4CaxVeMTPQDunnNjZl1BupXE/Ql94J\nWDsj\r\n=wYdz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f59b9fc0fd76acdf75de9624eb08df4670805596","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.2","@storybook/router":"5.2.0-rc.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.2","@storybook/addon-knobs":"5.2.0-rc.2","@storybook/core-events":"5.2.0-rc.2","@storybook/addon-actions":"5.2.0-rc.2","@storybook/client-logger":"5.2.0-rc.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.2_1567317644514_0.2956665842477617","host":"s3://npm-registry-packages"}},"5.2.0-rc.4":{"name":"@storybook/ui","version":"5.2.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c645175a999595cfd48e43cc82b7df103d5e4c48","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.4.tgz","fileCount":156,"integrity":"sha512-xHUJj2ycsv1/bLnqJCFHJkTRaPMhfMpc7wzCP2ymsNd6NDk6atQTMsU8oPkUzPVPMOy8Y95igjjsFcwMPR76mw==","signatures":[{"sig":"MEUCICdAvsJP7791U3JoZYqhjuKJg4uPiEzNhls72/2hpcQZAiEAx0knazasE6KzC1ccAMQx32Xaeg/7GnbIq8Cpf2A/Gyo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbjkhCRA9TVsSAnZWagAA7W8P/35y4oKmrfTJgeNDX5pi\nOyvQe3fs1VYTubGyD2gfGtA+fvqlbUNgRi9jAh1hJEPFOCrnuiWBXvixUrVU\nBIxR40X65g+zEsq9cKhJQbbfzlTj3dJxtsjf8Z4I/9mXTjXtbmpxH3R/nEy3\nCeNnXvWyDl7KSpB0M+WV5mtloFEMUPn8LPrrvvGO39BENy0L6k+6qwPM+9VO\ncbMuxvqWFzk18s4/74DDB0RLCUy7k3VwTCkp3F+nm7/Rn0mbIa2hZhjW8RAE\nXIJSGGzFrlNeQ00CiPo5ipxUN8hcSAxoc2Jf3cQhxEE9l5Sf+/7v40kuctOD\nEgwzSCTOCBOYTHwTJjYkBu8q25EwbXMKG9V8iZWqS+KpKSwThkM7EbIWh2R1\ngYC6pScfALuQCagGyQSwMaUkq1ub6IhfbshWsqTDqYuXIq4wsAYNs3G0lJ2U\nXqQJCvQ519a4KvvpYoJ4bo7x7L3ZCBO2HAmt5LmNgmrGf6Yg1cVQnYl5/KF/\nnhG4WLDqq0OIEuXQ61D69hqhbinYRD1uv/wgb+IUsu9Xw7Y4uiBRJusu0srW\ncJclrFYsKVQchrQWmekmY/1F9J7u8tFVZIDGljdzOO1Aj/ybNUzoOMzjYynO\nYg4n/WHrMZ4/bDNAmAS+BHj+iHx53LiMroCCBp/XEzpWimaHStZmBjVoqgh9\nVt4p\r\n=nLmM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9024c4068cd4c8aade6b3ae7a02d90092352cc62","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.4","@storybook/router":"5.2.0-rc.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.4","@storybook/addon-knobs":"5.2.0-rc.4","@storybook/core-events":"5.2.0-rc.4","@storybook/addon-actions":"5.2.0-rc.4","@storybook/client-logger":"5.2.0-rc.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.4_1567504673074_0.6073717825237206","host":"s3://npm-registry-packages"}},"5.2.0-rc.5":{"name":"@storybook/ui","version":"5.2.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"37953a92685011b13f5e00334db7144e35ffa582","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.5.tgz","fileCount":156,"integrity":"sha512-dzKo/afEADZJJzUcsbCcPpihLrscOi1r2gJqH9OHo2kBNnKQ761dz1wBoH9zsplXXgsYaMHYVJVGjF3GtTD7Yw==","signatures":[{"sig":"MEUCIQCfNycRR0wNVAKCJmCkJ9B5RwmrhiIttvnTQvqSPZ1ORQIgd6X6EORe2iFy24cwg+BP7cFD395CwQf6JgoxpR9WtIc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":562498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbyb7CRA9TVsSAnZWagAAqf8QAINItpgdIkURtZ+iXhAx\n4y/tqYT2r+4/qb/KvFsPR6g7yTO+pvxhgYGTcMFWzdg+UJZFeE62grLub9ty\n+EsJNx0o7seyr81teRAFA5+QHrwMytuy4ddS9gktwXn/9ErQ9cnrJul7KRa+\n3SHSz7V2tIScuI6rEtVdAl2U82ivJ40sQ9TGWmHwXcAiZ2JYdI1ROzkiSK3L\nik1w3boIJ8hr3qDAe4sADSOrdU6fBwL5rm228mQtX9PqPs8Zs0qK8dDww+rP\nSGVyaeKNjHgbHZ8LzeBYifAoWOsbl9+K7S6+FiUM68NQmZ3TCCnf2LrS074j\ngtTp26ObY7BdPKIV2DJhrJmOwHzdqmqBqks8m+hCAwCtSB8JlaMyfVSWMe3A\nNAEEt0D5tuEZhcpF6HkN1ikveLx+Un4McT9vbqKO3qvq8xDZYMbI8QPaju+j\nsq5Ej4o6ErHHZ5sdiO5uiSOsKRcUdte9JxMmdgvhqIacx8Gtv8iCHgOadDip\noR7XvUksQTOPsC3Xz/YkQu5m5kQpRz9YPYtRuuFA/2qPWbkxCdrBFrhaOy/R\nx8agvZ14eU6skVlhGhcUe26Su/GNbPf0xqPh/zHm8EnorXzhNAbvRS1WQLEi\nDrdePtyYr4DpZvO8cYn2QmUg21675ZJNUm/LgIrjzRy3+VdF8SCr6S6FaBEK\nLe/d\r\n=8qRR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2f64ae316ab2bebb5b02d8e323e121ee62ae9733","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.5","@storybook/router":"5.2.0-rc.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.5","@storybook/addon-knobs":"5.2.0-rc.5","@storybook/core-events":"5.2.0-rc.5","@storybook/addon-actions":"5.2.0-rc.5","@storybook/client-logger":"5.2.0-rc.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.5_1567565562813_0.8022418364459767","host":"s3://npm-registry-packages"}},"5.2.0-rc.6":{"name":"@storybook/ui","version":"5.2.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0fe9acae461a4f87a6856a78bbe395ff180b034c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.6.tgz","fileCount":156,"integrity":"sha512-4LlCyhxsY9kuuNg98QjdOGLI3qUMXLdShX36XLaz5cyz9yRaWX3FYuh64IbG0g/XdB/qLtn9AypgmH2j+yfvpw==","signatures":[{"sig":"MEUCIBrxE4Ew+1rDtLHUKgqTqUyKn1NnncD86yPw20Y76d0oAiEAi14QKQNSln3BRBX6zJ0eU2bKKBRsjRTcsPWI9jHYZ9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcLDhCRA9TVsSAnZWagAA4pcP/3Mu6fKrF1Z8Sig9Q1co\n/C1C/YlzobK+PWRv6S3UgctQ8oFe9AjQRy5cVDLWUpfhAgWR931lMZ8f6aGV\nHfpJ99eQZn6sbloCVNa2m3a5vYobCZ6PQskultxGziOewiRJTEjIacyppa2R\ntWxwIVuoQJCDeFRmsXD/kpElQE0lhz8V1gX7YgOnLICwfap6KW2ijJwE5I4H\nfdwGfWM6sfIi0XsXV/ArNihJ2kK3NgZjcZDP3Wz6HZIfDkimnLr6TqW42s5E\nfiJnKBCU6Az/pbH9vZvmR/tQgdzmv/gDVzqghEUu/Ivjmv6VToywNOT9+pFz\n47IjrfZkthrPPPqnJldHhVidmcgaDMjQdW32jlLF0X5O4ILWTCCCDwgezhp9\nlLL/QRXjt62jXhlruRZyTKf+jirfc4vM64aJNYgwusqeCQ2N6O3mXvk2Qkol\npTvl5pbiiDT3WH2hImIltOZE05pVUbVG/a4NtnFf2mDO9xa44q/ncvA8qzcQ\njsKB59MUltVRqJhTqpJzrnnV73Lg3hYx38dXN7qye5+nE/HKJn4vhUDtMxu7\nEKHmCup0OWjFPFaXdt9zVjKZUmUq0isFNuI3fgr8FHH+sf/VpBhaKP4twuL5\nhBQVXrCBvFgweoxiqXrTt+bI0jRBt0yxlnjKOfyySJMpIrKAgLDuW955yacf\nq+/g\r\n=AwT4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2ec478efd96f91f6e6040f455e18fe0927bd363f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.6","@storybook/router":"5.2.0-rc.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.6","@storybook/addon-knobs":"5.2.0-rc.6","@storybook/core-events":"5.2.0-rc.6","@storybook/addon-actions":"5.2.0-rc.6","@storybook/client-logger":"5.2.0-rc.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.6_1567666401265_0.39895570154559623","host":"s3://npm-registry-packages"}},"5.2.0-rc.8":{"name":"@storybook/ui","version":"5.2.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"526eb6b736a09ac30c38c9937faaae6a55ac14c7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.8.tgz","fileCount":156,"integrity":"sha512-LzG9e5DdBrID1nB94FrITX+9l5UC9RfhKe3cV0OcT3yPqsktePn3/SKHME8/JNNUcJJbtgMo/qjVd6dKYUUxoA==","signatures":[{"sig":"MEUCIFdpO/5klbupVECYozoiy00lgfwFtRfAxUbwwcB9c2ZLAiEAlvW7ZtVItPrMq+vnwJ8ZXIE5IhtKKWRKYhDWzmxyzuY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcz7xCRA9TVsSAnZWagAAD7gP+QBm5xoWrAk3IVGC7Pgx\nnEQ7DlPrJ6l6IuhN23/oaDtwCiOu22g/t+tPP9orFMo2h97cK+OCXciR3HpC\nK/0h8a7hR/vLpQOspJSMXwl7lncUAdUiv56TDpnQaKkiUywZUllamjVcdzPK\nUUFxcYKGHBKYKf8PpvHkPveddyay40PGyfqG1pHnf0EgntvTk0DOFkhPE25x\nPoy6bFxJ+ks7T0MpdihWwX/arL33/7V5F+IEone/g5aARUwyKyHH5/cXzHYB\nEmGitFkaxLm5BG+07/Av+HqPWza0itb6nhl8GkudT0yaGyEdwGPDkh0c5NUj\nHsdynIyc4YQnoYjGyKL6F5MgPL35hOhMM4vn1fjtzutP4ZmTG8MdX0CkUcKZ\nURksATYoWunmJ8QUYQEexg8Mm/wFhqGFM+cxX4trEcecLD9sC/GgGr5XsVnB\nXeb8LtHAHUTeZqgl0XJNmixMOCWr4lRGKJ4T0Edm0DNAxncf5wxxjm+2HDHO\nP1SAJtUPYIYEAlPwaifZieJC7orP6JoDkjEPWSWN7UTFqtulmUlEua71LoIG\nUODBbIgDTsibOkIcgtTDttC4ZiD9dzsi0Fop290flklVUmRyJSdg588XjFMP\nOFCd/thHRZXELODc/4fwzY2UBf/DFzkgXqs/huDuw8YhBGQEKaWIY8HFziwm\noD7X\r\n=KezV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3574c5f8ce2366d1c92d6f34ebab84ccf162f327","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.1","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.8","@storybook/router":"5.2.0-rc.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.8","@storybook/addon-knobs":"5.2.0-rc.8","@storybook/core-events":"5.2.0-rc.8","@storybook/addon-actions":"5.2.0-rc.8","@storybook/client-logger":"5.2.0-rc.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.8_1567833841095_0.6683130661784544","host":"s3://npm-registry-packages"}},"5.2.0-rc.9":{"name":"@storybook/ui","version":"5.2.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"101ad7aff288eab0ae979216758f82fbd37e324a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.9.tgz","fileCount":156,"integrity":"sha512-SUrCAg6wtebuSORUNtqzIWk6529NqehbrPri1znOEx/te0GUqFNZzo8B5LhH09V/w6XOz+KD6Y38OgCPa6cJnw==","signatures":[{"sig":"MEQCH2U166d2QocXnvT1E8uIYGaVr5i7K+mVlKdAW1uEDhoCIQCnZQOj3DEa1oVp9rHJCO8zv+i5sXZMvcqsOnnYs3S0qQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddIrECRA9TVsSAnZWagAACh4P+gKWmYsSekvz2igcs6+Q\nFq0aOeJ22pYojgGnVIm3oODXatRrWAPWa17hhZ+H+81DJxcadfHBX6sfSz2v\n6/xvHN/EJcOSTVm6Q33S4E9tzGS3aU0twnugxOyH0RLqYz9D0tSvBB9NWIXG\n+FXQYIuV/2WMDRKzpm+HajQYyNCSqDS/yfMK0A011TzfMz/zRoyV0M5kaUX7\nhlWQ0ptBT5div4l0ubtoMdYqsRrp4Y02SHNPlcmj9irLhFEGzF01RVFAtEVs\npVSVqriy9mKdXfLZ4r22uBZ4XQTXoola+dyMim7oSPurV8HP3O4r9GyCm1W7\nf6lHuPoOxqaC9AU4EVmNlIKpea7nfBmt2DWP+5u26VYP4pApR8ZKHxRXEHiJ\nGkmqPIgd9N67x7ZT0oByqpesISvzwUNSZkUXmPAWD1GKdZRExJu6plQ6hlez\n+NwFdMpsPYBLV0H8j+DR3DacST6Vxe3Hvsx9QU34lieh/WyaFX3Kc6blsi3E\n9eUtM77t9dkHHnKA42FXv2plltLXc/IhTn9UkEk85bPeYiOx4a3o3O9ZZ2x2\nh5g6CZbNaGg7SOEYDyOW7yuCsL2GeCKK/dk7lmmf9aCteH8rP5zLInFUhtGC\nZuiKPqDEx50tQRyersM6xfgo0qi3WlC9enpSmeGnfzdGBUPTToUNx399tM+8\nFRe6\r\n=ask5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"90e54468ce99029631bc80b8b1907ce0db8cd6e5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.1","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.9","@storybook/router":"5.2.0-rc.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.9","@storybook/addon-knobs":"5.2.0-rc.9","@storybook/core-events":"5.2.0-rc.9","@storybook/addon-actions":"5.2.0-rc.9","@storybook/client-logger":"5.2.0-rc.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.9_1567918787778_0.5407735870337853","host":"s3://npm-registry-packages"}},"5.2.0-rc.10":{"name":"@storybook/ui","version":"5.2.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"23338e9e1771f19863690e6d2ac68f105e665da3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.10.tgz","fileCount":156,"integrity":"sha512-xAvkUZaXwJOKkEPJkGVHrn/D7FLu63pAC4RvUHcqcP9ITCl4ngOrqyB0q9SO5MsNNLNPVZbf48bsIu4KVMfoRg==","signatures":[{"sig":"MEUCIQDz1wHoB4TAEFeSwbqj+7KHBdNu0JyocPYz5bo0OO9FyAIgeCKA45Td3KglQPxN58T4MnAwN7LO6fZdLHL3ufMtifo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddsu0CRA9TVsSAnZWagAAelYP/10kKRpM21RsGCIg+ga0\nPiyU+A3UOxILQ3jtGZBJjg5tYTai5mHRrsnO5YkQ1gwxEXaj5amaA/VyWuj8\nZBo0IbSyv540k829OeeAq8VlH9YyzoamB4TFQQZQOcZEX4wUiKuHIb3WhfQM\nQ79g9YSCRBc8HX/9Etb3txGCpwKxssgaNAcSIZNPz+6p3EKlMKN9dLOQdNND\nvVm96FFVwGIQJs52jO7GJ7SoOodCs28+k80LQI4Tlpx29IBw9nUrEbgREP9Q\n+6UK24LNjRxeOWvz6QoTqY93D6v3w+5I+9QC8lsyvPNiRFEFwGmfZ6mD47Wb\nVnoKoBIZOLLbsA1E+w8kYYc60S15B7j5pdmAgrE+rV2el8W9hYv8YeKMNkeY\nmgo77up+jPebWUaeoQT8A7nyyWSf5BRqKVx4iAfSWyH6AT123+PDLZ4ddUn7\nt00mfyrjdKmHSsJrp67yqUuPK0z/LzL0BMvDqXlQd5ChXsft7TUAKyVKwlbv\nahIdkX2Ewl3QtdsOE1Jgjq3C4ugzo+pX48w8uI+FccwWVOsDhQu+MKPeXjjH\nwmN4jD1rbraFacaqRvK2RumkhcnYaFh+j0yyypy/y38jX2mosDxxfeFYLh2/\n6322SBpt0ewG+RydXyC0i6bEz1CPMzBYs/c17uw6NzSYUkEvEmnpf/v4PB31\nf9Nm\r\n=xvxn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e22ff44b2c2fa62bcb9522e95199dc734b72e7fe","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.1","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.10","@storybook/router":"5.2.0-rc.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.10","@storybook/addon-knobs":"5.2.0-rc.10","@storybook/core-events":"5.2.0-rc.10","@storybook/addon-actions":"5.2.0-rc.10","@storybook/client-logger":"5.2.0-rc.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.10_1568066483570_0.16824987311233786","host":"s3://npm-registry-packages"}},"5.2.0-rc.11":{"name":"@storybook/ui","version":"5.2.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0-rc.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bdc8dcb9d2cb8cfc4b8d6a9b30738952574107ac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0-rc.11.tgz","fileCount":156,"integrity":"sha512-VYp1L/4Dlzygp2wbtlU8tM991ZlGUtj4yN9vyxfmyagpYVbYLxfAqYTiWgKUSTraVA4auzWJKNXhhHyXRgm0Dg==","signatures":[{"sig":"MEQCIDDeijU20SFEbh2DpGggdgvTuIGEd8Pznch73luXDcW6AiBgFgq6dts+e7k5SfLdzwH5vNS8ToCSoU6QsWfU6qorMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeAsUCRA9TVsSAnZWagAAsN0QAKNqsFu3maAWSAqedLTQ\nmDJLH+SAlLJQi1aLWtoVj6nNK9oN8PwOFxnwUzUCQr9RuZ6bfzNdLozsSuiZ\nzLkDOc6C4OkjEjDfAh1oUZ0ijBjegZ61DrEyFPzs5LwmMthOBBMF1A1/zb+t\ndm9B2qv9bJhfcHkJ9+J+Dr6b+w54PO2Xpr8qTbkLqGw52kn6XMqb/REsGDvJ\nFfULIjUTqo2qSdEHJTlOMEfqhouB/syGcyDAKixuzKELiZ5hXL1lapN8rHe8\nXe6yp6PWwhxehtHn12Sy+ZZE4bt8lsjQCa04pg/i7FC7u3LqwrpvKxY7vVQQ\nL4UOwncHo42lo4eUYIgK9X2Wts0V8NDJ2KkHhuGmSDS+1n1sLrsanUSczVfV\nNeehnuXo0X0JP1E6Sp0fGivJtjEFdqDoYjrRX6iuTOSHvU2082JTJfpUfB4U\nUNqM9HfvsOznPae+Olv8x43YLV4+pNZJoq+UloeOERXPi99HhwXe94qB8+0U\nbYyPaav37oiwtMw2LbsWWANbF26pbr4WywZxi9P4HVq1lMOg6OPxB9cAAVZ/\nnt6gwSUMYAPtoA6QU77Fs2r4FRePHLEL/z32Qva/fMkMjuitTBim74jtYVm6\n2DAQYPadPuD8n5YdGcUbURGhLvN+vOSmiTZKqIfj1OGjAl93ONKX5gX4JnOy\n+4d0\r\n=FkBp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cd6ba7734fed91016edda07794d0feab5b9e62ec","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.1","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0-rc.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0-rc.11","@storybook/router":"5.2.0-rc.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0-rc.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0-rc.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0-rc.11","@storybook/addon-knobs":"5.2.0-rc.11","@storybook/core-events":"5.2.0-rc.11","@storybook/addon-actions":"5.2.0-rc.11","@storybook/client-logger":"5.2.0-rc.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0-rc.11_1568148243406_0.23299390791202867","host":"s3://npm-registry-packages"}},"5.2.0":{"name":"@storybook/ui","version":"5.2.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6443edbd973fed4d6ec10f45c0a4b49631394983","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.0.tgz","fileCount":156,"integrity":"sha512-4xMpe8OTBDbwtYy7nEKsuMdrOpXTf3toQm+OXhYJKl6N5kUu0AHt60WtPG0WuhAOHHE1922pZHh2EQJYcIzv+g==","signatures":[{"sig":"MEYCIQCz4PTIg3RfJaktFc5lSR2MdMKwtIdpGG2xRx6V7Yg6GQIhAKi2R6h6pvu2j0kFXeXMmY5LNfToJ1EBQmDr7zGEx49S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfGQ4CRA9TVsSAnZWagAAFqwP/07b8uV7TqcCBe0XHqas\nBVQrOyaYN80CNRaesieIJlRmCGeQaNsxNEj0ECah94VVo19jSsjsAG1shFci\nQtvmY5ICL15PVqdbVda1VaJZE0g2aedunYl92ABKq2tk/Big1/3PY3/d/E7l\nvOlyazIqrE9N5ZNnvfHha85iBuOdEJMKRsqSctnuqZEN3u1XCkr2CGSZG6ZC\nz1Dl+OiTsCbFT1Rqzk5iEzN6RKvjyYmWwG9mzwmCQ+TWkz7YTX4WgmPI/mwK\nv3vYqbUOJ3T6CG6WNfRwoeNzGuZ9Cvaisan0pgIJtRipXd4E0JSt91oXxAN+\nJN7bnuuNtSUbocwa8AkNxqgRLePaochGcyQoOTI3ZoN7OpdHN+fBYL0NQJSl\ntRMUxZnULs2MWNFidGbWi3JC/E5LpwF/cudGqyw7SrPp/qEmUbgG71+NAJWp\nltDv7BdAQamvqNvIrPG0LzF8taMxZDJ/2dfJYNFfRt+FWuVnmCj2IBkwbnCA\nZVG1bkUcUcGtf4oZPCwmiwEuXIyFOElPmclCzvyZP9IzCTdKyENcnf+fJj/I\n+dAmXjmPtR0OwfLD8ljlB9xqYg1Hnh6wfT8/DZaed6ddOP8V9YCw8+lNgKSj\nJgwk5RmGsPi50jIIEEVdLDzG8DvfQuH6BAx5yh6TBQnave9BwKtsgLCXmdxi\nI7FM\r\n=xFWh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"0e780c17f0cfd4d4c5a266bbd52fc76eda8b22eb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.1","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.0","@storybook/router":"5.2.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.0","@storybook/addon-knobs":"5.2.0","@storybook/core-events":"5.2.0","@storybook/addon-actions":"5.2.0","@storybook/client-logger":"5.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.0_1568433207445_0.827334173298756","host":"s3://npm-registry-packages"}},"5.3.0-alpha.0":{"name":"@storybook/ui","version":"5.3.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7ee0b635b8a4358eae5ce1e6af03d8d76684e47e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.0.tgz","fileCount":156,"integrity":"sha512-U97eRgKsElp2dmbn2owK6CnQUz9YhOJ0Slb5aVDzAnqNy/dOxLfllUc5R5/O+Ui5Jf+iLj7uy5vs+nuWtXXBrA==","signatures":[{"sig":"MEYCIQC17xAD+dEYEqsQ9Xm0E1PG7jmnun/EGOuFWRr8dr12nQIhAMrVJd0dCV3y+qdRIPlJgk79Wv8sWqZ6gzXxlCgEUC6j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgF5QCRA9TVsSAnZWagAAMbcQAJXhDcSo8lLQjBXfqqAi\n1M1bf+ZNetiKtNkdE+AuU5N239ydzxB3MfSr4uOuEBEXnOTLFFDM852vuHA0\nneYAfEd2pFN7lcCvSd2PFMd4rfYgaf6CpSnLsjzUVBg2fQECEF6dtH26fLdz\nT9Ll28iFAq0QRB3LpGcVQZ7leIq93APmpUMydnPtaOpNKIU0rbAYSAF+Fhic\nOXRgQCQyPq1eyoWWVcneWJIp7bKfJTC9FS94SkoIl9rqYXoDbT+8MPhwEsY9\nSZ4aBODC4wlYl4c69M1tPSwVs8BM/ox2kQBxT349Wf1QuPnHEOWU5cUIysJj\nOWf36wuGcB3VcFg7hRw4Rkm2f/puLq4TLCGkmsb2rm282ro27IwXIT6kpTVN\nP80bksV81i7Ot9nPBnoKdLM4/LccYUuql6iUTBDoOQP1tDYwqlUk/eEUYvqy\nXdjjCph48rMyHCgvHAjvXP3dXzS9nP3bSlNRRP/YtMIWm5NGni+iklk5kBMo\n2UN+a5KIaGqrnI5K3JtaKQCoBeKtlMy0phui514q1XXYRE1E5Yj94lbMWizn\nNBxEokHVd3J9Lf9utHnPzVUL1VP2jql6fBVXAeSYwULUEwQC9I9eNFWXe3gh\nWZ7IxvBclJha4X43pqKhuOHKQdBvW8Jys2f8P+tW7G7ezEvn1a8KYECXhJko\nJR8F\r\n=Fbh2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6becec4d78bdb3069ac167b19d01a81eb98f6164","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.3.0-alpha.0","@storybook/router":"5.3.0-alpha.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.0","@storybook/addon-knobs":"5.3.0-alpha.0","@storybook/core-events":"5.3.0-alpha.0","@storybook/addon-actions":"5.3.0-alpha.0","@storybook/client-logger":"5.3.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.0_1568693839877_0.89382185634167","host":"s3://npm-registry-packages"}},"5.2.1":{"name":"@storybook/ui","version":"5.2.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ceba1657a232efd10f839027f8ae274e370c89f6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.1.tgz","fileCount":156,"integrity":"sha512-h6Yf1ro/nZcz4nQAU+eSVPxVmpqv7uT7RMb3Vz+VLTY59IEA/sWcoIgA4MIxwf14nVcWOqSmVBJzNKWwc+NGJw==","signatures":[{"sig":"MEUCIQChS6WKl/eQ7EtmYihS+bZqdqtLb7DIK5NoICqaGdKVRQIgU0fwNP0h9sP7i9qNaqSdtmxBH1AT+tBW5IXcoNMN8Vk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":563338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgQo2CRA9TVsSAnZWagAACBAP/iORZoEGTodl5TlNvcpX\ntboDIczGV11XCB4yZ4lbjy0+12GA+cxsK/KO8vMthbf5m+yVqjn4J/p5H+TL\nOm7Rtj0FbcK4wDW9ztcEGu2uraNeu/mkCU+Byse8mbWNTwMUVgBIQKBa9m34\nGJGLLU2KWLJmVMaHcqsnyrz7ObToRzlyTkIGZfWMplo5HIDnBmxHIgRGK7+1\nOKGaQojGxnlvZahxiOlw2HxowF1brJmbMBDBKicPef7oaI0HyH1NdS1th1vg\nhI91su/oflnPs2IktzEia0U4kFghseqbycdwiE8smtkektDmK8rOAaFUYusU\nrerftaz3AAQedyNN8MqQ2dXf2jBQk49rWphBQrJz7AISOw+4NDnjl4QDFhCo\ny4mg0vLvklRCTUDRSjUVjtWgWDTs/V98ypaNZTBJ+u8yjnP4H0GKKkknC689\nhQwNkdA53U3oD+J7cDTPl7MUjLBxSPkNUZ0uqPNwlLkMJboeryBQJJ16+BLC\nE0bte4rYkF4ZIzfPujn4J789k/f2y3yv7rSRpdk5M/ZymCpDmEbsY774UNQ/\njgKLG6msX0lHXVKNUbWzvxl5KzVn49i1JzJcPEKJmkKE0kqoQ8rHB4EX/w+M\nb/H1/RnyqQitb5W3QJ3WPE/oXMczo0lxHIfxCTdYmnruwLHgtqKMsIZ8YXOt\nKslm\r\n=/Yjx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5497d2ea8d47c4573d245126e6f3f45bc176c12d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"jsnext:main":"src/index.js","_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^3.3.2","@storybook/addons":"5.2.1","@storybook/router":"5.2.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.1","@storybook/addon-knobs":"5.2.1","@storybook/core-events":"5.2.1","@storybook/addon-actions":"5.2.1","@storybook/client-logger":"5.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.1_1568737846083_0.8017726554092173","host":"s3://npm-registry-packages"}},"5.3.0-alpha.1":{"name":"@storybook/ui","version":"5.3.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7b109d2391f087b86141fc79d96f330a834bc207","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.1.tgz","fileCount":86,"integrity":"sha512-v+Hb2/fq9ZZL3P9CveBMUEW6Lb2P5/8HCHX9U9mm5dtp/LpbohAlCiHGvTfrbDZ2ftoOW66f5A5Aq5C3Dk/IAg==","signatures":[{"sig":"MEQCIBa6GIfkzPOC93XRIgC9ZzSxYoF0iFcKi2hyvBGQKdu8AiBzGbPdqUtyKNZC1N52JHO2Ea7poTRrQlEVOG0gRA6imw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiZRZCRA9TVsSAnZWagAAoVQQAIxttWKpYze46PVKjgIT\n8Cb2OtOsBWajgCWPfuBtuLiT7xGKKq+635S1ATsgWAVR8vUJnZqjIQlemia4\nsPc+RPrrL6HZ4eGc8nHzXcCHuAB3T4uegtUH6F1CXvjOpW/AG1EmehgetyYJ\nJ32Bc0H25Gj1NDJ056WweOTezdAzkz49Q3TJ6nyAmXCG7jpcp6MTKn08P9g3\nkE+eCvaMKQZ6u2t9ZU5azMAw2BwR7sZpGX15n1BwuvcRqzZY5hVfips527pm\nY8oiZh0k/N/D+FGVfjFrbpoY/4yQ/6lTukex2YEHv3ZPToALewBdzkfCCgMq\nJF/+bLOKqI0B7Ij70STOPHvYREdIauJXGEPch+9xWH63bl6adzI2RrqVP1ny\nt0JVeUY5kvRvQr8CyeCp1N6COmn5TDv3LA8hfvrwQH34cNz+J80LqEbF0m+A\nXm4wGCpbQ2Dkv8HL+mqRbw02DZwYGdOJ9NrwNmcrOJeQF3FbtQbiZ2ODVxzt\nIaSU45EoIz/jJz/OQlWrIaaYJeHB0xB2+SGV5pBFH4V7U4zPke6rqAN2AfZn\nHT8o2NZuEQL4owcBHVAk8yf3vB4PkzBFKH+QddCo1VG64xSibZ/ebxwcLhXt\nxc4E+rPY0nP7lzfJ0y6yrFELBfWI4Cf+QkfF7qqhM9bihBAOz3taInHq1iUp\nDIC+\r\n=3XbH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"13995be1573d43b98432b8f2a7f1c288dc574005","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.1","@storybook/router":"5.3.0-alpha.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.1","@storybook/addon-knobs":"5.3.0-alpha.1","@storybook/core-events":"5.3.0-alpha.1","@storybook/addon-actions":"5.3.0-alpha.1","@storybook/client-logger":"5.3.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.1_1569297496730_0.29730289651188646","host":"s3://npm-registry-packages"}},"5.3.0-alpha.2":{"name":"@storybook/ui","version":"5.3.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dcf80e5700028ab5c205ba27b49084156046fd09","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.2.tgz","fileCount":86,"integrity":"sha512-woBKDIPm9w6tDzQ3JRbHFzqz8ehzhrdFCZDQZndNqq8sIuCup46YWo2OHlWZ5i3bJ3NbOTBJRdPWhOKIQ/ae8A==","signatures":[{"sig":"MEUCIQCB0LCGiDrJsUv3RQk9GZ2JyKbU9TVjDAtYahWPJWwR+AIgWD+rjTqZgt9B+laDwTy0ZicfAiyfCDxPWeH/leAU2Ps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdih6QCRA9TVsSAnZWagAAlKYP/AnNXH4051Aaj5wiZ3Wg\nnbZYhhi2MNzcsE6DzHA9ANmA5Sr5NkZ4QZdQ/Ysp/GJsaNYsTR+3E5tpW37q\nJoRMjLztVh++qMyCf5VQizJ0Y6hHBHfwEgiNrPf59uYPlZoCDUCO9vhxTkSD\nJ7/J6f+PSSeqofhdoL8+X6ZE6IYU4BOux/SHApcS6WLXiuX0ow/+5xKNveKT\nbLv/Qu6ucrPSRf2xBMiS4RNIV0bP97J7nHNgtfUApnyqLEpy4gkW2Z/qCubx\nPduS/tdWCr3abKWzkv3ozqhrBj5wWItjYosNxdh37hvUvK5Y3obwhIMuk4iH\nkVCiEMCRl/jAIcEc1URKfXafZFHA1XAWfai1Fzt8yhQkWkm2KijZG/fygjfO\n+sAccBT1okzIjkUHiHUTacvpyyVqAmZi0WoZNofVZhTlEUSn+XEdxlgaHfyK\ntqjii4bhIHvfll3A+FCNf9KqfQ/uyTZqxYquthVNMPc7oHTaOXjy/6yOP4PU\nijoRWfqKslbltBveg3QyGjuhRhHFpx7Ve9tw7jXbuq5zNrmCZEoymh+64cbE\nQ1vlvzBiDH1iCufeQ7Qd2kvPj5C+lkhravDcnB1iTSNDFmr/fYAs2/17+7Yu\nJ+XdH1PrMsbM59WOKYHAjVxuUfGgP5h7tg64s08h1GBPFXaYRgFGqSzSVH4A\n64tQ\r\n=xLrI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7b2a715e40e972b08705079106a097245b549043","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.2","@storybook/router":"5.3.0-alpha.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.2","@storybook/addon-knobs":"5.3.0-alpha.2","@storybook/core-events":"5.3.0-alpha.2","@storybook/addon-actions":"5.3.0-alpha.2","@storybook/client-logger":"5.3.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.2_1569332879748_0.48964321343239936","host":"s3://npm-registry-packages"}},"5.3.0-alpha.3":{"name":"@storybook/ui","version":"5.3.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"99d32edc30f262cff3445e5c9780f5f9793253d9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.3.tgz","fileCount":86,"integrity":"sha512-1KhjFOfaAa5S83U+8rsjnuR7dOHjK354Z7oL/paxAxLQkkeTL8ISMwGfXgQ3jve+ZreqB5h9eRoGhY3bVApoDw==","signatures":[{"sig":"MEUCIGiBgdv89ED1+b9PDkYiZjrmpsMtvLZDYj+InsT64jAtAiEAms9TotXtsSOHAvYEo8ilagANFJfDF3zKanBqPlPfMHk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi7SoCRA9TVsSAnZWagAAgSMP/1eqmsr/lEzpV8VkkK2E\nBdL3OzUjffoSz4vwHN6QJ4rZr8uN22xz1UlC9F14ese/x7XGhBbR2DQ2xS3t\nGbXrWTi90CSaHOCD7ayORtZquCsR9MYyYMC1evXlMQXaB83/6kNkr4p6Gvgm\nIUaJZs5ToK0OLhIgzi9K86aN6yYLEqjErCZmlARoXdpXz6DIYw/yFTzJJs0Q\nBe6mUOTxQF2xoh3wRU61chhdzeW32jB/Q4rqES7juDuRXGSUrnQF+y0W4v7b\njxi465xPyBjQJutHqR8iH3VbU4xOxCTT3LdAhBWEOs0ezBVtTPzuVYtsLGwQ\neccTJ/4LsXqrWxg8VqoubR/NNViNxYZGjfzV0u/grV962IDGmx6VtD1N+u8i\nxVVTjWiOLyvHgqT8wxyFGrhXpaYOORb4N3ZS3u4KXDleZlf/zn3zOHFVuH8I\nkvQrBEcCyPULrJtLBV2uPH0IWU6I1rR7CR6ed1ZLgEraDtDIsZSBNtCwGfuG\n3dqDYW0mr0Uhm2Vd36q5n1z0SvULhth+tQM7eLYSSjWe0Qo7c3O4IlrtRgnq\n1dpOT7UXV6K/ytVc1MrABqDz43TpjtkkkRS8ljibHOxk49wXPOTkhF3QMJW4\n7EPVG5nZN9ykhPkJs1BR2WIgZQIr+pvFWPa3dq+m/sLVHMGOFJIi5Dc7k3Wj\nrE/s\r\n=/LFB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4f48bbbd543ea2d14f8c17cdfd38f1e27e019251","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.3","@storybook/router":"5.3.0-alpha.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.3","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/core-events":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","@storybook/client-logger":"5.3.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.3_1569436839623_0.7026989746124346","host":"s3://npm-registry-packages"}},"5.3.0-alpha.4":{"name":"@storybook/ui","version":"5.3.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d611b8f74fc1f230c61fdab927b480014d6338ea","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.4.tgz","fileCount":86,"integrity":"sha512-2KyBWcTgRbdPapkmbiXN5tyzx3/k0MxebaccuCe85m5/HJEmTu0uf22VRT8l7NYcuEm1NW7YiWTkwuEcSwIYQQ==","signatures":[{"sig":"MEQCIFqheBmQKSxjvXh9X68wmmdJyBhar/VhFhxPIAvSTejrAiAso9OZNruDcQAciCM1Ga1G43aTujYLUeBqDAS784viAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjaiRCRA9TVsSAnZWagAAkQoQAJ/PZgsFj7+OTSWWdZsx\naDK3xwFOZufS2a8eDBvpp6eUdpOjlC4wB2KKq/okMzqqHt/Kcer5GQ44TNBj\nPT67AabEJLypq5Q/Qi9RTMBmA9P8DIWhwZGEmqFX223DXNOvqf269/H+wYt7\nfTaNf2bTVKdbQ9sz/Tw33fXJmyEmgjovPk9czQrHdLKUFMD8MqmTa+YBNKSQ\nyNIxWxNkK1hLXqve5tk7cvDvbQP9ukdI9yGoIXwJD6bllJ1fFz9CCz80n6bx\nrol8DVnSBH9NwTEDDHgE2Xn89t6M+53+SVgNwXF8r7RMr8+CqH49/EF+Jh4p\n4UOhl/cC341vAAYI1NJkNip7nj0YVl1NeQ1hXln1CFnq3j025x+5LxE/4Nxi\nmDgYk5sEpeuuOnjPccavkCGbq3Hu5LkCJK9YnZlMgY0NWNC627qZGNhfwNPR\nQAr1Oxbap8Fk87WJ2S7qZfBQvtz/O9Osx0C7lTJSfTbfE65BxgdBAGvAa67Y\n5vEvG45oEaP2W2WmJ4so+SkxDmL5G7H3ebckMKoxWWKB7blma9NT09hZBOcD\nUNGJRVVwUyG3vreIwJdyFvQvAPtAqz0O/nfEvgX3HcNHCsdOtgGJtvTVPmYT\nV7BViFQJhirRhszmVhIt5bw43zBeTdptlRorsh5noZWLQ2MGxDIVkMAuPyh5\nNdIe\r\n=Is/v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"af65bbe2249174a64a43952cf0104b7f9feea18e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.4","@storybook/router":"5.3.0-alpha.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.4","@storybook/core-events":"5.3.0-alpha.4","@storybook/client-logger":"5.3.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.4","@storybook/addon-actions":"5.3.0-alpha.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.4_1569564816622_0.36169831546399633","host":"s3://npm-registry-packages"}},"5.3.0-alpha.5":{"name":"@storybook/ui","version":"5.3.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8a5fd76a3ea76739648dc7a107d959eea453c5cc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.5.tgz","fileCount":86,"integrity":"sha512-LIEcFdUV3e4nrfLv+zmh3tR7b2dz/lUUzZ9EmlzIMWAAwYhJrQGHywvFqRc3alEE9SpfCcaBP3zC2aSn5DnZKA==","signatures":[{"sig":"MEQCIFUhnDzYEfRfqrcGYiA+aW2kQkClGY0JlVOjPyp1/88sAiB5dwm9RE05MBBkZoXktdpopnGAVefGs182iPV/7ItCAA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjwONCRA9TVsSAnZWagAA+BEQAIYgV4hHjFcaHLgn6t1z\n4IGIK6jQaFE7y0xHVNdvkTfQC3ae23LKBN7jmGFx6jUkxSJr15xsN8KVL2CZ\ny2LWCurF3oIFCFawAASCTtDRIui80O2UrLK8era77l3x/58guaFG65N/kEjS\nHSQLaH6XHGG3WdKmaPwxcc0fOzWIGA6dAtVqgL4hxibpMeKhySiIIFIZuwzD\nRrx7HTGBzpTd8bJ+IMxGcbWAlGc35kci23x686Daj7Ey0xgifzWiHfatxwZn\nK/eoZBlJ7yV92J7MLB2BQAt/2cFvO1QBzabAghtNaH5KT+xxH9tfgXVLK8ex\njPMiDHiYehgTqucBIzesDy989oz9LV+fn77RvHt7HbuyieVj5TuezNJZxy54\nkPq266w+QfXS0OUl1b6ToSALnOSjX0drMVc65Qe8DdTUNnRL66QpCZmLo+7W\npq/ntakYUzCx8bVJS5SkKRfeGj/kJPcejPtvuWkzVc6UWpFdks0ubcDBbjQG\n9w/RwWJSbjdjc5UN+krp5X9EHuJiFQeX/8FY2wkmMiv5YR3qBb3v4p9iJC0K\nl39C9yY7644QES+FSfL5QotvO6duG2oK4gbL90jv7ZRDkbVPQ+97o2LF+7IE\nZzHAN5pwPIBfWS6GrUJg8jXwE7RRfXPhirpSFJEeBFjT5e8x3RoWyUFdVunp\nC37M\r\n=8gNx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"714f930342cb47a5449f0f6fa41af7c193c5739c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v8.16.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"8.16.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^2.2.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.5","@storybook/router":"5.3.0-alpha.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.5","@storybook/core-events":"5.3.0-alpha.5","@storybook/client-logger":"5.3.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.5","@storybook/addon-actions":"5.3.0-alpha.5","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.5_1569653645358_0.050608104947688526","host":"s3://npm-registry-packages"}},"5.3.0-alpha.6":{"name":"@storybook/ui","version":"5.3.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f78498b1b3e587ff7b08ff3230c8a75de4de36e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.6.tgz","fileCount":86,"integrity":"sha512-6dLKt6H1exXyk3yGiKNK+LfRYdHaoho+8orAEgZCLsu/sRQMii45dVAQ6yTXt7mKUduWi9AAzmx5MuUVev3oOQ==","signatures":[{"sig":"MEQCIGX49PpqoZeHX09TncbeIZ27DJ+1plfeKTSbUBjCmWkYAiBhKDjxbDBzcYidTObeN+hYu28YwNS8qUFL/kpeXwgU2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdk8/PCRA9TVsSAnZWagAAzTQP/2OWlIuitMJUTrgDfRgu\n5OuWKbb7q+ZpP3Hk0icVrw1xSYbDDLzcft8mMM9AffpuQ4xnmHGjRDliBfJo\nGcs5KdJgRvQfH9jjmfxy1LqAqhAFeO8aqxw6jQ4TL0VDSE0uzv/Ps8n7TEVu\n8pc0Tnsxn3zhCDknlsqnr3a+6D060NJjOeONaSV93ZXjh2+lPp/ZgU6it5do\nR5gxIz5M1JgORmAKHZV9Th/RsCnsf7k+455Gh75cHt01vw4oTup8NKqnsieR\n9ZDVUsEF9HnpZvVu1Cmjm8Q2PhGoEy2GfVCgQ5Nxeig2rhua8VdC8AXZthah\noGmIfBnwxXwWdsMf1eddkdo4des6QnjTLD8cNdorxUv7M4etiPp/DOMgEa5h\n3rUXwrJVeOBBeSyEjBeJ2Dd6ZQ6it/8U9nupyoW0FjhsgT0okLWHJoGOnzSz\n0v/URGo9ge9Q1AoY7jAWYDSNIqvcjgsCrMxhzh4mm3kONwmsWihZPZjizX0o\nEydccwCT4LDEIa6LHz3WM1Ib7bsW98Wj5YQej+1tCrTeLVB2meR+j+P5sf5q\np3d4vfnvwdT/Sl8DFHNcnAp/LL6RKnzA/b0X1C1BpyCi6azzDXNIJmjJkGa6\nEdQl7a985AVMGA/HBYcWw3do0I/ffT0Ol4XrfOjUuTUc0OI5CXvM0hqbEhXT\nGecF\r\n=b8el\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ae53acf25e494f465611684e1ab07ef0f7a664fa","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.6","@storybook/router":"5.3.0-alpha.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.6","@storybook/core-events":"5.3.0-alpha.6","@storybook/client-logger":"5.3.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.6","@storybook/addon-actions":"5.3.0-alpha.6","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.6_1569968078862_0.33110626539517063","host":"s3://npm-registry-packages"}},"5.3.0-alpha.7":{"name":"@storybook/ui","version":"5.3.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e146ae03d53a402df2cd8374644c198612325a3a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.7.tgz","fileCount":86,"integrity":"sha512-DM0VLu2/kEnwtoM6vLJutqKRWyggRznLGs5KLg4ppBYXdbsI6OLbddtMSXKAiDKEdn9+zJ68kDYECUL9IeKoXg==","signatures":[{"sig":"MEQCIEAltQLH2gnNxr9tVXkyZR3hCFI3ZkGZXsKp9Tp9I7DMAiAuAQwqPo/h5ceBEQGJCoagteOXWNLNlUDY6t3CgqcWDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlZ3YCRA9TVsSAnZWagAAsDAQAI++mOkDQ3ZEV/L45I0p\nT5kCfDcUNuKel18bbucIhA4oIbk4ggm3sUzOW2bCrUwcIB+pKse95ecaDfiI\nrszqypcH6kiDrGTN0ysY1uR/uthGrEkGoNlP1uio8FuDMFGJ4PrOm2dhiVSz\njPH5Mu+2NEPvfS3yPGybjR8fUa0kdfyiY8iPNuXvS0kvajPUrDy/SEXb/WBJ\nRP/+XFae6yE7BaKNNuY9L1tQJD+sSm29WqDxLw2QZI7iF9tGw+O0fomPr4qT\nx6GYTN45C/ggCgYV6b/j4aaihnIrE7VZ60m8kJY85/6r4ccHyQTES3+OpW+e\nGlP4uU7GpWBphejYK0mjvGyk3PlwsBL2j/t2PMMvAz1l7h2s1ExFGl3NVT4c\nd2m+mOfwiPHiUTIAgb814ZfNzg6fTTq/KxIs3Z3M+PU3krgEd6jXb70SjWWg\nMBXag2PzPglsu61c1sJK3u3Q/cVhVrUcJsnvsCkH3k0xo8TFy3AU3DTJnuT8\n77Y8cttxkVwaEtkpzUj/867n24C6bXFasgZlhIAVlYsIc+X2ywzB5KuluGMY\nqos3MXHcqJ4BztI1vFNJYU4oZHMunI7DdfiPa95ZYUbZZwWmpjOMKolIYXDj\n5L58tMorXCNpAHNJMcw9nrULmW56GEFEfpqv72YKFFSVSa+kslmHc9utOx3v\nOy42\r\n=Ordt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"43afd675b41b6541f6f780bd5eb19606f192be87","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.3.0-alpha.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.7","@storybook/router":"5.3.0-alpha.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.7","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.7","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.7","@storybook/core-events":"5.3.0-alpha.7","@storybook/client-logger":"5.3.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.7","@storybook/addon-actions":"5.3.0-alpha.7","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.7_1570086360091_0.5964283973573201","host":"s3://npm-registry-packages"}},"5.3.0-alpha.9":{"name":"@storybook/ui","version":"5.3.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0bf423fa0b032942c0cbc255006db58bbafe1fab","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.9.tgz","fileCount":86,"integrity":"sha512-hfUbVVxJgo6J2PjmLBXa53mQIv/y3jJlRNo5AlV1ZgumvV0ApGkwKv03pKSqt7LYP2QyLbwr+XsYrP7LgTcvHw==","signatures":[{"sig":"MEUCIQDwP04NYhCgRT4L3TAUs5pNvdBCRQche29fPyLOPHoSdgIgQBXgkFeFc4LJArUgM0IfMzhTiQ7xzd2r+Yp4BVmVa+4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlvhHCRA9TVsSAnZWagAADhoP/jG3ElW+aMkgtQK0ypBg\nq0o5yAsbEwVJg5dbbKBz8ZJvrCXtkxkPYKyWa/h/gxWxWjIMgVvkdo4YF7pP\nyAd1gtEyPncTPAjJHC4uX2nYrMSNdOYnxzBKA1+8JT1JBT4SpqOuJOY8VfDJ\nFq8Uu+xpRP8rj63r/FdGLFiwWwFVB4wJVSH4kihGa5mq0fHcX4e4s/2xXnvW\n5OkCQT+QUdlTufikOh/vrgMJaUEfaKXuBQiiBkHikkco1dckaZKJwUXfF8hZ\nF4bDJBOWJgpKpakGCT6D3sjLE9G6dGNhRB+Liz/rulvnVey5F37KCXorEfnA\nKHSFZ4AALUD9o/3Gvq65J2rIt2BLjv7Ogzgv6SMK0iM2d1UICJy9I0ezDuC6\nZr6YSo5CZ08x9WnL3Ka0/YTq0EC2K7DLUKMh4Ay5oagVPPR5aTQW3bRnPU4F\nH5g+chCSZ1ojTX883mBDyUxOGUYaDcYcXiZzqCRTk5eFQLhTDF5GiJQ7sTYn\nqfIo4DlMorOvM4jIYFDsOUqgbWBNzQHE+hgAY+gXPA5vwgNASHC+ceWLoNhc\n7iZOZHKSLLgxqR4NltCdY0wQxLW/2etkb9zgBEMC5opaTP5lqhb9SAhvLcft\nWe4WiFoy/0PMPQG3QvUPJE1u1gjdhA7PM7NoFJ8eGj+ezNKGwQ/uC62SbW7e\nkgwm\r\n=iZof\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fa363149e3d4e6abfa757cfad03f8fe0d408c4b7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.9","@storybook/router":"5.3.0-alpha.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.9","@storybook/core-events":"5.3.0-alpha.9","@storybook/client-logger":"5.3.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.9","@storybook/addon-actions":"5.3.0-alpha.9","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.9_1570175046864_0.17436354302456603","host":"s3://npm-registry-packages"}},"5.3.0-alpha.10":{"name":"@storybook/ui","version":"5.3.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d92224b742ea67066d7fdd4b45cde070d72bd919","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.10.tgz","fileCount":86,"integrity":"sha512-MKS7SByhVZW2OK/LNwL3fPTw8kIIwMub5PbQWqF1LfkGWvSLlxpVpNZocOtZ0Wod5NeIEm2+nGV+wAm8VbhXlQ==","signatures":[{"sig":"MEUCIQDOX9sfQK4NupmW5j1uteGTfjPvkvuVs69MXnTky5pOoAIgM7ZGSu4Oo3CbcL7wPweaFN3BQByjX40X5zzesybQPiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl8jqCRA9TVsSAnZWagAA0f8P/0ZxmnRxgYHR80cTKSo5\nlVALlpW9hGz0pjiEIwUhg4T20Z/kSjOXvUwrbCNtXbQIOUz2r8OUGw2PaYzh\n7KvIYzbfk8tUdMNBbxxU9UPyrmPB9hV5xFpV2L2uVhBAAcfIIHtfqqZnezcD\nB+68TqZG7kXcC1w5LlkEXllHBCZ+f/KM5u3bKsF6yKDGcdt7fH2khM/Gkzdy\nOYRcpg6lyeqcUu4LLiQIXECLpadUClw8mcj6Zz8ncMDKSWuafbS2IajUrYdb\nejH9EUCtf40Ler0sHWWcWMwBkuEtsss3SMoIjKUz/wokljz1mBaCRsje9c0O\n20qFu3QluDEeNglJS24qvoP4btYL43nNlp8oZupA/mUZUkazciy33eB8RpCf\nB+qJWrXuerFBmMcA11Kb6BM19dm7CTGKWVT/88idxOKlh0mdcBPCPpGxBMXt\nmQqfeb0MpiMtDedtEzRjupPdJPY5Xwh+J6m8MgY4/TM+x5pfRy22muUUbFio\n0qWBlJOHIttQCd0t0auufzwyQYiHqAo05J0vqnSS8h9t96zXJJaqkzaXUNMy\nkO+zP31DJegD21pEdblGQ+6IJy2u1yoelAwH/wbxRqCDeZ4sG6kFdNdw8Y2n\nmN618TrXaKsZ9DBJ1jKcimLvKP++sSF2W43c/n66RlNpueIfc6ZLi7nHPXyQ\n/r7O\r\n=/y3E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e478ebebfe2db30ed4014c91141cd43e405596c6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.10","@storybook/router":"5.3.0-alpha.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.10","@storybook/core-events":"5.3.0-alpha.10","@storybook/client-logger":"5.3.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.10","@storybook/addon-actions":"5.3.0-alpha.10","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.10_1570228457797_0.4297210794808912","host":"s3://npm-registry-packages"}},"5.3.0-alpha.11":{"name":"@storybook/ui","version":"5.3.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"887ac1a6964436147a2dbad8e0dc8611d1615afe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.11.tgz","fileCount":86,"integrity":"sha512-ZPXkCz2jg0htsJTEJ39F0Xez8fOwrdxVKfMXahZHVXWWCcNAAXe0NzQRJWaEjX3X/6bIAMAQdjW3ar611y/UCQ==","signatures":[{"sig":"MEUCIEkZvfiTOePCJdBrLcfWNFx+lGznpohLrwtoaZGtbK0YAiEAhnWn9HcdH+5puKvSoxlWa4gL7BbtpEuA4CeUyQs3aV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmUXNCRA9TVsSAnZWagAA0GIQAJul0q3XZTYtGg2JAYRd\nGGW7lvRFx9XI159HFrez4ubnsoI3j9JMnIzl0CP/X8jFtWYjkw64c3VQLfI8\nUR0zoRdrFdiXZNotn3Fbo5E0YzqHF+3LhILhTm6oKKMQMdXu+Ky/UAl5DbzA\nnJ5/cXERCLS5GB2MIuEgG5Fv+9BL3khb7qYFFCEu6Ms7jxBaIvXGVtbR0EfS\nnZfbr/SgpEsW6e299sk91uELre4Tezc3uDS+OXowCmUcF1zl3/nNMoTHdF2v\n2jURD3rzsE+8TgslR2/0TUVlbxDm6i6IdmYgcMPKlidAM8OQcLXiglgGJA6i\n1auEDOl9d7y9QWhhe6m+ZObfRjBJ6/iFfG1a0RK4ZxFr3+lbD0R4plA+98BR\nohkXgnb+CmywIp1eCDzo9UKeZ/xlmee6kv3QNw/Yy3c2MDP0LMno6UCF8Iey\nz21D6ee/KWax/4hOSFsk07mYtncmMS+GU93FErLNpilqpuHUMIDRh0KS96s5\nq4w92VIgaEjKVTSyTUdDDtLV6nqmL2e6KcGziQw25vDFjjweFPZZWSFoc1NT\nufXL6P8Sbq44wmEtUM+eNNqmoELfEMNAio8R1RoCfasDO84FyBtgPEuPf4C6\n3w6sgDYrz+PZb3ZzC7gkEnJFC0Ny/Sc7aIAYPciBp9vPvec9d0XDvv1xUfdI\nS0MY\r\n=273C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"10d80f4c1f0ccd9486fd1daeaf8e365cb81fc919","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.11","@storybook/router":"5.3.0-alpha.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.11","@storybook/core-events":"5.3.0-alpha.11","@storybook/client-logger":"5.3.0-alpha.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.11","@storybook/addon-actions":"5.3.0-alpha.11","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.11_1570325964600_0.46274214345199294","host":"s3://npm-registry-packages"}},"5.2.2":{"name":"@storybook/ui","version":"5.2.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0aa95760b6044df527f1cdca668183d7a9393585","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.2.tgz","fileCount":86,"integrity":"sha512-VxemD9NQvz1JJ06srN4Qpu0yPufch5t+u8spj8IedRBxXahgMMh6AT4I4NnipfIc7GeBWE60FMUSnxRrXArd9w==","signatures":[{"sig":"MEQCIBg78WI1+mjGgJbm1KU1Lt1zvxAlrHcidPS63EBYRKLFAiAeEUcKIumnmvUPoleOUUEYKSweFY+RQVWGNXHix9gJJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmw64CRA9TVsSAnZWagAAQHYP/jQkJj2JyNZPdIVTHGk8\nN2Qu//HpMCajL/+LfUufTOEtY6nRowV6hjtJEyawrCpLENA6UGkzpCisbfUw\nn6huKTaV6/OMjGYUfDF9leoN5ety0zrEURGHsI8AKiW5QN2vI6THmip31XGP\nrtVMhucnW/ei/TYYbjSg33DOKWKq3F6dL4wXgCwxWW4AzTtteUb4Q7yoWOQZ\ntNyysOGHlrIQjUNxrc+fwbiS/CsEm/Ewc7RfVQRLu8X+lkm8V+7YiP3qKHQ5\n6jZ4nOEqXSlEmb789+KG6q/NZEKCSUmvMsh822CBSceZ0zOLdExhjnCIzKh1\nG7OEqHE4oUkYDIGI4iJJQJ/laoOgZrWIieIqQymEHMeT214ZQpWJjgl+dCE8\nZcG7tqONrNOpxIfdkYguZ4TuJjfmhdB77fYxwoq2rD7aP+F5ERkdYm5RcR0c\nYEmuO/SAwiR2CIbmQ8w1ZTKoWkP+cvsPau8BvSRBv9lzz7/w0VTYRcDrdiTP\niYVHzOfy3LkHr29J02kBwppUn3OC4P7WzJgZ4VoFy5KJZF+feB9XTxvyN5YN\ny+HzUI9gjKSYbgaI5I+0VSowgFt8qUot8A+gz6wZbmKbA59Akz4YCY+dpYQ3\nWdg03E1RvNuVMyvxjBPhEQE/VE71AwWP8jeQbyqHu1wE+9bMKze0Kn3GWD8N\nBswK\r\n=Sdez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"fc0e18c5bddc69493f9a912e46d5558d4bc215e9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.2","@storybook/router":"5.2.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.2","@storybook/core-events":"5.2.2","@storybook/client-logger":"5.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.2_1570442935425_0.8406933654287772","host":"s3://npm-registry-packages"}},"5.2.3":{"name":"@storybook/ui","version":"5.2.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"35e3a1147977da923c820db90fb95c95caf47126","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.3.tgz","fileCount":86,"integrity":"sha512-SNyo5oxupb105N4Rz8O5/iJMs/THrmdvP+vsN7CpOTxebM01rHyvk51cNUwHKG1QwlZmpXL8GbtWlbvqL2d/gQ==","signatures":[{"sig":"MEUCIQCxPRFzqedRtLomkRCl6trvH2o3pJ4l78GVNfnevKsqKQIgXSMFeM0HHA4fl4fHRSJZFYwkmZQhk/tB7nFjNgYCBs0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmx0PCRA9TVsSAnZWagAAwQ4P/3ejxNuUCZDVZnsfvfCj\nOGcZ4USAlQIXfO3lP989sBWAuKI4OBxrZZ9NrQoUVi2oHBd9ck56z1OUo1/u\n9BKK38rzbhaNHcblpulI9HXx7eGXkVKO5KcJHXGheUUZumyN2tMnT/oIayEr\n9qZj4B3nKa7gPcvG18WW7VDYjBeepd2BLpiHvhSwkdqQWKjVxf9IDFwvcdEf\nqWHsEEdDnmGVqpq/bzC2+z16DgQGlDkpRsPH+IajLnfu7pbuDlFCVG0Qyimz\n/zmdKB/Biz73yLJ5d2Vyk24KhYKrEJ6ZQAUsoZZwdBfpdEF6r7arrCBBjJFG\nhFbajZ7+Kb+40KDBTlyjrd70ElEErfG94dfZo6XMMBUHVftjiCvcqYN/reI8\nJ5FglRn/RBVbKP/BZujMH5mds3hG2vq23Fe/RcBlFBfkf1rlBZaibtVQkpWL\n5tt8SJay621r7rBweGcYtd2pR/kqnDkCbM1I+70+1EuDF1rbN564GJHN+mCw\n7cp+4UzhC6mrUuRYB986nzIw1eOqCCkT8Ezq2IYc3SUaLIh7ZlU2oq9hahsd\nm8uvJiIhhkPra+gABJgTT+6pFYwXACSMBnjy2lzH3k1rIbmLVIUzTYBPkyQj\nIioL7OX3EC22FHJVr8c3J6eVeijXxzDoRoYckzSCdm8mc0DgeNDzNpc0fOEn\nKydP\r\n=gfIL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"836003649c127a04abe4e0227e774371dc5f87df","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.3","@storybook/router":"5.2.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.3","@storybook/core-events":"5.2.3","@storybook/client-logger":"5.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.3_1570446606333_0.9753367880933101","host":"s3://npm-registry-packages"}},"5.3.0-alpha.12":{"name":"@storybook/ui","version":"5.3.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e458e7f7046834b09c7cfd9fee458e68f78d334b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.12.tgz","fileCount":86,"integrity":"sha512-JTX9J6sl7ceNYoKc4wm2wR8fR1T7dE58L+j7BqgsCtk5g+Yyf/m8irkaoQXSnsErmTiQ1p7Nwe7QJcGydh+u2g==","signatures":[{"sig":"MEQCIEf76FspZ+Guy/o5yMfWrfP7GmZDch6167HNYikntlhiAiBEIhi0Ntl2uwL7kehQffnITpIAKYEbBSVpe4ispJiZVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm07xCRA9TVsSAnZWagAA5S4P/iG8GXqwSYyGMmmEOIIQ\nthLVwp4IgJFFZBBctAGwgcuvDRFICBeKpyUILmPK9TU+wmd7n8pKOrzlJIwY\nqZRBKUF877+Zk3X1nwqMR8cMPiFPGXS99nVLfKDwGUZa4bnwTuX4Vr+m5ADE\nSHTMEvw5OnnnBmG3JfEz7S+w8Qj+nGBup5UcevjmZYmJt+EJ1N0IUTRbAhBB\nb9mNiNpboT8TEzBjAkCqkKIWqCuGJzv3Lxo0cSCkptSExW0E1/FuLFiQzQSR\nsYGQsjKXcOEyNZMiNjkcZFpqgPaQQA4qMLT5PRLZLqgUEYPB/MeKNxyy0O/L\nhfb7cOmruMxu4YTSgzcqBZyktSHUWqjhgr8mZgjdNo4EeGz6W/Bb+gSCfqIP\nnk0wJMYaSEjMEOKh4QK/ldbtYAZhOcUbKjxUDgrAYmsF9lOaiqVj5HjGeqUL\nJB8CZs0TcZC/pDl5uBzchLmz0zdEyn0dKS2FPf963lO18kPKeecEO79GJlnH\nDzGYDvw10wPtPQ29pnrrAJdQL0wxg2JWrwfth2s9qXe96UWip0+ro924jLnj\naE4m9wD/kQsODaAtdpXl+qh68RgayODQwolleRVZLqV+84E50xiT821HWHj2\ns/nYG4u+NC2FG1RhbKeKFl4/7E3Qxcy96V1SW24shMpAVZ4oh7fB85NYQX5K\nc8mt\r\n=sags\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2e87890083774ae5a58343a263d248b019d7161b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.12","@storybook/router":"5.3.0-alpha.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.12","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.12","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.12","@storybook/core-events":"5.3.0-alpha.12","@storybook/client-logger":"5.3.0-alpha.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.12","@storybook/addon-actions":"5.3.0-alpha.12","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.12_1570459377165_0.9156679406114796","host":"s3://npm-registry-packages"}},"5.3.0-alpha.13":{"name":"@storybook/ui","version":"5.3.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6fe913dc1291d8138474d0169328c5136498c55e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.13.tgz","fileCount":86,"integrity":"sha512-wLxtzeYcpbhbvaQv2TuRZwqpW4+1P5IWKwCRby6vUJGVzqTP25WWcx0TzyatiwrlVZjlPyqVGBPZ6naMSJITwA==","signatures":[{"sig":"MEQCIFDWuKQDgNa9Kbrltdk+ILfLMCiUdODCorO9UGTX55ZSAiBW/nwVRKa1X3HLjMXDKJTDeDHape78ckavINpd/iRx1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm+jECRA9TVsSAnZWagAAO+gP/jk+SOea5NgdQEceKHnb\ncXBMzuEY41P/zyTrMBJ3INKNoYz2zYc1jVh2MPfUU8vVVv+tubyE9rC4zxTN\nCC+TRa/9H7spXimqZRCWC6xkAuraU+JIl5QN1ykvt7m1FtPWd5qRnEbFxcCA\nbDKKAfeYfTi52D/rIJuYYFxUOMYqoKy4UFfdBqZ/+uQkfVt9dpklJx0Gue3w\njZwBZOaH/3CDdBzp8u5BnWDFeGCiGeoWw3+tcqGa/JeAN3w712t28MpDP4QM\nh7yCnXcaaWrMv6Fdc3N8gLpy4ROJGeXa1e4+TeSO/lV37WFcZawOlmLbOqBw\nru9HFndCpntzC9EtQAaAOvNQeH53Lj1ldZSBvdNbJyQHzgKJvPDHzBzyG+9d\nKSHogYHmn29JSgZUpILU+Av2BQIqiP+H6UGBpY24rDf807ASa+nb62g9hyMo\n6aI9+MOmoU/vkwLMCN6ytRWvrvfITM6Z8vfPpzHlZdu6719mj0WgzTW5Ut7T\n0PAuc4jqxMVRUir9IuG427SHv4lWfqFHUf8WETsmAFV1Me1f/sEQhKm/ujHw\n/j3y4CmXLJZI6jutLc3MYDIZrsF0QXKJMf//mqLL+gVQrCsYQ3i2KWDjpbxx\nWpzAIQoziU24jJOrY7mvgI6dO+cSUHKt6sGqLgRDNTyn5yjIQZ+X1x7D6JzD\nbcdy\r\n=kiax\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c9d58fae8155fbac9552f3c6bee2347f0d1244f6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.13","@storybook/router":"5.3.0-alpha.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.13","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.13","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.13","@storybook/core-events":"5.3.0-alpha.13","@storybook/client-logger":"5.3.0-alpha.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.13","@storybook/addon-actions":"5.3.0-alpha.13","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.13_1570498755479_0.5126900088668149","host":"s3://npm-registry-packages"}},"5.3.0-alpha.15":{"name":"@storybook/ui","version":"5.3.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6b913ede0ca8a442de4cb164f02ff2d092a36770","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.15.tgz","fileCount":86,"integrity":"sha512-H1qL+av4dAMRMj5I63foHFb6N4PR3gj2E9F5VCBBqnMSwyxwMmCLVInPXbRqzj3YsbUROCFFtDfeJ9tHog6oYw==","signatures":[{"sig":"MEUCIDtahjEuxfQC+FOgiP5G+C4BEQAAfWUM2AlM2kcipfd2AiEAiNgLyBWuU3WvEHnQq22J4p6X5iQN1n1NIciDhNynWQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnGF8CRA9TVsSAnZWagAAbdsQAJKCvyY3hDysl4K3D/1e\nRWGwnY1nZtaqzAhyCsdy7nHK8pnERpXOF2+uhAchIlYaAITKCpWPJU1iTvI6\nakmr8HjHCcozgkwu04Gxn4sgGi059r6XBBpERnjVqwcKmg0+bnUez3T5ediQ\nuz2MAbGYsym0W/Z6vyQ8PE0Oo71WUncgV4+337RvN16ChW54ffORgch2OKtX\n3R1HPUrLYOtdA7OL9wfXWTNTumfrZpEAEeMIvrcAn7CXxkRyLsbgGBTBdIyF\nmD578Swe3lFm6Km0q5wLEkDUBJ5y3uUim3lsO1a04dENuZQwvj+8/M705j0F\nPx7uaOSluMESFB9pN6r+I8KtM4HIJ0OZOwh1RI2s6iwMBqb/+XfHHML0aHtX\ndmD0yQ/LdDoU+PTRzSUQgfqsLE5ePLJp5s3WLWqz6e7RuhkbE5/1G1Og9dE7\n5KEIiF2wEUwSLTccWviAMYXICjgAr/IbeX5pq2TsYgQbYHeKqqeSscqgIb9k\n7kaMDMbcOvlvxUW0vnrhLGMS9OSTF8PmrFoSmgJMU6S4kncM6vwcq3HlSffB\nrGR12ZmVQB8+6yIpqkcMACPI38um8Oj1JPZbkulVLQwSCyFzjdC0gZ6D6gJ1\nkKK7QNdvlE77yrekolFVKfT0ht+J295u0qoNAV43BTmDfAHJAy8hQyg7U+me\nsy1R\r\n=I/Li\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4bd4888de89c3439b9bc2a39e725884ca25dfe4a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.15","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.15","@storybook/router":"5.3.0-alpha.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.15","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.15","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.15","@storybook/core-events":"5.3.0-alpha.15","@storybook/client-logger":"5.3.0-alpha.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.15","@storybook/addon-actions":"5.3.0-alpha.15","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.15_1570529659385_0.9577334408131164","host":"s3://npm-registry-packages"}},"5.3.0-alpha.17":{"name":"@storybook/ui","version":"5.3.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9de9b3a8a9edd5e2903d9d225d920d2ff87ae0b0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.17.tgz","fileCount":86,"integrity":"sha512-g1DRp0D+3ivibVA5TDYfFduongBo7NdR1rPm9wGdqlYu8d82lgtD20aBd1e8FIZvtXi4xFtrgvboF4FCJ2n4Fw==","signatures":[{"sig":"MEYCIQCl1vhHFa9IKc5Ot6u/6uIo0E/B5iQ/6u0swUpqX0kPhwIhAOcOsyWD3X4jEdUXQ+nJ/slMcVqYnZJbqeRpZplQ7XR7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnrjECRA9TVsSAnZWagAAlJEP/i3NP7vhoOjv2A39zhLW\ncw9vgIBstcRzLknrnQs/daxxjKLHXgIt8ie4Toyxc9dUhAImZyORDq4tr6MC\nejIRaSUaGFdfYNF3KI0TlMjiN6OyNTLjO9Q1i7kophWTpENIOglIMo18WGUD\nPNotTbyGos1trI3IcULC9aITkBRs7Z0dLXN44KGnpvaOKQ7P5UADDfkI/8kl\ng13RXyzV6sAH4fDxgsC6Zg5/kmmXM4WAuuyPnwi3JcgxcBCX+QXSh/OGyD1X\njPV9PYKEnVgfQBhNXjnvDEMdUl//+FVNypEHsABBiQ5WeTOsBTg5PyY9Lnea\nFIhKf+UEWo2Bp8/fbB5NnDxONH0aES37BDJIQsGmcZjZPXWPWX/xQPvqja3j\nb4ss78r1mUc7jyDRooE87r8v/NmRkalMYMPL1QI0ATstAlQIpdPgmkNNc8nr\nMsdR3ebuLIA5yu/VlJGepp9tPAP3hBfO6BesSrc+xMsso5O8WzKw01wZHP2+\nMl9czTyAgAl4XlT7wevSeoUu65gjVbY3jtvuFSQ/9vUNnU1+c+32hOh77pT8\nRVq7+iw/Cns8yTUnvJ9ae6+XVhkoudg8q1pqA21U0tSRN4Iq7EX4o3sC9uoJ\n+g1nQLk6XSXjkJYXQxFrzYIrv9c8Ars+iixZkptVY/K7uMQ9iLdcwtCdSOfB\nOi1O\r\n=PEp9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a simple function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Simply change components at the `components` directory for simple UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e1150b9396395c7afac0185785ffebb97441bcfd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.17","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.17","@storybook/router":"5.3.0-alpha.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.17","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.17","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.17","@storybook/core-events":"5.3.0-alpha.17","@storybook/client-logger":"5.3.0-alpha.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.17","@storybook/addon-actions":"5.3.0-alpha.17","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.17_1570683075564_0.5959722782183816","host":"s3://npm-registry-packages"}},"5.3.0-alpha.18":{"name":"@storybook/ui","version":"5.3.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"de9aa0c0a28054e2989a7e9c6165c1283a2aa989","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.18.tgz","fileCount":86,"integrity":"sha512-Nw9n4wb2RUc2pdLAnZBox+E3Jon2SzNrI68pJzMAz3Hy+qfmevmoZlwOO45cXdojClNcZEO9hwwGO+CIHmvAbA==","signatures":[{"sig":"MEUCIQC+BWYhVje9iDu1RswDXJbJ+jFqL4MgLLO7GJme8/VrEQIgd/vDBhGUsyZpMHsbW6LuMqhNail6BIdNIOu64BFZV+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpCneCRA9TVsSAnZWagAAbn4P/jfVbmRJr6T21Jd/uJ3P\n9L38+GsZ9DYLS6NKIMrxIBK6/N3x65fvXCA51hwOXXUIqmceZI5+AqfPs+M4\nMlMypoNMw4LS1vGHC1yQJfZb79iHNw4eAbp33nGkpMb1zqqw8sBf6jHC2scK\nO55Z8Sv6tBFBBj0DGD7KqnuuQHJsQ8ANhZ3lFW6aIo7ikrw1kSCInTkhJ0gS\n2fRX0skM9UYNHFvWlHiDGm0UFeC/UMrLrNEaKPGCEECMl/Jm7BTcaXgySbUl\niPIEja6RX1Exo1XzRyFOVYV9idud0KFt1PT1vB2YCmOTA8n7YVnBQ4MF0b/m\n+vQqIpPTtnBpEBvSJ/c6NEkg8ZY+Op5FqoANnjBi9BSVNKNPG++FLfOWQQoQ\nUvqM6gysqz6FS29T1gc5/5FEPMCxaqO8Gg4coRpO/tz5sJHu3UG95ORgSjLV\n4s+awgBXLsccBObnwmyVINvP3QOuso/hctMUoSv4/3Kx/nWNuuMFzDBgTKTE\nPP9xNOR9f9zipO5sLdy43tfhfCYQy4YleCW12tRtzy0kfJA1iGh7TljpPqoM\nUVQxleSaJU7GpKFv7x5cu4CxuUABHr5051FCJf2MkKcFHWYA8a9nw/pcR0SL\n5dVYwADCnRKuhDF0yVNEOT/WlmNZHlioOHbQCFJ6ZbFZMc4hFjXMhFzy7WES\nUBVw\r\n=KF7+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1a951739bc2b2d85f56fd49381174a4924b0aa5c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.18","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.18","@storybook/router":"5.3.0-alpha.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.18","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.18","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.18","@storybook/core-events":"5.3.0-alpha.18","@storybook/client-logger":"5.3.0-alpha.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.18","@storybook/addon-actions":"5.3.0-alpha.18","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.18_1571039709676_0.14424912203335816","host":"s3://npm-registry-packages"}},"5.2.4":{"name":"@storybook/ui","version":"5.2.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7116c9be0dcdcc5d5b425d998263de1e27cdc078","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.4.tgz","fileCount":86,"integrity":"sha512-zsS43k1h4bWEW6oj9FNHlUL3niHoJJ8v7iqYbRtVM12rxrYhV3K8TGVG3LCuNB75i3Be0Myy+/RHA4x9kco08A==","signatures":[{"sig":"MEQCIE57cW2ZKgCU4h1X462sJMsoogRSmolk/K20Qi9BAD5gAiAVzAA+P9btc+PNruT9HKMRTkwQy9c8Oln+pK5sOSkgDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpENvCRA9TVsSAnZWagAA1N0P/2Mz2ly5FQWhoIrut7V4\nB4DDzt5RyHECf52zQb935xFEnJCDAP2IoGN2+rHuiPcv/m4Lo4PJROJ32QOk\nUMNGQDWXwaby8k+0yyMcME0vAzx29HzcYdy0OHcVSyICvOUPOM3pjAffou9h\nRO1xsy0njJ/qTK8PYEeCfH5IUUZd2Bs5mlY22HckqANO0eoONk9AOCJCGZeV\n0mPJC+dJm+PZzSMYchFVMBAMSYy/vkW8ANZ+swm7huf17blrsvHgP5MJ+pEN\n5QgWI71CYhYHo2//NxBN3ro13/XION52DGdPNtd7TJvu9P+CACTBUPdSg/pu\nZ+pxx4GDtQ4nSpjsqAuOPl/hScXZjgLUhg2WotVSySXYbWTJdG2K6TQLd66A\nmoucWs6RleWoRVuamQAUr6gcivquJkNYSe1MbcV1wBAvzElVRomVLGjWlhUU\ndXAiNDu1WLjPjizI5q5QwocAbOUtk/kL6O82SK09eO8cGKr+RQw1ae7Ll8cp\n0Xb6t6QQl7JcUTIl48t6DGcVU55gvrjpcwgYPH8H5h4LeibBnXKfbyVx89na\ntpFBsbJ8jj2dET7DnZRYyh9BHMa370XhMZ/gNlMtXnJM04zYXX4dVl6G9pxC\nKgZB6mOB9XAxr8F4iQEKPxX4kkkPN4PAFR8OZbAJwPsMdhw27MuB+66FRY9h\nTgdb\r\n=80N3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"847110e3bbe21892c7d27d01f5d4d2f386e03e21","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.11","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.4","@storybook/router":"5.2.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.4","@storybook/core-events":"5.2.4","@storybook/client-logger":"5.2.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.4_1571046254351_0.9068768874508653","host":"s3://npm-registry-packages"}},"5.3.0-alpha.19":{"name":"@storybook/ui","version":"5.3.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"44c295294eb3a94de21cbc7de16cdfd2c11d8127","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.19.tgz","fileCount":86,"integrity":"sha512-luRQQ8t+EMOSMp7JWcGxyBE2qe03DkPb8KEHBLs0a7FLvqvNbaX/uEA8T3XZYiQSQL0XSjmTA9cEQBZYAlJBzw==","signatures":[{"sig":"MEYCIQDvMRX0R+/oilcRz15C8g2KasgifMUL0swzR+RFKol5DwIhAP36c256lg1Yasn4ryvcVJz+EL65kydfoCP3NlaJX99c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpLPICRA9TVsSAnZWagAARh0P/iSsiPI/Up3S0slewyN0\nVXfbzMvONI2kg4XxdKnTkWCRSVoI8izg590+Clleblqsdyki1nslDesSwy5V\n+vNRsBSpKUURxjccILL57C1qV3V7omfkdYvYVOXIjLWF1X5+QBDRBKknhFBi\nHJAL7ste85+C/7jqDBQD0EyiqSak5npazOc0BTufCrt+0U5iVOxgzCR4B0Q5\nyWZR63lyq1INEQBWemJ0dxoydshhmY0RMru0XOh+uDY9kkwc2o4yZ6cv3Snb\ncowxMcJqeplmKymO9f/FG2LRc4ihrqyEIfh63MFiW/K11ZiQEnOh9MlAs0Oq\nwQ3OOnNEQvSoAOVZ4jyp/nGLj9vBHItr+e7xe1+c+5MKV2QBMEIvjhGKLfpU\nLIA4DgBhvuXzAHFyo7whxvO1eFDD2avaL6KvSYV1kRMUUSmMxvLG/T5ZONhT\n7+87aUfv7SqdJ602PBcK2QvhLXHvfyNo06lekelnRI+/bf7W4lEcqQggLTj+\nGexjLQ64G5qA++iX2oVd6Sr2XGbIOd5zdJweVoDm4IC/Zn9Z52cRiEVjlAo3\nBNxdCafKmVO5PU1flnBaLP24yNRioJSinAbvR2p8WWtbNZaglp/leGMN9aeI\nGfYaCg2ukiGgzb+5912umEcI4o5NpjdoyyCxWT9SBNSKDjAhbf15wHscBIVC\nMdAR\r\n=W6TV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"396d3ffaadca027e89673962e05053289ad4a8b8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.19","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.19","@storybook/router":"5.3.0-alpha.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.19","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.19","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.19","@storybook/core-events":"5.3.0-alpha.19","@storybook/client-logger":"5.3.0-alpha.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.19","@storybook/addon-actions":"5.3.0-alpha.19","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.19_1571075015379_0.9813990437011915","host":"s3://npm-registry-packages"}},"5.3.0-alpha.20":{"name":"@storybook/ui","version":"5.3.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7d9a69b2a7eb72ece13b0739bf0842769d701ad4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.20.tgz","fileCount":86,"integrity":"sha512-8cyvczoyi5YzTjwE1ArIihBzE8lzmH/YVArB2RDHbYF6NDLDzMlW3MWu/n3Uh2Z48fjys2lpTgBumU0FV+sKJg==","signatures":[{"sig":"MEYCIQDwgab+psE5hUsrpglUpHA7xx+dKK0/ePseI8oLmNkG3QIhANP/rP9tFblvZPLFBD8ZWNw0V4QRHdirqk22XDElz1qi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpaSjCRA9TVsSAnZWagAA4soQAIWIsdfTlH3cvFUnIyHM\nnPJ12yi2x7ZBgHBYlHRrMlAtaojOSgDN/FaeMxuPuX/LUISOSr1bOozgV3Vu\nGuZ9OCpBAFXg2B7blCrb2pZ3ScJ9oC5xXaV/5UMfTDd4qjxx02FHCVkI0VNS\ndpYvzthouV4A5ZdHW8mY9tkzND7XePk5s85MA/Z6ltR87gcTiiVOwufM0/1+\nUb1R8WLGSoJ/gXbXteqYXbi70dsOG5U8UsJPiB01qcujTpvHLhE1EJLAYRjv\nWlBYR94QJGwnvNDwGTGGT7vRYzxMCFbFp1XyJQpdVMG8mz9BlF5Sfi61dh4N\nQnGIL2Fd00lFKO6XRw8RTabyQZl5Tl69J3dlhsp7PfJFMwiNanIoH+kE6Omj\nkgURIIJBMoaGT00uNCLqnkj1rDqfM8IiNnjTOPhi3Wtc3K8DsDI2CWbLvlgQ\nZb3C7k+zI3I2Qa57jnzLWRHQU3L9euNjOvKblwzCVWqqLK7ZQN9nCTUwn4uB\n9vt8Fv9ErHK3vPWwgBWDn6njhunDI/uKJgOt+ACBnzKr5OF+rBaiL8IJG68f\neGRa3pKpy+uOX7yZOv5AM0gLHR3T0TplE1i0LZe+LgCNGEjeH/D4Q8TLbhlo\nTfB9kjJX+NaCSCCwsq011NS97R4ElSNhZthCJAluy60ivEnj7eZkTUfgFZdt\nMJ1I\r\n=rzp3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d340b29949a59ba4952ca20dbd2635fef6b31aee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.20","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.20","@storybook/router":"5.3.0-alpha.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.20","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.20","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.20","@storybook/core-events":"5.3.0-alpha.20","@storybook/client-logger":"5.3.0-alpha.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.20","@storybook/addon-actions":"5.3.0-alpha.20","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.20_1571136674608_0.7655086167355671","host":"s3://npm-registry-packages"}},"5.3.0-alpha.21":{"name":"@storybook/ui","version":"5.3.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1e446568cdcf450a51f075aa89385375083102f9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.21.tgz","fileCount":86,"integrity":"sha512-zti6iwOU61/CQOq72Ko9rW9a7RB8v+hLyyHRxeIYWyQjuL8CbG5ebB5uNrCOeQxOyZyrNwojDURk5Hx4rm7nMQ==","signatures":[{"sig":"MEUCIQDeK4Es6v3+E4Fqp+Y3SMXMiUp4TgRjj/eQhwicE8NvWwIgfvGRd5zyLQPZa7vmNzlaHOiv9dt/tlEShoyqRE6fXTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIG7CRA9TVsSAnZWagAAdpsP/is9FHVp2gYlJdPkgffQ\nt4v1mr5lCTypHXy3YovOIG2pheRsqlYq+XJd0de2aKr3uhQvTBvUeyjk2xP2\nuWZ5cWXhbom3IiC12/8jA9rjWAzuV2Op+KBZNRCqJaN3mXfTLJ6J9qCbwYlL\nQ9apEoRN8zVdJ9ZiTUhs+vmAyQJ+R6OHgrGdwH7hzRRKJ9RjcGfURYOVPfFV\nJJU6iAb5L3PRcKf6iYCn+471rsjsCq1FXWbUBEnjPWAP4HMtuyGB11D5SPVw\nPqjIKtAPfA7RWkzIncO/02uIpua016sczofr02izdoWxxUWcviJnHe21Mp4F\nnd3G9BuPYm/zfEM/1FDnk09lL3Ww31Zi40s/ZSc7RNrlEa1jtFsT55QzN7jR\nMIb3QaI62U2erYDNUrO0SHh8ZKvCizzae8G9/4pGC0ru/rKim++Lh2IjmsIi\ntsCH+UFZYMAeZnkV/flGLEmOCIMV175nCeFedAtoyW87uppK3DvsZ0Rzocuo\nj4r99PbkppcXVmLbiu5wUBNLATj9mf3eFkoJ19lU0P45kVMD922Zj5UAaYEi\nVLHGsr3ir5n6olfjvf6PyARPPNnq41+vDKshFFU0r32CxPSjAOL7oKhwBxmU\nNbLyaV6nkG3rA6ahBI9QvqrbLByVjL9VSGvxv5Y5raNccrzOuEir6AixOZEc\naN9U\r\n=3yFG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"91fee993fdd694582e98b14035af282245f06a42","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.21","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.21","@storybook/router":"5.3.0-alpha.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.21","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.21","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.21","@storybook/core-events":"5.3.0-alpha.21","@storybook/client-logger":"5.3.0-alpha.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.21","@storybook/addon-actions":"5.3.0-alpha.21","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.21_1571324346759_0.27608461193851963","host":"s3://npm-registry-packages"}},"5.3.0-alpha.22":{"name":"@storybook/ui","version":"5.3.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"40f5ea9853c2d521baa0cfcb4f0f0686a60e04c9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.22.tgz","fileCount":86,"integrity":"sha512-wdJtslDuhxvrlvqpg+RhP9Wv9avbPIEWEEz4ZsE0xw3VmNFDHIDbvzGRPypXeccAwgGeB60oVBgqfY2uuLNQIA==","signatures":[{"sig":"MEYCIQCYX59I+rcX78zGZwtmUYjxxGHnH0/xxZhcN4bVGnUL/gIhAOg3pWiJAkbLIX18n20Qdolj97SFPG1d9ehdnMDWkEu8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqKvPCRA9TVsSAnZWagAALpYP/RkiwSONaUgq6j1RM6eC\nonfzgUmFajF7vPZJOHwPT0ewRaH8lixJCuv6+aKQcAL0pfnUm/0WV5vUD/E6\n9FYzKAx3R3wg5ebaERSwyb4C+S6FdDFLNl7Yu4OrEUKpsvqBNBVKWuPdEQyz\ngafdZWPyGQQvB0r3gCKHDcj+RtxDnWgvWliKFkTHwH2Av9AF6EUvCFCqJLEh\nhI+kq9IX3rqH2dssMVvdc41GGyHUj+SJWOi1KFNE/coKbijeiNmENNHQMvJD\nvfC4WBdMYiktqvKmEOU/crsA5IgO1S0PxaP4+mN74shpiFgRJfvnRyRFmov2\nEl2FFlsF58YyQjhWlbqB1RaN2MJGJq/c+GpKubRYZs/k1ZqXDqYTvwi4/dPp\nfYcxTPX4SOyAiF7ovd04Lb1k2uUJ0GNN57pKvdKXwtrB48Gsw1lOkYxE6vod\ndnkpXnLSMp0mCZrqsmn/5uMiT8qzxWDuAjHyFTDcQoe5iVH75rZ8SNyoAP+u\n4hY7zByrf7wyVRKyZhwChM3Kx5QGlieIcRB7awXuyRERlukSC9G4tsLFUOw5\nAVomYltkc63+cqzxYvI7b9ByhIqxGeoVGT7YE+JyGB9AkB5MQpudvZuMjuqq\nYpM0Gy3lTmk3WyZpwFH3jBk4U+ozHsGR0Vtmh7nwnLnI4YTrs2EhFOIUee7w\nOvCp\r\n=7cO8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"83468795dc2538213a7151dab970aa0d781fd7fc","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.22","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.22","@storybook/router":"5.3.0-alpha.22","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.22","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.22","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.22","@storybook/core-events":"5.3.0-alpha.22","@storybook/client-logger":"5.3.0-alpha.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.22","@storybook/addon-actions":"5.3.0-alpha.22","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.22_1571335118528_0.7399913873422184","host":"s3://npm-registry-packages"}},"5.3.0-alpha.23":{"name":"@storybook/ui","version":"5.3.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5fa77a30bd3fe05c9a38db309391e966f7b6137d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.23.tgz","fileCount":86,"integrity":"sha512-Xo+LPuzSpGyanf4RgbzAiFRAJJMoLgiVHyOAJRVhx8BwcWi7d8HhsW3CZ0LZv3w+kZUG3TSc1tUsXK/Km9dt8A==","signatures":[{"sig":"MEUCIDc/LwV7v5FeZ1vPDeScTXYu+/GkLlFLtfgQSJOXaE8MAiEA2xXR2xvy99zeDFt4ZM57Pf1CBPZCAAC0zF6oi1oKsX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqncbCRA9TVsSAnZWagAAKYQQAI+YREgpxEiZFKESmXt0\nr8M1rU2hWSxux4nZIBuhXynmHlr3x2xw1QpZVVxx7yhkwKDfFyyxKfIfT4rR\nNYyzz4nudUOAj0J/Q6Zl+nrFvtu5je0FCts8z8sBgFq0nW2Rdw9KpieHN6nX\nc5qyuXAs/t8lqvmSXtGvH38HnmOja58ODyB61p9uDFXezwrg6x+WpoQZw8+j\nao1xh+CLwutUzuHD6BXwrx9RAvOwjieFankIXksWTBTAkUSYCvdQ2VX8yoHp\n2FNKnGH+WYH784d3NWLV1XeUR8dPqXpvmmR70xLKk+Mi3NSxBk0N5dfJWgT4\nlxSLGqpQ9wqKlRuj07dj7TAJUghKek9xGppAA8AUI4jyqj6AYtgFoOXrMoKg\n2Xb6wa4SRps7IOeiNK4f7HKT0XUkoA3M/nCIFpxbIlLTuQrRUyn0hKE1DHQO\nb1fDXTfdXkMoA0eUyP2vWCuasX5K94Ev2tTTY2mOQRGrshW3wYknzHo6tm2Z\n6wFWX28DgaSj7ZWA82Rs3YB644BtjB0lco6O7yPFyUmUiqyZa1S44a6yi3n3\nInZuALgVDFhVm0BoKuDQu0De27H/j2J9goCi4o5/bbbob49jQomXuQLvPsRV\nBQo+TL9tQnQYFTZypOHHkAXi6tKaCrgLPzvmB3U0YesvUoxeDg11BzCIK0Bg\nKlfn\r\n=PNDV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"37c133e36ef0c518ba445720407312b6558c332d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.23","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.23","@storybook/router":"5.3.0-alpha.23","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.23","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.23","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.23","@storybook/core-events":"5.3.0-alpha.23","@storybook/client-logger":"5.3.0-alpha.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.23","@storybook/addon-actions":"5.3.0-alpha.23","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.23_1571452698551_0.7735610229507179","host":"s3://npm-registry-packages"}},"5.2.5":{"name":"@storybook/ui","version":"5.2.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c2c67216e4c808e39cdb48301cafde81b77d074","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.5.tgz","fileCount":86,"integrity":"sha512-C+5KmeTtdG6xkGXPmFDHPxTcSvVohuFD1399fnzjYhfLlRJ04ix3g16rcyDTxRtrFgFidOyGHdzCypgkdaN8dQ==","signatures":[{"sig":"MEUCIQD1XyFzN5f/D9NwlaUWKnwzloYJhuLZaWpLKT/a7Go5mwIga5HpT6PdTkhzb25/TsGdDsiX3GDjJfUbf2A7yeq150k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrl7mCRA9TVsSAnZWagAAcrQP/1xiNOIyu3z3k2JFOYSx\n0lzglxD1D6GT6GPZm/UKypmSHc4oFRwuUZvJNTljmSDY3/8ZF9ctRk0mIQx2\nn4xx3QlCJIpWbNn2gS2ZWJlBFPHEccjTz0pn2sKmvDr7FNU2uVoYvxcUClEX\nZVbu9eym6Ywh39Eq0bYsg6vnve8DU/GHnWMNTyMVb/wsfdHYTyxGY66OI17H\nFSZpDdn013xKUz5vPg2IGrsY69Z1I+TmquFfroCF+f8i0iepdyX8d6dl2TX7\nph3TuEF/y1ibBSYGtA0/3B4TBVWw/sBOevryOcPWcBQMFkTCYF0SpSIaVnpf\nVAZIDQ09xvIG4rBzkWNqNRzDAWCLepI8+Zzv9mE6aSMVRnY9kcw+4u/OS0Ce\nvbeEAPwrw7sHTaeM+TfdHWkQJUF8dsZnPFeHqx2vszhQTYYzedUsSN3BLWSd\ni+rBd9bq7EJII/QuFC+Zp9Jp9JLTL3M2t672lVG4P+WOtWkkXJ3Gu7LAPD0s\nDQ/WvkFkivq1iXtLHuSAf+VY2EfTALMLLO7yoh9XPHs7PN0+35FpV1OWnf2l\nlVOaKkJqQiXS6y5dsWy7V+8/hYbXAacLukR3oOH89ePn6qc970Al1YhV+ZMU\nukeIsdXh8//63Pi9c0OZkV4Ymre7nu3SGBJtCSLcuPAFyg6RT7c+AeXnP7gS\nS6dY\r\n=Kzx8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6e80db697f865f833cf3e250573a7ce36e0ee02a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.5","@storybook/router":"5.2.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.5","@storybook/core-events":"5.2.5","@storybook/client-logger":"5.2.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.5_1571708646197_0.17843259962437497","host":"s3://npm-registry-packages"}},"5.3.0-alpha.24":{"name":"@storybook/ui","version":"5.3.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e6db3cf248007d9570af7b8a3b08ab89a178466d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.24.tgz","fileCount":86,"integrity":"sha512-P8DKHdWGwA4TSVpl7EBUhJlONJpnRWzA0wSyNbeUBhgJdeXL8tbtR/TWCwysbtbuVapdaOBhAhUMqLN9Q1Hq1Q==","signatures":[{"sig":"MEYCIQDX3iRI4DMRBMJBS1rFHwOXajnWwmhJsVbrICmoj4bRyQIhAIrt/IEWR/zipfRiMHzxgPLYI84dz5OGM/uHM6uimuBL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrmOECRA9TVsSAnZWagAArWwP/RCdha8KSQaH/VzmEzHK\nMHSt4AvaY3Wz/tpOC6CATwIgRSbhfKDvLMsNk19IwGzXhLl0lH6jRvwktDFx\nU6+WgnEZ9FkQs7orpRHPwRQyDvoSqfd6f3tLIvN5BlMBCViN0A4D0VcM+GSP\nc6yBRo8gIK50Xp9LtupI5jmpmE4+dSJYJVXOcQzB8jsy9MhUGB/EueHe8WQk\npkFSS4mB5rCjNwS9NuMC970weeXVLQhgI05a+TZ5H7oiMt5VIJLCvhGfbfM2\n1vnbpa1//r3t3s4q/WlJB8P4GeSbI3RqUXn1weYPWARrDty5xiprqq2p+HKe\nX0dcvkAaLQplYlL5c4NNfG99tuDkV3SWE8r/42oTP/efLK2KoT39rqWJK3VB\nWvN4NWHpkmvQ+Uc51Hs7sxVwu1K74wgIqXKjLJck1eItSy+6hWza45mTg03m\nZAKUbwNFRo0T9EQRhkeTIXozyoOHHZYzio8PAKkXxgUHGcneBRDb4f9YHkBh\nDkXJ3PkPDDS7MnWJewIPPUe09zHaQeet64mhQ6o5tyXeM+NTTaxI9fyIG6SR\n0JUKBpeJOvlcHnDFnXKAlpwWDSf4J0eX9XFjmMX+6MofPFsi+Z7+APhZn4YG\n3enug/35zTPXDlBIRnQdk2uPZTsSUtQN6UJdM6zzueY4AD+xXtA9dqXNIuJm\nUco9\r\n=ZaPr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4ffcd90c08c46c1ee6d9217ebbe03153e89fa446","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.24","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.24","@storybook/router":"5.3.0-alpha.24","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.24","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.24","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.24","@storybook/core-events":"5.3.0-alpha.24","@storybook/client-logger":"5.3.0-alpha.24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.24","@storybook/addon-actions":"5.3.0-alpha.24","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.24_1571709827808_0.6134969021129981","host":"s3://npm-registry-packages"}},"5.3.0-alpha.25":{"name":"@storybook/ui","version":"5.3.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b5f795abbd694806498fc99912c836fe307af436","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.25.tgz","fileCount":86,"integrity":"sha512-etXDeUuyrRrAG5JcXUXRa8w9lZBFqlLGXsd76k0m5FccMEPnBnw8g7QG6N8bJfwSBnAqbxBQAVzuRKoX1S1/kg==","signatures":[{"sig":"MEUCIDFFhgkl1T9RMtWncvJX+Z+zDkKQzkyrbcOWczfo22LaAiEA8ixPW+C3CViYR9ZvwF2bADBnREXCaBSdtfL3hRPh+Zo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr67vCRA9TVsSAnZWagAASvYP/1GTqI6MHqxn9hMi4DbO\npd+CMQS6+mr73WZzfAFRlWg3p2IvtF42XuoDAxAqEgvbeUiP7J6On88ZzlLa\nIENF52Id563FdbGGGgMmAsL2pFEt/Mh9+6pUx5slXNFlrFZB/4T+RJw84FAM\nZlObJ8X0gPoqfVI/lIKXFk4M/lltjQNC68EhVH60haxnYq0o0COlV5euoDmF\nRprGBZQ40tOsCcguut9klG1jhhleMqTaS3KnmDpD4EDkSjbOIV6BL0cukEDW\n2JIIaSNMODRc4WYqDZ6Ob0XZRoajHr0sXhqz2i/KeVw8Hx23oikd9pu74D6F\ncmS0ddWO1TIsT1+t4yjH8Th3IFhVE9wCIFD+NVdIr5n4hKxou988TfiimC3d\nGz+/w5/TjoRXdNGCQbi3avO0aaqf52GFk4h7xrfZl92fNXwoMaIQFEWNL4ne\nYYNakiP05tVqvq0GaB6KCUI5WP14gcHWepowAq3Hndn3dirGXM+7Vo/Ws0oT\n3sa0QWFhG/XvmkcnXst/7lieAxBqbvtb+7V6GktXbqTx6ez+XjFzhWJGop39\nih7ijm1RZ5cqjFbFnyhNZQUStBk3SE6/IafADQuTSgd0mrK9JycjflUsWszp\n5zhCUKsYz6mQI7KHBoW6xnu63azl0UKSClbqPUwftW93vEPNp6MUn1R36uuH\ntGFV\r\n=gXsV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2d1d01886002b6738c974c9529f5d043e0faa6e3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.25","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.25","@storybook/router":"5.3.0-alpha.25","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.25","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.25","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.25","@storybook/core-events":"5.3.0-alpha.25","@storybook/client-logger":"5.3.0-alpha.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.25","@storybook/addon-actions":"5.3.0-alpha.25","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.25_1571794671096_0.9456032141867663","host":"s3://npm-registry-packages"}},"5.3.0-alpha.26":{"name":"@storybook/ui","version":"5.3.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"741ad5401bd75ec89e636303c2dc373815f764df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.26.tgz","fileCount":86,"integrity":"sha512-TguIwfXNiWmnb9Zj7y+Q8kzXVbDchl4I8h4Gc8jSz8BGi19uRXI3lXUy8Syu8SjxxmbRgA+92t5pxYGXyf/Itg==","signatures":[{"sig":"MEUCIBesfv5jilN242A/Q8WnscjFMYabhdB45OPKV6eQZBQdAiEA+K745jwoe0o5v0gnHwEB9Z8ViwKXLSmW+/JRHWDcsro=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7jwCRA9TVsSAnZWagAAHc4P/0H2QDxSPhXUQ+85n2MS\nLs4OWJAX+TJZ2CzOhKlCqv3wO8MxiuvER/tUOIcrPeFYEvXD+fh1UMe3MGap\nPV3XTm/X/dZwzeRO4UVsnsR4QXwOH45ZTyKeYdRfdSqI9mj0vZlfBAGxlMic\nQgY+8u/TI+DcpDiZst4weDBmdR9MwkDKdDM2tFNuCadQ4C66vPr8jkXGkmTZ\n3LaZnK2vaklkJOKDIl1WJ1zI+kfJlyJsGUFRBvOGNF+3LCEsUrL8J4vseZ5s\nX8wlWl2Qg+E17yvxET9HYub7hRmYSA/XkBgGnACaLRvXZDadt8ZMP2uiadYJ\nD9IfjRTRxj+s2Rua1G0c6cSLxH467xonrW2E5n9axN5I9nUpblxD38j2E5rZ\n2OJFJ8c7hovfW8BuCCfCfUUjlH1bsnxcDNmfi2mJby8cM6calbX6VgpDSynq\njpmGVJcve1Chh5HJ82Lj+ZM0TBj6siemPEFu8Et53wB1RzxJhBmtxMW4CZ/Z\nBTjlraaWjhWww2DN/ofB2sMNMweRIQAo/8WD1NWtDlUPLGxMY+0iga89nnHK\nrtmyw/tPx7TkUnOiQBQDr+5wJPG8Cuv157k/VadwF82OdkGSkLdmiKv6CR4M\n3N9Q1U7WkgrFIk6nAEomHRdRZ9IRj0CvR4q3g2DCuBM6z/G5VRKon+3GNSpw\npHWM\r\n=l+UY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n-   [Usage](#usage)\n-   [API](#api)\n    -   [.setOptions()](#setoptions)\n-   [.setStories()](#setstories)\n-   [.onStory()](#onstory)\n-   [Hacking Guide](#hacking-guide)\n    -   [The App](#the-app)\n    -   [Changing UI](#changing-ui)\n    -   [Mounting](#mounting)\n    -   [App Context](#app-context)\n    -   [Actions](#actions)\n    -   [Core API](#core-api)\n    -   [Keyboard Shortcuts](#keyboard-shortcuts)\n    -   [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return (\n      <p>This is the Preview</p>\n    );\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n> **See the [example](./example) app for a complete example.**\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n};\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2']\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b']\n      }\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n        this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"98f3e2c6df7ce857dd33b739897548d331082234","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.26","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.26","@storybook/router":"5.3.0-alpha.26","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.26","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.26","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.26","@storybook/core-events":"5.3.0-alpha.26","@storybook/client-logger":"5.3.0-alpha.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.26","@storybook/addon-actions":"5.3.0-alpha.26","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.26_1571797231692_0.40343744096951517","host":"s3://npm-registry-packages"}},"5.3.0-alpha.27":{"name":"@storybook/ui","version":"5.3.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1a0d8e163b8c58f77f181c03a8ec4e2bdd9c415b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.27.tgz","fileCount":86,"integrity":"sha512-G5D54bmec6cPUnoZB+Sb1PFASUnoN1GD7UUhJZwwOMvEDdcLE8MdvqcDi7yxl2Xh+6byDToHihrgxHKr7L6qfQ==","signatures":[{"sig":"MEYCIQD6LI9f51tnOpxWya9nT6FV7R2S6b/6r357q8gx0S3cvgIhANij5sTRnGWpI6+ohkltNgoLbIqcmdka1h6EEmz8YKWI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsb7NCRA9TVsSAnZWagAAbmAP/1zyGw9OrK45Tn51jS4A\nztHVc1obpRcXbNrMBqZ18WvwTm+uR1uOojxXtGkKlxp700usg7KIcjNKOPg2\nPw3LTCSK6iGelbkcmvsKwpzfyHEqg1jxBmj0BDx9eJ8csG0xFc9t44PjeN1T\nhNG3h3miiIxMPL6sropE5OOgNf48IFHnmjwmi1PfXx8YN3OEJCtS/0tXEBH7\nd3KuJPUrLxqzOREpo4Sf1n7libtkpwa6RFg/e3VOeFf4e5aioiGPF/NQDq/P\nwNtc0lekFGeeYefK9Da3E0NxH1OYXGDH16iFGuMxtx8IDswD0Gkzko/KY3vE\n+itUmEx+0uPYhl9uIQquYwNkVqXJFWlIoiCog+taxWQe6nG21TixMnCtLKMe\nnqxGLfkjN3ij7s5sfqWLGtIVON6+gdu8HqHt5S/Sq0sNda9GJuMpGf26Gaco\n9EQKixQx+sRQB4iSOoxZ/HuBHzO5Q5K188Xya2vjiGGiAEkL8XVZxNprnyLD\nFZVFq5UMY2vMBMiOwtRxtnKlcaTM/Yw+VSu36WG+GRH59qxlJ5L564l0eqQG\ndi775eptHac46bCmGyMeX9MLneAxxywZGH+2yjKizPKseLhpLq+vUDuhCwJt\nK7knj98+RNCIFjIM5IElKlOme/CJVsqjHUh3TVZXNTkPyIBsOjt0AkMaurEp\ng6sw\r\n=59Bi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6eae4c491bcace9d289cbdb5c58b409052d6c447","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.27","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.27","@storybook/router":"5.3.0-alpha.27","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.27","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.27","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.27","@storybook/core-events":"5.3.0-alpha.27","@storybook/client-logger":"5.3.0-alpha.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.27","@storybook/addon-actions":"5.3.0-alpha.27","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.27_1571929804669_0.7211498425618992","host":"s3://npm-registry-packages"}},"5.3.0-alpha.28":{"name":"@storybook/ui","version":"5.3.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"55b97616dadc142826a02fb7a6868be980f3d587","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.28.tgz","fileCount":86,"integrity":"sha512-UmGW1Of030Ybgo3AmFi0nOWOIrlzb0+0GWqr8pCCn9nZtzfaCebQ6EEq6oTVmYDhrXmScal87elBjS9nUOP7XA==","signatures":[{"sig":"MEQCID8vTFRVhMv6hZCYA+hBgjHdNbR/a/qM1BNOeGTv/ZbtAiBe2FEh52rizwbWc/9S1e35hoQlqsgXN2xZsQbSKeXg3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdslcQCRA9TVsSAnZWagAAzQAP/2fkDaUCFc6rn6oNCARM\nVfI19y85NucOQnCN4HGBfhhWD19caBhzPES6c/jqrPG+t8zp8KBMoX7JyR7w\n1/XsWpH478wQ9tC3Rcz5Y1WwcMD/B2/TS3jhGJu3cIP19eSIpKWGyD2D2sOU\nnu5bvyoWRzqR8Muwqvfnj4Vcoj3LRWHOUgp9LemIqcU1s5YehGnUXzQJnhXP\ns5NKt8q1X3Mpmtg3Tsv3z+IlwB13wkxj2J4AwpweC+mPUiXkXUnqFQx73yBw\nrm/sqjvPENi593MHXofMzqNBtxHf0BAzUaV1UoK/m9HgoTfC4E8mweOND6Ye\ncs01KUt+T+40oqL+BMdPpMeBCjT8b0JPr56xP6DD3paWUCL9P1JGhewfm9WF\ndpfEh7x40Knt5s/pxe3FbtBwT7IdwkPk6Bbb0vyEHhr1KfZk/WwA21DIVW72\npOYtr6ypZclJIoeZBePqTNMLnZh0MYNNxgwTzPqP+EMo6bho+HOZN6koMTKO\n+wh5r857J57iBHnPnUzHnXyDhIwW1pWOWhDYrLfaeAawb0YoE/QwXYPomcS5\n2trzBhdyBa7B1yZQHK+HjbGVWKq85/W8XVKM5Y2pwURUdmxiBrFzS058jOA5\nGmTTqW4oFvwJPypa+d6Q8058/oCLSM9VnHfVXGcNsg97byNindK+/DOuyhfg\npMS4\r\n=eadv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"aaaf46873b4125fc6ec05589a8ca57eb9356b3b0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.28","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.28","@storybook/router":"5.3.0-alpha.28","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.28","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.28","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.28","@storybook/core-events":"5.3.0-alpha.28","@storybook/client-logger":"5.3.0-alpha.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.28","@storybook/addon-actions":"5.3.0-alpha.28","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.28_1571968784173_0.4808316981627121","host":"s3://npm-registry-packages"}},"5.3.0-alpha.29":{"name":"@storybook/ui","version":"5.3.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84c652718ced7e777645b75e06b0f5568d4a37ee","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.29.tgz","fileCount":86,"integrity":"sha512-7oJDbY7iWS8junVCXtqOr8A897VDu8Mc055ryh3Do4A0gWF92sosFqS2om1726/RpC2q24JjVAEXOD2PcW9rRw==","signatures":[{"sig":"MEYCIQC1hlODY/qyx9oI+Xf8xG2zNXmVX88hy/JnQGQ9hqlGowIhAIaCgA+oTo0PJL0w0158azrW31A2PpN3ISzFoLpApCND","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsqv5CRA9TVsSAnZWagAAJcwP/1fU0uj5pbjtWrkIYAwJ\nE3N75FX15amLBm+FGKqGBOTNEiR31qoa6GbTrLkxFpe1fRELtiDMzZLNYpCW\nowV5VMTY1yxDoWumV4etFvCpYgLSKxOixDE1pXTkcOleYZ9sUv84MaPbovhb\nlclUD8GO/l4KWi2VGrBxvKm3hV5s0UvZUUL1j7/g1zNDhmsxFI9DqGZ1FvWl\n5m7Qgup5ALQnKy/tEmeiY0zE/z1B6rBesqBNTnbySqNnpMCsNPRlL1PyIAnT\nHBT6NVkwNiSsLhiI45j0qYadN/fSf3Ml4RD7eFf0CnSqc/w8v1/XJnaB1Pio\nWhpMnhQz6U0jc00QGpqaVqHuffcxOFW4JMNVsqByGcNLWx1HhMCxy/8gcVnS\nnZ1B/acqaN5TMFzdVrVQiKovASMCJzrywSZRe80HYREHoBe6jmodMh+j+lj+\n4bhz/o4r0Xy7RyUtU8dhiF+7ZsomkrF5pIgo+0/8X1JIWbKc6EcNa9hlglU7\n/01uNvao8KxFAMNqdL0mlJgDgExllntmjv1ISufKkcQkP2LH/KLsZjR4B205\nax+H0BYZYoWgjNdMjlJlUjltPUqP98W4pNCmwxa3DyeSyi4yUbqWsWc4uDBb\nQ+Lm4BUhTCg/tELTQXQl+4ZF9lL0dXgYO2orC3HamCef8bllLwtfEWeY6XpQ\nXL5E\r\n=Md1/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"88a76a9a649f44b66852f28cc801581c9b6452b4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.29","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.29","@storybook/router":"5.3.0-alpha.29","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.29","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.29","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.29","@storybook/core-events":"5.3.0-alpha.29","@storybook/client-logger":"5.3.0-alpha.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.29","@storybook/addon-actions":"5.3.0-alpha.29","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.29_1571990521276_0.9550840476861957","host":"s3://npm-registry-packages"}},"5.3.0-alpha.30":{"name":"@storybook/ui","version":"5.3.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"39fee09b6e57ded39f43cba5e12099c7407a701b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.30.tgz","fileCount":86,"integrity":"sha512-3gEJUkcpIdFEA5S4qK6VBN1j3woGGTGAsirmtrHG8BlaJyZD8PVOPzTIANS/AhWH4JheEdNlMpdjv3jqPt1gTg==","signatures":[{"sig":"MEYCIQCwdS+ezW5t7142pNObZCR8DKf0e6Imt17hPSuLzfaHPwIhAL9f9jICXjaxqQYJYJeeFuNtxU6IOq9gl5nTJ9jGKFI6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtHJkCRA9TVsSAnZWagAAZMkQAIC4xzmVEhp+xMIfgECI\nnheTL/bhxVvYg4Bq7bf7gKxNb1y6FLJ3NUUG3lOzoLz4F4u5/G1lA1/5SEZO\nCojBHmjge139NuyWYPb6J9OxtxIy784QFzzc8zr49OLbf6oNQEXi//9c3+2r\nFNw69o/U3vBREOiny0S0wKL/TSuBr7g8tMUtARKmv8V+BwBokxAW9TRR07AH\nHoKOco7F2yqnfhDCqVzvSFNgkWCmgBQEwrOtvNxmiaLiFabozqrdrKaihR8c\nozNH/SzyeVAt9SXn/PaNAB2tG3XThLvdmFklLRaLhk8+ybWXdQx0UJvFhqPm\nceKX2WRsLSPbX4ZmzQ/t2OmBaPttV+/FdP9Ufu+rIQ0f8g0Fy0LD+lFKTL2T\nqF69ZyTaaZMtHp/47PQ1cW2Ch346IF8IPp3tqRiSTRF5v/tm4dHaX+ycLdk8\nSDZu6kEoZaijtB6lRtEoh+U2T0CrNmI7e5rYr7gt/8E5MKUXSNvl/BKiZs0i\ngBhTgkjWoRsp/jtynQk5IKBmwyulpiTbnlgMUZIjSF57+5RQ3q/RXipQlAWb\nU53b4kRnHW+9mcGXlDwiLVLRXsTSgZNECxJPpRr39mj/tw1THTDb18N0qV8e\nzAaxNxVk3wYl0nkDD26n3UPt4HjpcuG66aSu+s5WM2vNc77U3v6Hhq+sbDwA\nJBrM\r\n=c4ft\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2f7ca41b356e03865f71897d5b2284679707246b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.30","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.30","@storybook/router":"5.3.0-alpha.30","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.30","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.30","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.30","@storybook/core-events":"5.3.0-alpha.30","@storybook/client-logger":"5.3.0-alpha.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.30","@storybook/addon-actions":"5.3.0-alpha.30","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.30_1572106852323_0.5675399701198054","host":"s3://npm-registry-packages"}},"5.3.0-alpha.31":{"name":"@storybook/ui","version":"5.3.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b16394995adf24537f63e5706b901c60cf96f90e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.31.tgz","fileCount":86,"integrity":"sha512-tLyBRAJpcYmpE4t9XFyrPp3thmX+5i+RKbSQib+YoH3c/lyx3OtIsNuhw1ER65LN2ZA8HSwsizLKhdxyPjU7Xg==","signatures":[{"sig":"MEYCIQDNuCvipa8mM/xSBBiHgHdKbuYIaA6w9hXG6Ed8EGlO0AIhAL+VyUV50BYoqieEGALQLmx6pimBIB1d1ivyrC/k1XWd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtIZtCRA9TVsSAnZWagAA898QAIh3ujBSS7JUbQPjea88\nioPeK0O1tQozlIKwHkj/A+zj1p5NfK7cTZk1kHmJWQkGAi9BklJGIFq3qMK5\nsIF+Y6ih2lLRioHir9gembC9rjtNekz/JNTaOw1VfMaV4luZJtI3BOj28dRS\n7/pP+dLhOzHZ+xcmxRO1RFd6XsXIldKfuHK4bw/5G8V1f4KkooBzTPIq2ypK\no7RKk0IMgnv/c0fH2RgOijVQSPrthT/ZSPZi8uf1EKyXHPOcQWzXsTmPSJR2\nRE2zZhvKyyTebhIsmcTI8NzvwYpQa3tVtSQZllaYrcZQt/oJqKBnxhXept54\nIboKdvnrWqJ4luvjkdYt2LkmcRi4JzKIEbzWhzJhZOjrNKyOcEN2NM8Nr38k\nSxO4O6/KkKHSpd5op8hV3qFJ5Xp/Vt1ayYaLrjOtuMaBWMtOQZjiPxoAvBW2\nozXE1cdHXIKaRRj7v/3rF0Q59VHlcicuq8EnLQwCZAgayP6WVgRajX/jAA9v\n6GZTLqj+99O7dFO5yoFGRRxkcI0qY0jW1z4fxH8d5Pzw2uh2KUr5G9YRp2GV\nEi3vVBGdTxPZeeXwVLfeUrebEnG+oJTlwE3xIyrhrVl/t6+bcyckQaL543mp\nPB8ChQEZCRui8vjOaFur+acOscRfCUbs7VrVn1qKnAQN8f/KBqoHoL2ClI6N\nB1lO\r\n=k3x4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d92ff8900eed830ba324067d765526c03ebdf07a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.31","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.31","@storybook/router":"5.3.0-alpha.31","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.31","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.31","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.31","@storybook/core-events":"5.3.0-alpha.31","@storybook/client-logger":"5.3.0-alpha.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.31","@storybook/addon-actions":"5.3.0-alpha.31","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.31_1572111981077_0.6967058956741048","host":"s3://npm-registry-packages"}},"5.3.0-alpha.32":{"name":"@storybook/ui","version":"5.3.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2c562ccb252be87d2db8438ee7001d877d695be2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.32.tgz","fileCount":86,"integrity":"sha512-UUOvZSOCuLozRJPqwA+NjTaEEbSz/x4rfGxNhXYl2LUckG90mJNzb+W2lbemiBncUFljz6E/eTdChTQ+WMqRmA==","signatures":[{"sig":"MEUCIFl9uSzgKFvSv7UTErygknyCzvcfW3OIK9lFzj9A+ZjDAiEAixAsnrtUXjoIwz9pUBNyQJMSFdZIi+lYRwBLWx+ZnJk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdteyuCRA9TVsSAnZWagAAP0UQAJ65LF7qwA2yf2EJzr8K\n7kXnugzAtSPnfZdZDPxL93GVFHEGO3tohytvjJHGoTP6dJ1l08b88PExaHIT\nw/+ffxTlre+wUfUTTyV3WtG1JDJTxTBiqmbolBxVkkJZz+aQCZplkldipcJh\nMCJFGXDoTsoMm1kPOCJgScLiVZq1HdH8JWmKyqCxSd6QBSugXDGFrShs7Aiw\n7mElkUlLl1y8rcsy0NEgna8q2Ao/kl1Ux8EBfAFWWogzFy85g+/aQBmfQxEB\nlMv+NwS1BnBmKny9qcVgvLsuafOjyuFCl0rARsBsJFmlmPlBRIJTZ9ibATOj\n1ZwQeDrBlWFm64+iiiuF3COYj1xySm2zFFyr422TWMU+OWeyahDz8wQPjced\nLP4oeQjsR4TpCpzUEzrFT1LGQ3UkSS+AfzQp/t7XSDaSUS3xk8029LAbF8xt\ncK8LgfC9MKB6IPGo7QJcEzJte1roQub4V9GCeDkjXmATIG9w4xsY2BGrc9dF\n093eX1p3FP6nJe58sKGJ2UvbM7NOO6RupvHKvhzQP8ASDoWcQ2LUe16kpIDb\nILQPNQREqepxRoQYYVjW1XThTgXd04Soy6bPgYr7gUGvLgs3UXffD3+bVy8T\nwc+kWd76/3InSUeDE+vnEuAcdvnjRGhIKxwJLCVAQxyXcxHZRr+6LTfAke2R\nS7yE\r\n=LviD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5de291a862f2951d5bd2e8629f06e1611cba4acb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.32","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.32","@storybook/router":"5.3.0-alpha.32","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.32","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.32","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.32","@storybook/core-events":"5.3.0-alpha.32","@storybook/client-logger":"5.3.0-alpha.32"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.32","@storybook/addon-actions":"5.3.0-alpha.32","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.32_1572203694169_0.559020024061124","host":"s3://npm-registry-packages"}},"5.3.0-alpha.33":{"name":"@storybook/ui","version":"5.3.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"393f4d4929440ae90cdaac49c0c90f0bc82ecb4d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.33.tgz","fileCount":86,"integrity":"sha512-+UJOKkmPUDxk6M4iV6v2iWaPvIeOAQ0DSsfKlP4LWF/O1/vYSjkhkMs1KWnk6JR6QIrSjYtnzRi+M5zexPiRJg==","signatures":[{"sig":"MEYCIQD2J5XaNc3XCBFlXjwNyQjrfgzVPTZowPbhRQItHrjuFgIhAM1SargcBjcTSHLJdQXH6QjJaj53luVmKOtEcXSNU5Y6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtksACRA9TVsSAnZWagAA1i0QAIbLmEI3bp3dYTFfMlhL\nJGJ3a6B73ivxv5LDcMPKU35Ced+2DIYvoJBkf+g80sLgMlvChig0/qCGcAYQ\nP1mxyoY/pQSVYs4OSywWI1JesfZ3Y44E2d5KS2gGAx7TBLssT7/8tPsCqNi8\nW5MHqj0fBTV4Nmnuw5vtiZosRIInL0nlp7qBQyrNnjI89Z4lD5p6PkqOVVuV\nywotsWvCCkMhx6+3mU+a39STyjwFfrcjdlnSrCq/RHQf0G3ZL97DHhzrJq4X\nc9WBW7lMq8s431fUBWoJ5QUf/59ZwXcdnstQ17UZLaU83D2rhCmRRWxP1ZyB\nNknQQ6D4lxRc3uG9IdKL+TU0LJZGR09Ul+Z6ElRnGw91w50g9xFowACHa6pP\nU34ku1RZw4rLSHaOgggHVgzav+G5L/Wjopmmlfx0FtRzsnSB252RsY7dieQ9\neaAHWkwo9u75aLVysYNbFZeuDD5+ImAKLZ6s8/aD3UClE8QFiQ91mVHRsTJZ\n58BcZh/zdlEiKJExV4E5Z1PwBxutBHshgmZnFpYbGbjmc4V/S5XyiMhewX/3\nj/T+d5fLzvby5OGweeUE7E2mnRAD23gr/1Q9mDDIdurNrzq6D5llRxRF55P5\ngIeArwMUN1UFdWYtvq1GcfIaUm9a3YTO+GtQMQ87a+k2BYndS3LxqxjW3iqg\n3Hw/\r\n=nGlP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d7d7992bb4b2e2fa4f98ec7cdf21bccc3caf03db","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.33","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.33","@storybook/router":"5.3.0-alpha.33","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.33","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.33","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.33","@storybook/core-events":"5.3.0-alpha.33","@storybook/client-logger":"5.3.0-alpha.33"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.33","@storybook/addon-actions":"5.3.0-alpha.33","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.33_1572227839953_0.6245435697744346","host":"s3://npm-registry-packages"}},"5.3.0-alpha.34":{"name":"@storybook/ui","version":"5.3.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.34","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8e2adb7b9a07dcbd8a7087a1801845e2ae831e7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.34.tgz","fileCount":86,"integrity":"sha512-BUOZbeAWDTFIAbFuc2PLMaVTrFU6rbRRHoYUX8ZEqcpWHcBJtwFrNxWpmfkuw4NlHEmkESXT0i6muJqMOuN3zw==","signatures":[{"sig":"MEYCIQDlvAqhZPWum7neEWB62Pm/zlpQNktuKekv+WvBZ9Nl3QIhAKJ+zi5KqHzRMnBJgCCaD7d2g7LIJKg09n2CJYt+StOD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduVj4CRA9TVsSAnZWagAAwA0P/Rn7hzuHTmrYtcxFVtkK\ny1z7ERxjNXgOks64oIw4KrzpihN2u19MisUKHvrroE8dNe09xcsYJBOT/sp3\nYzh0llH7L/dXZqeBCnAD7HEzrxlvjwB5erjMtM960Ci5crQx+8P9GYzLvAmf\npCS6IYTSqesxRfOrGhN7k2oDCGGEzGR2nHxyTM9ev8Ux6HjpuU6oN/n87h8o\nV/VQUHFJzNomigif7UymldHYxa1yrfbtyx+++sn1YVeCX/v6llRNNQEIk2G/\nQO4rK5PTeTYGpDBXe+SpadHvI5aBixIIru337AtiM5riDdEjpT3IlZnre3BJ\ngShJFr02dNJ4vgRqH+cKLUO6as5iiq8vx27k+Hb3giyfW03pv5dnl5ZEu+oP\n2YD6e4tV3Uqx2JHPz54JA+spBLYzEUvsmhXvr/jYS90dliEOjiw2KCRkTUpg\n2MTLXULTumLmFgpJkcG8nLopX/L60GjCFRDUlRWG+67PwzI/mxcs/FuYPul0\n5Nqy1fHsvdUzn0hmJ4w/RaYKptjeHr2xNVrpJSFBM+GGSJGU1XK49+HkGHjx\nz+9pptrguwKvsirGKBJXAJiyI5hKzzZDcedy8wuGxlEkI9TYCkn2x/9JTZ3c\n85qmh1nPHd6pkdahRzCnuUCq91kLlYd9awA/v0slcR4CsP0EF1GFLWo2XIYK\ntRxq\r\n=TYH+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fbd809ea526e629ff95345942aebf0bf21cefdc5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.34","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.34","@storybook/router":"5.3.0-alpha.34","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.34","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.34","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.34","@storybook/core-events":"5.3.0-alpha.34","@storybook/client-logger":"5.3.0-alpha.34"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.34","@storybook/addon-actions":"5.3.0-alpha.34","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.34_1572428023978_0.8110544403421569","host":"s3://npm-registry-packages"}},"5.3.0-alpha.35":{"name":"@storybook/ui","version":"5.3.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.35","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"21951c587243aad138ae9967cd6d85173f12ddd5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.35.tgz","fileCount":86,"integrity":"sha512-H2u2bCFVS6KCzIydjlRBBB0sGWXq17L1r0K4tve7e89EBT859VJic/k3RecET7QYnw8UqWKVyHH2mwCnRL18Aw==","signatures":[{"sig":"MEQCIAqN6JMOWZvMC6OX/giBe9CXqEPTkJuZM2W1X/sp/kEJAiBYM6IHy+dHz701jTBhRmaLZGV+0XiafXGPRiQuqBlxPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu5ECCRA9TVsSAnZWagAAjkMQAIzB2Li9pM6cVvVBFNve\nAXtjrAop2Begbm6i8pGF3IiRQIQSytbFP743mssdf5DxfoGkSRG1FIPI+7U2\nOAuItvZztv3cTGsvjniyMGDa75jSdxULO5mLgy6GEwIYYhwDVBB3QcbTHYOZ\nEW0ts/4aKnSNh7H+HEAN9a1TPkU895HUScYdS/KlR8iuujuYNgQWmzsVD3HM\nw2snuS2k6BJDtox8pF1rBiAAAiAd/uTI8ARG6GdY0Ak+YojpJcxIINq/u0pX\ntPvuSN8BbgA3+Ur+rPQnBe8zkQOv+QN4BRCCsx0BBtgAYVWuJdP3R3F/7W5J\nNgXZD6rXiA9JnqOTEJgY56Vc5I1IN8e3FwPnNcCd4+H4+7GSqPhfkzDk6gEl\nxGEBeZnLdgvIDFrtPAiwhCWAzk4Bfr8KnWuuZCZlqLXMhmOhRUCGLgcua0Mt\nkwv0Yc1WkanEDy7UnoK4x/LSYV5VGZVqaWIX3+4izlQIWkJyokO9G8LbTzL7\nE2vnHXceB722QJsHUQMNp0G6o4T8mHqGODsIENyK+l+CJGH/1/ssGfdivRYo\n7QXkaZ9Nka7WV1RdZg5MnZp81rV99A40ERt/8LtAt9VxS2TntYsCLUB6UjRM\nnLQmJt1lr/K8UbyHlsxm+7yg/Ro9yuzN3hoqbcM/22D+DgWADteQ07HM6zGO\nfP1p\r\n=8k40\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f1749b5824776fd5f8bd773d0b7efc6c6289d14f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.35","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.35","@storybook/router":"5.3.0-alpha.35","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.35","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.35","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.35","@storybook/core-events":"5.3.0-alpha.35","@storybook/client-logger":"5.3.0-alpha.35"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.35","@storybook/addon-actions":"5.3.0-alpha.35","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.35_1572573442357_0.3082183770050324","host":"s3://npm-registry-packages"}},"5.3.0-alpha.36":{"name":"@storybook/ui","version":"5.3.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"659e44dd555fd6046cfe35940b7894e5d909c447","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.36.tgz","fileCount":86,"integrity":"sha512-GOyHVR9lyHydyp7VwcxP82UpDxWoNG6qte3h7yz1KO9dEp2nTMiBGng/S//1hFiY709HBR5O2YpI6I2vW7vYpg==","signatures":[{"sig":"MEYCIQD+Wd+aI5bkToFUGlSBPhdz7CrMtSdcOL710+GJ1RrHygIhAJVzznlMU9p2cnFu6VvBfPLntOpdXdm1Rql9goai+1XC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvG24CRA9TVsSAnZWagAAPPsP/3BxfxeZLTf4aZEtu967\nfHnwAOh2aE9PxZmrAZOHxKmrq4F2PdfP3Mcjhzom18OCZQ6O2yTzRWWEQ24m\ncpFt6ee8MkwwktirIaXKK/Sg9bGdGpOEEpdk/+3qVAt56jX/s9Z3+16zspYI\nVV0VjzskYM11nG+XkXxVmvGs8cxuRB6uD8MdhRfDgto2I9Ai+sBDbATY9mfo\nGAialnwCfQZEfrl5s6ufWpEoBDQxoVwYAxeilPTkx3QY69wXO626ZoA+jHwh\n78TAJtm8Z5jPgMyomTF+xDVgnzIvs9JLyByNx3OkOX7/O0QK70D37y1Rctvn\ng6uYAo2HMEGD/qUPRmcZb1BJqwSQKY0f2Xng/+wMN9BAKLmhCfgYPyt3RLEb\nNBlJacnVmmjULaJS2l8aV7Ce/YCiXdr0PVSxmouWc2pfzLsK/kT1HKsaeMWj\nysYPXoXFeQGVPCKky0ZLXbxkiffopJSv6CtfQxE7aXmuDoTeNxPvLQE2TR58\n1mpDGLDGJJ2xU3xKaaMrPDEtXoZIfBSo/kmW+LvhqBvvBgyxY6ef0eYOKvwu\nP2goT2LgKJJukNvTvNihpdNVchY1jKbp9Yu9JmsHgjHR652J3T6RCnNPHtnE\njdoMFlsdKdRirpk9VwYvtHo5GAPeezDOeAwpDbeUtbpNpRz4ZWCOMUXesZeg\nGpHW\r\n=7KZf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ccafaf46d4dece4baea0536e9e3c2920ff172b5c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.36","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.36","@storybook/router":"5.3.0-alpha.36","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.36","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.36","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.36","@storybook/core-events":"5.3.0-alpha.36","@storybook/client-logger":"5.3.0-alpha.36"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.36","@storybook/addon-actions":"5.3.0-alpha.36","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.36_1572629943772_0.8064128323019282","host":"s3://npm-registry-packages"}},"5.3.0-alpha.37":{"name":"@storybook/ui","version":"5.3.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c1beecc27f63ec3ad7da97e20eb166e25fee33ff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.37.tgz","fileCount":86,"integrity":"sha512-6uHEe+Cw6zLmSUQfrahrQZ8hMhcLd5y4WzB0kiDpl9oHU8pbSv3SDIqACvg8We2IS6PEge020fBln6d1L8F4nQ==","signatures":[{"sig":"MEUCIQDhz+nqtwTpRcS5iHp1Gp3yDbF68RZqA34irdtAEMiwMgIgNDo/8DU2e1CtiazREWF/EKoOOQOdJFXK/JvDr/zPKDI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvOkrCRA9TVsSAnZWagAAwecQAIodBv/ynkJpKtFEgFuX\nenugZuxDHW6+qbJoN4MkgWs7HR4rZTCrLLgt3v2+8WGNLe9ZIrynMutBBrZA\nwzEFEsaYJO+N53xj1tftWUfqLQTq7PCnufNL/joSnv6WFW2UiAqM/2kKAyrB\nE6FN5VkzusIXdfwk1vLtYVma1TmL4Hi/7OEadJy4HlPPu/PcZ328A3v9bRMb\nO48Uae3tlmfOupvnlYvUdXviBM5OycFqT61JBR2Aqiw4L12Qpx60XZQfFCe7\nbRz5+kLx5iq8IbMewmid38YvGGiFglTjNIXkZH2KYJZnLD0lBT51lmYhQ6lh\ng8+9/Cv6WEwt9BgPwuDxIwJNodGyKwEyRkDZSVZ21KvB7Iw2QFWS4TLGkJhN\nNzxCFW6Y0N6DuTqSp1ZUnc07ZBIf5tD2bEWbT1+i7UNtKDHnnEo/E1wMRZjR\nMAVt0eGY3lch/9TNBVxfhUF5RwDD9SryXGBK2J719A7lHm3zfqUu/qZ9u815\nGhnk9yNsvUcLxU6zJIL/cTazs8Yex5sW5W5lbRwthF45lON6Xwk4Yb9qh/Yz\nAPdUjgujn9rsblrLiPHSC9RicCLqtHAtCzpIa5aXFeLFcbW8X2ILtG45kaZm\nQUDKkkLGGtNrqEFXmejj0lroCq+vPLTkDhhEFzOczAQq9ToALzPZX41hrgYQ\nRQ/g\r\n=lhrl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fb19c3337d60c58e12736cd25e781fb2ad724576","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.37","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.37","@storybook/router":"5.3.0-alpha.37","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.37","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.37","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.37","@storybook/core-events":"5.3.0-alpha.37","@storybook/client-logger":"5.3.0-alpha.37"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.37","@storybook/addon-actions":"5.3.0-alpha.37","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.37_1572661547326_0.317410537667272","host":"s3://npm-registry-packages"}},"5.3.0-alpha.38":{"name":"@storybook/ui","version":"5.3.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.38","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0ac0bf55c8a980ef06e48b85ffe3b3817873872d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.38.tgz","fileCount":86,"integrity":"sha512-SYAQqXZUyIjA9PX5LKUcPn6VPG0Lnd5qmkA4OoP3IPtdPaSH0IqebqLhBhtjGc15mhGzoVjIOr1Be5AC0TVV5g==","signatures":[{"sig":"MEUCIHzcTp5r6fhHHN2GaIxQAI4OniqdlHrRgMxvpyza2PBRAiEArS+CSuogf/l7f4UhCqsTddvpQzUD2XPIlCpXCrPp/rw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvpIjCRA9TVsSAnZWagAAnzMQAJmrZt0/TKjDHgzxVaji\nicmsueiCtHtklHC4fmPeae7/wbvoSFctcd7sqAuY8oyY5wnzL1jgrIdV1Nxv\nSRwUMWnYOLenH8rqocaD/d9QgC6bZixJ0/McthBUkbeCRcPRieyurn1nXtN6\nbAPPt8MLN11CGOuLNRLZ/hEAWdGJw6Q4nQnkivHdAyTDrS7/qI01gMrbckaq\ndultUnrnbKy9LhZuOb79uZCNIQ7+fhejZahs8SEW44zKZifx/SEbS4F5usrf\nKyWWaYbiOlQDeGsgactENPK5rVRE8Kv0pf7v/ua3LmNLomlDIGengBP8IWxd\n48l3xx5FH2at5xZsXr82cWBKDfsSqatQK2h56hdaRIDfAlXoC3GUbj3p/ISm\nXdy0pI1cC56kaR38/iqAOCKHcKIY72tI472aFa86zlleS78pARLJfgwpJAZw\nt3/DssdR5J1YmH8UwMpXb8xJJOHuEblrBheSI2rvUAh1ljYEthBYqDL/wwOJ\nhktdTXmZ3AsAznA6nVUOZz9gkbaUIeSi/LLx8OBQ5an5vJq0Fz3Py/3+l/9W\nJwz+IZl2obpE3FgdC+ZZHy+DQhdhWsWglmM0gCu31x4RnUZKZG8CLfIbJzFF\nUoS40eCVR5+miStdf9zqUWIwxzwK+RWtDKwfKbvB2UbZopREA8j3bL/jnbqS\nQceS\r\n=swme\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"528c6617d9ee28a6457854a1175a26b29476be73","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.38","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.38","@storybook/router":"5.3.0-alpha.38","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.38","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.38","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.38","@storybook/core-events":"5.3.0-alpha.38","@storybook/client-logger":"5.3.0-alpha.38"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.38","@storybook/addon-actions":"5.3.0-alpha.38","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.38_1572770338792_0.6843969678252682","host":"s3://npm-registry-packages"}},"5.3.0-alpha.39":{"name":"@storybook/ui","version":"5.3.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a305ea3844e99c58d3e6a45c47501fa7c88ecf5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.39.tgz","fileCount":86,"integrity":"sha512-CSASV2Ymceo5SJ0c0oGdKYV35wFq8jozpSmxzYQVIS6fJunitkyfj0312qz90UKqMsrqnP3woIHChTH0z31iFA==","signatures":[{"sig":"MEUCIQD8Ge92T6FCLG6kYqDjZ0DPAvuOeBEB9RZ+EjQDnoILrgIgE4AC7eijTlXMCAFZkKTeHOk2CHXQcAet6PqboKDXflA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwX0bCRA9TVsSAnZWagAAsBcP/irVDBby5PWK9Rxe7TUJ\nwQfn8Et6pNAYo3C9rlnOifluTkOKb/Eyt5Tzd7RNQkDMfzcQBFUEjQXzPIU4\n+TczsvNNi0oZ3YBS/R6clerS/u33+rQf+da9Os+ehuJWgSh0dQEoq6UE4U+Q\n7DNvIm63lQbHCjVrOgPzQJtcMO5v+dMBtsG75OxLz8+qqZiK5z+Z7aLo07Yg\nwPzp9aNqux8/HAdA3H9gFt8IhwpuNuZtsPOaVm3lGtj7T7UlC8tV3Q4XKrkH\nXwixCCIDa/AqUc+xBnKcj4kLsf+cQq+evjglbRrhrpI/AhJo6ZJtPRRN7cSY\nXBHNxv/v5RgGMAMlDPylFoTHpysjPBKcIdXxqeC5eOQZrwpqE7oDT+hcENRF\nZaH7Je9pGvBRFi3SMSeGC8hTKoKi1U0FWUW8jEx991GGsDkVwQMCStKERsMo\nuXIPgkLt13U6zf1YhZK93UaD/Lb2zdK2J336TI2E6Ko2Y1Bkwg0J2IAHVSCf\nOrHiwHXgwMKP8Kf1i6fhq84KYwq0qmLL37miTQ1NVVvaT7uuCUEjD7QA6C2M\neqSfD9RRiwOmmSZDybjfMu3mi/FOFzfN04T9Jfqg6sHVHwRoUGu0J8wufrKS\nn1CkfnSY3SYSU8OKYYdeybioCS4Cbih1Y0oAu/E6u6ZsDkr+Lu92WCLHTjJY\ntMDu\r\n=9nm+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8f09ccc687bd5a026ae8b4d3563f4718bf945c65","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.39","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.39","@storybook/router":"5.3.0-alpha.39","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.39","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.39","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.39","@storybook/core-events":"5.3.0-alpha.39","@storybook/client-logger":"5.3.0-alpha.39"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.39","@storybook/addon-actions":"5.3.0-alpha.39","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.39_1572961563266_0.28223043624196564","host":"s3://npm-registry-packages"}},"5.3.0-alpha.40":{"name":"@storybook/ui","version":"5.3.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"eb5d7582d88e7182b57a73d60e99356c2ceb6634","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.40.tgz","fileCount":86,"integrity":"sha512-py6n6W4jk8D+0VI484o8i/zbTjfKJjHoAdKuqEnImHOjC2iJWhbWrn4ZBsi37ogrtsFWx/6DF870yVmNub1WnA==","signatures":[{"sig":"MEQCIC+5wOYekbPUqDoJ7yvv9mtqRyYgWZJ/Y8ulVuqB9I9pAiBKfWAo0spOQQKQuWb02IIb8EGFW7D/KBRssplZvVOxEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwjbrCRA9TVsSAnZWagAAlXEP/jUlcDrNxL8+SYygojH4\n1lBcyOkYRceJBaAZsmL/3qcBpHnhQL6bMbnfknCx2hOUiQFordW0z56DtqIm\nY+a2s8F3WO4h4mY4mPCwmTgQPppWMGX1isYd2LAI+E/d4UWwsRp2dLmRmfOX\nnurMIaUrSmpmWcVldMS1h7Ek/zq/CebgCgsHIVZxfaY/ayz9zzaOsaEih4qg\n7+MC2CgyUQw73leqntXZx7cjzuncwZ3oE9ojddZ978CwPR8C64mYq9sohjtL\nfdvvBiE6/KLBUQV2QzsFThSccJ49Ku6SWL7+cRMhs6+9C86CHpFOIU6HirQq\nZPVQaODC++10U+4RUHLL5Ef30r091omYZj+X4Bbig0wTGKEtn/3nbySyWEJ2\n50zqotihX+zsf0ggePmHpp4bBZLUBLXB4dfBqSL9TT2PvxDM4W/a2tuvL+a6\nNe0Eup5EPiaXhV2UUAR/zRx6Sg/85+QMtVGcmqfJgCHMj927aUNoh5rnXXYp\nZ7bmzIREqgT0YrZRZsC8mHOBklMRwgAEmFvdT3IDqynHgu+0frxLmhVPUNqi\nKDLhHaHDtgGCH7yBYzrI+6h3rBTNyeCP58i72mNO0g7NxNEvgDZJQqdbQ3dS\nIROlAaXaELs5kkK+5BWVSI0ycqXPTj4CF6thvFn74oLWj8K4EkJ15S4N1aSQ\nige6\r\n=+pYb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8741f83b3f6a8e31fb5480f9fe942812d5bc4e00","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.40","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.40","@storybook/router":"5.3.0-alpha.40","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.40","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.40","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.40","@storybook/core-events":"5.3.0-alpha.40","@storybook/client-logger":"5.3.0-alpha.40"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.40","@storybook/addon-actions":"5.3.0-alpha.40","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.40_1573009130066_0.13261434969600905","host":"s3://npm-registry-packages"}},"5.3.0-alpha.41":{"name":"@storybook/ui","version":"5.3.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.41","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"287705c6e0708818f49a0e744e2c6c45aa2e9062","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.41.tgz","fileCount":86,"integrity":"sha512-X/8y3MBNSN5QRbW8WpjfqH0V4DbE58ywmavtlm+VY2mymX/tGtOwP5EKufk7qFwjEJA5LtrFpBBq3aYeXRv2hw==","signatures":[{"sig":"MEQCIEjANbMbncVR35Fla2N60BP8oPqiBhpVclPxkxXDnbA9AiBPhUf+7uoTFlmm1WG7r7FUKNkzjozGSurTdSsWnid1jg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw4z9CRA9TVsSAnZWagAAPewP/08Ti7h3W1LqSwi9a5e/\nJTYWmzPrq9ZoiMhAXf6JHTrbdRJSV24NRq7FrpkBsgSCWHSHQs/Ar4l+LVJe\ndBB9FMzlql2T7E19Hul1e/JsQqgH6qTx7MreJvyteQekVyssX74zWOQdBr2+\nzo14KpybvHOmf42CEYg4WVpr2KeD55oaKouCEsA1zxdpsLfTNd3SZXblRdEb\nCxOw6KwoxViXzwh41XSmr7xy/qhyXIq9JMXVNEiFRjV9hFtlCBjDQVpxIGKH\nQo6IpGgxYzQOaFakHZ3izmM3YuiuoR2hPSz0mGX+23SkvEqxtBfihPlvlmFf\nN1Q7Zc1LbBGxxF6PFzBG/arc6qyamxzlhQpAIYoujuubXX6iRUvCwYmjoQUy\nlPj4E7+nnw3QWx8eQRGoHpL3GMqfrgP0q5VFnchs5qVmHguk6Mzva7LqzleP\nDf0VEgygA95LjyOEOSm3dcaJr8nRvA5QBae/0YLN0oP/IjzEDVy+2fLFEh6G\nNwgobzdjPpJfXgqw44msm/1+DBIYJzFAI0wSfvpMFxU7BET3OCgbb/estZJw\nME2PKqmke/DILU3kVqR9V4Wu/u9sHdcF/UmnqCV0TcWHgplkFaMRird+P7xW\nXHcvkiKaac5sardflur73NbjPxTKjFR2d3Lg4w0i9e2bfphvrT8IPjsHqxd3\nj4+Y\r\n=d0t0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a46bd1bd89a1e4df9b0eb5f48268742c785e7e8f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.41","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.41","@storybook/router":"5.3.0-alpha.41","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.41","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.41","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.41","@storybook/core-events":"5.3.0-alpha.41","@storybook/client-logger":"5.3.0-alpha.41"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.41","@storybook/addon-actions":"5.3.0-alpha.41","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.41_1573096701131_0.8388745281543515","host":"s3://npm-registry-packages"}},"5.3.0-alpha.42":{"name":"@storybook/ui","version":"5.3.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.42","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"681e334924d1bf15dcf2386dd82d0361e62a74e9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.42.tgz","fileCount":86,"integrity":"sha512-xOiFEAfw7vo/mVZSsKgYaSsoOMTU2DFyJ2EEOrpKg/OcDJIXvNc6HqW/GqPojVD0CI74jYcLGBu8f0M/dfs6Qw==","signatures":[{"sig":"MEUCID5HIoPrW2SpJe46s9vFI9jW0c1CZTTVjZMlwWAZGHxyAiEAnmQAXjVRUkhS0Ckb4PWKlIe+U9xfJlOiscnH14Gmu2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxnNNCRA9TVsSAnZWagAAj1IQAKAWGqaedGDQZsi99ez0\nwJje465giGd90rwSoTKZkNraMFiQpm3OAGlSeXQApQbcFC8OYdIqwQ91BPRK\nDLCn97hryQow+0cnvId99icyhAhi0vsOnQ5eZexbuL4+qJGyedaVB0ope7X7\n+UYnc9LBPHC+ls3FmomDCSr86Au/BtUoN1KECa+u4J4NfaeT9+ZzIPfw+Fr1\nQ1+khjrakHZbWor64VAIGdxNb0D63ywcImzKkFUShRO+5cZJW2esWCFSEoDx\nAcF5EqfqzikHd5Q5f8NDXCKERc74yQfGfTSsl3BtKFAwkpG5jsNrTMAC+HDq\nZfVd1+s2QRWIY6c8I+OMoT64TToWNUjMS5HSb1Ko82aUSMWKIrZalIsgYnAN\nDj+dvO0fwV6sK+1uEgRC355cmCNE7T8Pa3ns/C4e/uTeUD30aqEoIUQNMj45\nGA6Fz27m7KjQ9oiutO5ex/ry+Ny3nyxeAM4DlRcpLamneuTTcogRHst2VKiC\noe5mHDJ32A/8NxOtLcqzrPNB1Zh3YwgpgsFP3DiwqcNMqXqY7rPfpLWA+ixW\n8ZMQG6EjDcxSWMw3uKwk3RtpLBd/Rq4JqrCAQ791bJI6EPjnHhg/tXR4fCgc\negQUa92CZFDJOxxmOMTlQVkD7zYHaRXZuDHo5W+CaUtorrxdxwmXNmKyN9TR\n0Hyb\r\n=cGSG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5242f4f190d2dcc5d4dea6186449ec1547161ea6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.42","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.42","@storybook/router":"5.3.0-alpha.42","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.42","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.42","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.42","@storybook/core-events":"5.3.0-alpha.42","@storybook/client-logger":"5.3.0-alpha.42"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.42","@storybook/addon-actions":"5.3.0-alpha.42","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.42_1573286733203_0.616676624035982","host":"s3://npm-registry-packages"}},"5.2.6":{"name":"@storybook/ui","version":"5.2.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"33df2f2e03d9cf81dc52928a0dc4db280ee8f56a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.6.tgz","fileCount":86,"integrity":"sha512-jT3PtpEsTqnESO0U8BotC+5P971Xqy0s2leSZcgU9PNe4Eb7NaxypSULOulPgPAx1JOmMipUBdK54PP/nyudkA==","signatures":[{"sig":"MEQCIBcZVZLxmu8OedbBgmVd9ciJh22S7NDBlJI6XxQg9XLpAiBhoJNF7hL3hsRORbEBlxpI1YRoq2F01oKb2Gvk8skjrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxowyCRA9TVsSAnZWagAALK8QAICPvR6BN4A12SLu1HL7\nsr1AO5Rmxv5oYA1K2rI1wB+63MsS3Ar6qY3eYb3noVf/LL9ZV/j1CfcIlT+P\nOEJI5VuEyxd44zXmL+tozyUY168CAMI7vocNC+sLg+Gb5Y+6Rq1hBBrtmJNK\noTIA8g9RIEtUXj8ivvkMIPcMY860bc9+9HDaupVocaAaAEPcAnhYmrAaMrZZ\nnh9Gd7sinRKSXsQLdvu901JWGw8zt1oWkuMYbFRLY0TyuzifxXphAKfr78bP\nO7Xb8QV6rWOoUpV9AGHHe7ZgBKqGiMV2dbIU2SrXLphprG8YPVoo+9ADWItx\nXgjpHym6fyY51DfiSF5Q1bcLCzdfQ89EbKgeNEEsCUgG1H/29AusMnQOAWTb\nwc9EXeKCCj7PCL2TiQSWmSGg3Gu36UpTg60JnRlATYSUS3EqZWZ9+1QXD6JG\nPmtOlSf4MTK2365gtyZajIm4lTgp2Iqzis/AmGtBaKPbSgzkmGUid754wXUO\no6t4zQA6fwBZM7FuomhY02Z3kXSlVUu24I5Wy3xglwiMeijLDmxE9LAyLjk3\n9WubVQL8usFWzBXQQpO6GGeTzilMAJVOj6yI1rm3pXjkW3oLZFRRxel7d+Pq\n1tLmlUmI+y42adi1FiLD47nHhnTDkizL9OxDZTt8kLChhRJraBkOrP2b+uCf\nsq7j\r\n=TUBj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ec8ef5c144e73ce8f762df03da0ac6c2375c223b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.6","@storybook/router":"5.2.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.6","@storybook/core-events":"5.2.6","@storybook/client-logger":"5.2.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.6_1573293106311_0.7869102823206517","host":"s3://npm-registry-packages"}},"5.3.0-alpha.43":{"name":"@storybook/ui","version":"5.3.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.43","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c363a2d922bb2a04e8111e66e1cf507dfa51d47e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.43.tgz","fileCount":86,"integrity":"sha512-tV5kZGYVrelfxnbVve7/w9O9y825jvLdRfxSOlnEgxmxbA9ax4LtuknhH8ROv51pLgOJGtyZPafvbuVyTeGNVA==","signatures":[{"sig":"MEYCIQDJYWTdt1IxvMQHx3vp6jOE8f9qbHidvnl2Vwj0qOS1/QIhAMzxg+5VvQ8vFn7EtqVh6CPen3DjAAXP4oq6BfEc0pBQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyYHvCRA9TVsSAnZWagAA//MP/RdDgAcNbcKIdUX9XrGo\n0RXNZ/bz+3V83rgimULcsCFQlfGs6H+1BpZ+LsnSaU/UQIm1YF6tgwLHW9Zg\nPXNUp1d+ax03cEpKugw4Ba3hfhY6F9vkApbaTqkPf1igJdQfGVDMsqwM/tP9\nFG7s2nTZvDxrtF/CxON+suhgysQiFYdKrfAr0c6fglrnToY1YWr/W7qHAoby\nAsBbAn691tlb1uqSfJg5TRvHi86q853puzcBKH+rCnNTA6ZXXO/jvT7Uf+Wo\n7ck0nCCB0mIFJkSuRrfaWsqr2/7/yM6fJn8+PqOovTGwM3GRlTms6EMhxb9N\nGmzArcXdFWk9kKmUTARbijk85RXrvxdnfBYhuMJUxXUAKWsBweCQ035SIDhu\nbq6b6kzXgAa0W8TEvi7TQVnwXEy9jyJMB8hOdkURc8lKMCyvk2561Lp2QxJT\nnaAoIxkbjq9CL7wNB6oUQVayN3ttyWPH1D13BmTwsldydW0cMAaV5iw/X8Hz\n3yJt9h1njphdfhxV/XKby79XczPmJua46bRMYTKMOpczC//3meqq6Brrcw3R\nr8sVvZwx2JOIPujIi/J9sUrOVYK8GItDRuYsiEAEmELiWJlvdNx6PU/0uAis\ni5baUEoNgW8f96TJmkDTeeVpI8iydJFgyFCAvKKafWzYkIAyFN7EeKTJX/y6\nhNk9\r\n=XMGd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c5aadcc5360831a6635ab5cbe8ec1b3f06670ffd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.43","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.43","@storybook/router":"5.3.0-alpha.43","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.43","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.43","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.43","@storybook/core-events":"5.3.0-alpha.43","@storybook/client-logger":"5.3.0-alpha.43"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.43","@storybook/addon-actions":"5.3.0-alpha.43","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.43_1573487086917_0.754588986366878","host":"s3://npm-registry-packages"}},"5.3.0-alpha.44":{"name":"@storybook/ui","version":"5.3.0-alpha.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.44","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7e2a0527d6efc58ee3900d7262b79b4f3d3f9834","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.44.tgz","fileCount":86,"integrity":"sha512-ffn/UuStf+A0SMGsuyThe+GjaR1UHstkFTuwkCKmZT/H9GzVyxbgYZrw7gKBw7rRMimXfiFMJuspnVuC+0yieg==","signatures":[{"sig":"MEUCIENKq4s+O4cxrH6FoctwRc/RoIz9XNq7r1hoYjxnUvxuAiEAtR5TcZzPIH/Q/wWjTERglnDr9YynuYhbsSdHXwvqlus=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy1MQCRA9TVsSAnZWagAAxl8QAIrcFECiIP+0/XKZnpLM\naBQ0MSUwqSnaBrkjJWWBQOlArtZS5/VlwDSeoFRYzthlYWKbQDhvVU7AU4b0\ngPo3h8aK/O8+Lbhe8JwKgohRPo8XGi6cIiDMaZNiakponmMTJOyB1/Nj9p72\nUQ5jaKGvdLLL/oTJhh7vFyRgvSJin3Pl93p67uQj5b8sKHP9wovEd7ZAONFk\nVNWg7omBwRmwUsq3QDTsFNeEYYQrdVhKCWIerCEeG6C+eicDpsGewb7Pq+lb\n6XkfM2U/OKNdbnNR+02Lh3l73r/f+3tJjVEHs9cyuXW7Wi+LM6D8m4zLP43L\n1M9u0vnzosJyyT/FuITdWf5mBezjLCR1pDFBbmuoWTT5IpIajNHV3i0fgmRv\naxV9z7rsig6+CuaCwLHgJ/RkNfsjNSjw+Ho9io2XLj8slwMh1RQvEAEIxaAg\n/dXGgrgM+J19MM5T5f+RS63uBzkdNmugjBMnob9NJN5TLEA2mgDhvUyS4q8X\nwrHVAdq6hmbFIfq/zWQU76DF8pZzS9pIUAVocXA+qGzpwVw4Bw71hTnZRp8Q\nDGH1rr3sCf+IGF76AMUJxDLKzTvfDFH/AfkAu/ZdU4gsk/mAwcszs1/SFAc0\n/8KUfr4lkVkEWTmhYfb0bTOf3ITiXgCOP+2jmmXyHVGOmjQJf99YsdCBL8p9\nZIRw\r\n=FhiJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"be73c10751f6d6513b857ab6049b18249e1d158a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.44","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.44","@storybook/router":"5.3.0-alpha.44","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.44","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.44","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.44","@storybook/core-events":"5.3.0-alpha.44","@storybook/client-logger":"5.3.0-alpha.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.44","@storybook/addon-actions":"5.3.0-alpha.44","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.44_1573606160330_0.6173500029697816","host":"s3://npm-registry-packages"}},"5.3.0-alpha.45":{"name":"@storybook/ui","version":"5.3.0-alpha.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.45","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a9c5fcb11b01d8637ac0d36f8cb6a042c5b8633","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.45.tgz","fileCount":86,"integrity":"sha512-LargHontOoVxdJJPDec+fYczOzCx8bbaaP0JGCii9HXzE67lRnISGGS+VoxwcwlOS1k/9LDJPXJpsyJswZmRYg==","signatures":[{"sig":"MEUCIQDjhcDz6TdUHN4bsWPjHq7Lx5zILwhe2Y7+dwtPt3b6/QIgcK3Bb6DnXXYAooa36cRciVUEH15FjdeKNnPHRNAtFOY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzSAcCRA9TVsSAnZWagAAcQ4P/0+cTXyrXpjAfZPCK5WX\no+6YD3jDk7tDUkufpQjJu1QTQhqv4j2BppLdP4wY4vNS8myGJpW/97HEc1KZ\nqL0oO2kTgnyOPnozDaJ6sNJ6SkJdmjckpJ3jh9liKapBw38u31BobpBqjI8r\nO/ycMy/aZzBqhVKBpZbbgI12zArgvCCI/h/tZijBa1+5r1lZhE6+AF2qJmYZ\n7mx/v8TMIKCJQj5lpji2DH50DkRKQd1OQdaY6mIXDKKLzII5NTYdHff20EZD\nSKHWQ75KLCStPR6ddx2o5eBsscJnYe/XHi997fa1G0n0se+RvpQRuho6vF6/\npmxtKsBlwnCr/Um8CBxrydpH+OTTAr9NeWwj55p9HG8Vg3BSczWTx27QrPO4\n9k9qvFG8mitQeuOll0yZhAy5TrUnC42poKstUTxMdhH6D/JjhXnp8nH2E11E\nJRc324+ZBRcUp1WTJQhA0ZFPUwzA8gisF4i/kDsnO99tQxBADER7UsjigV4Z\nyc4DNG4+MpP5NvsvKXT+ukSJoQB4fndoSJv4Wpcxs5dxowpWT/u1uoDGmXyi\nBfV0rMvDon0xl8Ncb0i0TGRUvMjzsmeglj4Bb6gLp4iJt70LdBhD8lKQSgwI\npDjA7iof9IUj38f9WM93/dYE6uJAYyY3h9uKTZIpOCNFoizPciB6Z3YQjkBP\nWZOc\r\n=ezRw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3e45911bea0aa2fbf8cbbaee5d948376ff793678","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.45","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.45","@storybook/router":"5.3.0-alpha.45","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.45","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.45","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.45","@storybook/core-events":"5.3.0-alpha.45","@storybook/client-logger":"5.3.0-alpha.45"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.45","@storybook/addon-actions":"5.3.0-alpha.45","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.45_1573724188325_0.3937957115545563","host":"s3://npm-registry-packages"}},"5.3.0-alpha.46":{"name":"@storybook/ui","version":"5.3.0-alpha.46","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.46","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e00491779f0cfaa824a6ab9fa5a3c5b7b4e571f8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.46.tgz","fileCount":86,"integrity":"sha512-+yNb9SP+mH5bOuQxgR/sd9eoqi+lc3I24JKT4CQ2JKmL8ckCUzi3CD+EtTQRXSwx9KIXQnww2gFV37fOoU8t0Q==","signatures":[{"sig":"MEQCIDW2LKXWnUOI3wEd43SoGX1ZXw2p4iFLOovPwwDPMLh/AiBadgCNcQYQPw4WzmLaiAI2ybaOoDoOpAtAbW4jCiPG4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":381736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzx72CRA9TVsSAnZWagAA0s4P/ikqshnej8ffNLfCihN3\nN/KdccWrXEhvJjxyj0O3KGZ2Iz7lR1d6Bq+FksAeyQwWBNjV9RfJx48pS55c\n/8D2Y/Jfc8tYUQLjfU5y+s/zOThD7+F7BnQuNVRMyh16BBNq/kAMOWXqmzxu\nAmyKuFto5oFKd/zRL0Sbue2Rxcp2jB+mzD8w0qMdmjsYkCrMmZJc0OrRCIEK\nfKb1RH97cwl+KBUj4UMmhjtGcXfZyvWV/ZnnyfqBFH8wG/uh4zGXJT5cWJnQ\nGds3sjL8JjSYKZO+Obu01mZAB5f7ZZH/hTqTUEhoNrmkgCCmet/AVhxfZ++3\no6EyP84eBcHEeJ/drpgPgw6BJ+bxy7PtyRV3d6g04s0BUKMqD4F6Uv8Yz/Sr\nXonztYtYqWaGe2DKkgzCRRY8E1qYsNyxAGPt4ASNw6LGG2sNDM0fs7XeADLB\nd2M9PhaEPLxSxWOzn3rRLa9klLCB/TcaOFrGCkjzmgK+Gv1XgZGPAgWM8OhS\nuMjSh91gZfXkRZmVa3Q196pUcr3fhzSnNIbvBNPuqie5Snb7Z/N9ddFFIzqi\nrF2rCSaCj5mbCIhcpF9AXAp5ioGYANKMGJjIT7pLk5R9bd4XQeeflNuQFNLb\nbLE3lpuraVbAbax9n5MiAD1KfjMkaVzcrNqWN3fqAhIsYbZxxi3FV1AF3cfp\niddj\r\n=7Bhu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"431322bbd9c7232984626283208ae890eeb1b8ec","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.3/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.46","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.46","@storybook/router":"5.3.0-alpha.46","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.46","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.46","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.46","@storybook/core-events":"5.3.0-alpha.46","@storybook/client-logger":"5.3.0-alpha.46"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.46","@storybook/addon-actions":"5.3.0-alpha.46","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.46_1573854965666_0.4341863108896624","host":"s3://npm-registry-packages"}},"5.3.0-alpha.47":{"name":"@storybook/ui","version":"5.3.0-alpha.47","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-alpha.47","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9bbcae3bdd730db73366c9212a09b3de1ecb6256","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-alpha.47.tgz","fileCount":86,"integrity":"sha512-T4JLKzQ5XU5bovBwrgaOpPMPvvXFiQw5tdLYN1k4ZpKOyrHSidbv7NDzIEJEaE/NED462wSk3P69kn8WmUNbNQ==","signatures":[{"sig":"MEUCIH/On5bwe8Hu6RIi6DeAz+qV8TJNUOMQ7iYJaCrk1LVNAiEAsZ4JgMHjBPALYaHNxMJ05JNiWOA9pRfSs4ylQHqYqLo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdz/QRCRA9TVsSAnZWagAAq2kQAIy6axkm4Yc6LXuFfPTX\n80tRKfSCc2DWc13QIJ4mb4F8tt078d/AQysRU/+Phr36p6syT4OXVGxKkTcS\nze4MBG5/htrwfsp+AOEwFJxNsVBJ7FOwt7PhkYz5ux+i1p94m3vHeeSnnfwu\nCCsm9jbHlo+mQkReR7+BtLdWd2JkqexR/oLpdLzy1UjCiI1VbjXhqVkYeAwS\nR7vSEvmbzdgUTLJdSnAbfnKQnFbY9/Uflee9y4lP94B4r3QJN4F0Z5mVwe14\n6hcQWAH5WaEQzxP1yS0UVwF8qlr15ksG4Kj1C5s4zJP6HiwfKtzpyEJnWsKr\nLV4csv07pZbnzSxbeFqzGlC29ap8Js1EaHvzsXLkucQtGjY97kRJXAzoZqsN\nwX6L5BEYpXlgxbdDlsTNR+I39unQkMDAddgcd4udnMnhvslpg824Cf/sNAYf\nWYHwPWdBXLHMJjAkxReJrC2sHjQ0b9mIjzYogMWsCDMxMNPaMvYe/TJpugQ/\n8WTMdCmLuzSqUDoyfIuGnqzDjt/g77g4qLxvGskAVf37n2Dwjh8Ni06qRe/o\nSJfOifZ/kAl+HAmcc1zYsuILim4TB+9QZc6rTlbkv7NkqOCyo8rtSbC4cE8n\nwvXWk8L5+8f3/3aIGdKWN4brGp2vR8vfaM3eo2+Cd/q2HwPNjgGpiu7V7c7M\nGgkC\r\n=16NT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"aa97d03bce1a21158383d13a2e80c8bc29be4109","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-alpha.47","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-alpha.47","@storybook/router":"5.3.0-alpha.47","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-alpha.47","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-alpha.47","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-alpha.47","@storybook/core-events":"5.3.0-alpha.47","@storybook/client-logger":"5.3.0-alpha.47"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-alpha.47","@storybook/addon-actions":"5.3.0-alpha.47","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-alpha.47_1573909520603_0.5045388204775212","host":"s3://npm-registry-packages"}},"5.3.0-beta.0":{"name":"@storybook/ui","version":"5.3.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ef101ec38f704e88ce6aa7aa014dcff3e974673b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.0.tgz","fileCount":86,"integrity":"sha512-HH68VBwnY1F6DlLM6yXU21pa0e3yETYVHrffZeTDi2/1UClArzaQ3PaaWbx02aCK3uOr4Q0s7rlsUBWSMOBIlA==","signatures":[{"sig":"MEYCIQCQlGKnZL8W/YkEycjW/pzgYv/yiQVWFHYhbbNvzNIRKQIhAPI8kzvIKIEvHbkKz1uiGfPFnV/10Rxwouzz/O64I+3G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0BbkCRA9TVsSAnZWagAA8y0P/264YlwroaNfu0x1KHTk\niMidhwFgnX+502Cxn4NKpl+Bs7IlWeILf5wNQG9lhu9Q8m39vSuTB2CEI+XK\nFcWWL86m3d9JpsCLPE21yScm4NO8CaGN1jryx4Uu5zjTyEvmPA5MLNLzpBQC\nzCOdpXuPh31fU+xk5z00mnoWr7WDzY/ZcFrBnsNxCtgfOHsnI+mignNtbX/g\nA18j5Filqx6mU6gNAVxb5PNYoBC3d4EjVjHsfbB+TYlXqcpW76bo6qBDnvqO\n0DvWkBfkjCPU24H5ovppZz6Acnzecdt+qoLpVoqYgnoxYVz884oejnP16QwF\nA5QA3xVAk0X/JOCblONBKUMHeWhANl/BwiArVDn2W3AoQdjU/sldFGwPNUqB\nctj52G0N5fZ1FyYi56xefgjmau7XCt5yeJpL6Sk5vVY/U/zGF/NzbVI7dFNF\nciq85o2bckWaUdicBjNUQjHH6kkMx8OuOWfX1gEvJvPDEui/r/2tRNK0U2eb\nVPJNobx2DUtCWo7SA8GbjHE1sEsVXUQPL35hVj+0HSda1fTUAAUpJb6uopT+\nGECJ8SAxviBFHUui3+QSc+b+TRMS8tRkUWBaT1sPpkRV5COMxOHm3xEr7TT1\ndedbdJwdP8Aev+DkpwRVX6AJWqxn/w60OjygHcltZeWZXdESmbfHajAZyNtD\nPFeH\r\n=Xogh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f57888b0e3c3d457bc25407af0b885fe1012aed5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.0","@storybook/router":"5.3.0-beta.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.0","@storybook/core-events":"5.3.0-beta.0","@storybook/client-logger":"5.3.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.0","@storybook/addon-actions":"5.3.0-beta.0","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.0_1573918435682_0.4590994375150932","host":"s3://npm-registry-packages"}},"5.3.0-beta.1":{"name":"@storybook/ui","version":"5.3.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"55aafa53be28da476276fcf44d27f6699ffdde68","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.1.tgz","fileCount":86,"integrity":"sha512-Qiw2NT9Ln6nKSRvk0JJvqGYBX8NS3FJI+EpnAKDVcWDNyrkiaWZ9YyWPMluaXBQTf2obGMTav2whzRetiG98Bg==","signatures":[{"sig":"MEYCIQC57AA3MpfDsmP09i3t0xMz5/wdBwm4Q5+OfhjYfRD20wIhANpJRCx/nf1f1+gm7cej8HVbzYNJw4wZmZDkIwLQN2iO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0qzCCRA9TVsSAnZWagAAMbQP/ilzRlpgcuyCtTcN5wcH\n2syKd4dNY59B8ZTGnFILBaaV4jrS/5yy1QqHfnkNe3SHmWr2U5ZnGnkRFfVT\n+yuP792KJATiKBlYjVwc/fUDrqGpILkM0zHShZjaTOqAbqj+vSer5AmTO0xP\nWKdEWaK1W1t3nBLGHcnWLthq+8KSsslLQP1ljY5C/TpbIyUUBSjcXJqb5Elw\n6RHaRVd9W4GtAxL7XJUpEL5p2C6+OIWrc6z/ry6om5azach6PLb0vXNxPgm6\n0GqhOi4K3lUmVEr8ZHu4cuhf7+1idGttx20m85ykiphLnXHoBGtRnkMf3pKo\niC2Dzz/9/i01Y76qMeREj9Zwh9OzR0L5/iL08Q6eYipbY+1S0AQk3mJiAWLu\n/WpQzd6I+cPhXhXgwjMeczBKYIxmR27xGURWh0M4sdxVGgAyPGxBtUwH/f6W\nZjYMIQ3tPAAtCmr6X66L2XVmx459c4Ha0g7KHdtrWsuvqRMDEv7OO0gHgYeT\n+Xi6ry9SGJojebpbK6+8cRexoi9ae7C4Z0uMBTo2CfKTnasQFVzTJyftDt5c\nDVACpaMIT7s/ydSrLvEdfWN9W0EGCcZfXQRce5fCNGHEkw+uOQd84c3kfX9A\n4lOSA806WXoDf1nTC06NiOQwsYcT+jVfNcDljIKz2jIQ9v4AyrDrd09CkJxO\nCmMF\r\n=V2mM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"93002b5e79b34da66b10c7e8b6e0f278661a039a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.1","@storybook/router":"5.3.0-beta.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.1","@storybook/core-events":"5.3.0-beta.1","@storybook/client-logger":"5.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.1","@storybook/addon-actions":"5.3.0-beta.1","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.1_1574087874325_0.2302994434295711","host":"s3://npm-registry-packages"}},"5.3.0-beta.2":{"name":"@storybook/ui","version":"5.3.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a2b0b0c6f805e99af842163a64068c1c4bc2db1c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.2.tgz","fileCount":86,"integrity":"sha512-3DlDbRM1/KSDkqOK26NaoisYanlZUn2uwLAyOkoTtbeWKx6aWVJ9SqdQZ/o2OpHdjHiyQ2VKf5zFMgdHJHcPWw==","signatures":[{"sig":"MEQCIE/Ngs4ZLbAIXi6R44T0QDRlRMgIoxrtW+LP/5mULxIKAiBDDyvr0Lk3Cz/q3zd0dsNSCiyX/rCNTMYSxY+o/hCifA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd08PzCRA9TVsSAnZWagAAFHIP/1Zb9pxFrP4xhZ3Ifuat\nFHHdRk+sNskM4O1HGZFqDNPxOzkjlOysL8rm5un3yHuo9w7qKkVguRwxVgT2\nQo/y9KfoGi+CnqoWKj5TR3POBb7/sHnGuj9ZAP2KFnrpJi0vukv/WaQgmBk5\nbucHyL50jGmooLvuMDXqYmCHQ2NQXvRNqpP6goT/VroZZI6+jPSb8+iT0WbH\npch4vPgRV1Armw7qP2LB3eooZsJ2+5sqPXHD8pXzUb3+gUtUpHLHj/79CmaG\nkAZWz+V51TIrqJRcDHLtskgYpJ24xvbT1Irvpp2H3L0ZU3LbARK8D8DuSEeM\ne9vc053OB/ZatiyjCK3OAQGqpEa936EAcWbTlv40qoxpqszaA1hmMDgFFmg0\n6l/vUU8J+To0AX7Pmh8rpGRVqkvbImyhNq2as6RwwqEk163gs107REPNRSEV\nzmzrmA2cHhkE1i5t+3pfRLCob/+HJ07UcgJUUeIl9vSD+IaffxxBu+4u89+x\n42SxAwSvk8U2bG3wETgRFm4LLVbdkw4gh6hxqyE3TzLvmiZI9WKU+rSLRFfw\nuh5rKeIaPbqObbzqyONNcG3W4BUx8nZfrTkPWIThE2bGsvYDpVBZNNhusQli\nMoGeFMT8EDtuC8Tvitx3VSaUIPKAdLU74apAmRW3BIdK+4o01oPVJHl4xL+i\n/h2Q\r\n=igyV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"27dbfef1d83b0ddfa3d1e9510212ac5a2b82e25f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.2","@storybook/router":"5.3.0-beta.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.2","@storybook/core-events":"5.3.0-beta.2","@storybook/client-logger":"5.3.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.2","@storybook/addon-actions":"5.3.0-beta.2","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.2_1574159346756_0.42859748351511784","host":"s3://npm-registry-packages"}},"5.3.0-beta.3":{"name":"@storybook/ui","version":"5.3.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1b7f10353f8ad1288f55391b3a790cc6e89c7710","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.3.tgz","fileCount":86,"integrity":"sha512-eqcPXnBMvZhkwcYI6qRuI4GxLhAb931+T/K45wb0kfO10iYllSFJ+rLH0wo2snhE1HGvQBMx4z4ggtpi9oEfWw==","signatures":[{"sig":"MEQCIEghSNSgM2kytpc+XdEOfMlflzLa+PUgNqCjyjSbW9SDAiBpgQKJkFHVgFNpqjlnrJbGX4ElrMr1mefab0mAnS3h+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1jLxCRA9TVsSAnZWagAAO6UP/RKqMpi7CxF92DH6+Q2S\nPUbhimpydLO/ZoaINXlNPtie+4z9ryNJm60jxQmATvA6ONjQZ9WnuRt3RVOS\nkpUDwsfxNJQSjNhdtgHbvl+LoL1Ygts4zj6ZKCR/TsM44fbplTT4RXVxJ6Or\nedMuE6BtzkyIY7I4fJv4Aaej5dsI4hk/q8HZHrYTb4igTznUf3hyAAcWHusg\ncMRyzhiMQqfuOQLyGQE/AURPkiTvSt1aiGm5oS1jhKNF34sHgTM5bH6hZHLv\nbecA9OfB3f9S30WvIDmFeEpkpMfqxuO1eBk+1t31VqK9qK+XidNEXb/7FN9g\nnSCCMwjGei5oplYIIKcUHoTBvK5LtjQgsbI+CNEco9zXtL32ubsCuf5mJ1cF\nqxeYU0ZUzzm938KNXcgZ31xRXGhSu76on6Bz4uZvcBYnxeLVG+iIJoEH64bT\n7DJd/pQyRwvkiXLI6TjVpHYkjEoc0VdYwDPvbEa4E/O9o0/tM6iud7nAKDOE\nP2VbmZOuhq/w1o4oV0iPW31rMnI+yT0zeiHd/te+ef52zdHTW5AM1mysnsBw\nut0ePCTN8jzHtSFZlulVe5wVIlSkq1ThqQjh8TCStdKpgavW7sp39ld/nlFI\nRWJyMj8L6zz28ReuMR0bIDfkRz7EgUKSfMqkcRj6xjKK2lcQL9zGfb4ROS/t\n7wdr\r\n=7MKJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6472a3735300cd43ed4e34c9d4316efc41f3f043","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.3","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.3","@storybook/router":"5.3.0-beta.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.3","@storybook/core-events":"5.3.0-beta.3","@storybook/client-logger":"5.3.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.3","@storybook/addon-actions":"5.3.0-beta.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.3_1574318832898_0.1280466111570282","host":"s3://npm-registry-packages"}},"5.3.0-beta.6":{"name":"@storybook/ui","version":"5.3.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a8f8ec8b9be6177caa0774ef60a176242e41bfe0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.6.tgz","fileCount":86,"integrity":"sha512-dzzVq4XEED15UnW/DvkEo8rs7pSCzamReLBqOgkK8U2prAQAn+xEMZuxhYWfKvZFjEnUFCI/l4f1CtOT90it/A==","signatures":[{"sig":"MEUCIEAiwO5qrniDzawhuWPruJUNnRyJLxzn+lPIAYricwCmAiEAgtvZANYjPS/sC8Iyqka/c/rM1jrhR75CuDko8GeUrLo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2kYiCRA9TVsSAnZWagAAzFwP/3Lwtl0Ypmi6p0oErZqB\nwLJg7GHra4rF/3o6nyWEqOZ5iTWI5Ro+l0dV9DCiHfXekY1HW+DUJp1jHfds\nlvhIwWOomeM3gZeceVi1tOlMAlJ0Gur4Ui6+v6evJ0Lq5HrO+N0JhNLBB6pp\nhF6eP17M3ozq7Q13Sem04JPTVKIF3z4qAnty+GbwEhlcd6VdTBHbmJ8Ykz2z\nKRXw0wzAR0xjNOimscRW3s+JM3gC7MUBr/YZgbI/wdRAqqdV2iVYVRFkQSXR\nw9r+2sQ3xHdtkCqG1RR0qGe0WvG1WzSDGtGw1pmyIBX4AoKZGYbmptCLftdy\nbMW+Atsetx2d+cBZOPgRGLzBJ8OmkNfdPeXlQYeeths6nFy6ugOecyVTnHTJ\nZA8Oi7QyF5D7LnXJexDx/rNv5CGFU58O87/FnMJ/7VnXRQNV5A7xL1QXgybD\nCpR/Q5AgTy1SFywDWcb9eOfbgWwkurJkr2zPcCsTr/1rm+VAxxovm3eP1Rw/\n+W56gqxmKhRnGSY4AH/Vd/6DKZAT96SluuSySszyD9oA827pW+TBckotDbik\nYqMaYds5NbMqiTlwW6vQnRL4T3pP8gt0f0d9Yr9zHRv4g3B7BnGv5XD7kt2J\nhDNrglZKcFgeKUc7EaZBVOuDdIBVFd3dDAR1TbEIlP03BlxKN+cd1BihpQ8L\n7ttX\r\n=oCKp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7256fe638b4f7a38b39552470189fef4604b834b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.6","@storybook/router":"5.3.0-beta.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.6","@storybook/core-events":"5.3.0-beta.6","@storybook/client-logger":"5.3.0-beta.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.6","@storybook/addon-actions":"5.3.0-beta.6","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.6_1574585889730_0.4169305717295162","host":"s3://npm-registry-packages"}},"5.3.0-beta.8":{"name":"@storybook/ui","version":"5.3.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"afb014982fb303e11ad62c3145904240f7d5b66f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.8.tgz","fileCount":86,"integrity":"sha512-6svvrPhqr7518Wu4u54CSoUZQ3xQ0BYe0z0zwCSBjhPkCvdlV5rcFUMTuwFh7CNM7pafFr02to4x39aPQoe9xQ==","signatures":[{"sig":"MEQCIGkbJBkeqocbau/1t5sdNlSHX+xH3a3FhitIRX5q4FCgAiAOpprloczeJ0I/GOv2L+whXUEjvE78S399o455NkG4DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3HpACRA9TVsSAnZWagAANjoP/0w4zaygneFBCkNGZ7S8\nmKjboP18wpSRAgkhYnjoFT1hef3N6dBlg8ttRykanHE3PF/qiXssrNch63Cc\nhLJjR3nPpoBmP+5duhC592N+HWtA7GBAZfuao9McEpfCrGGOMvUH5KOXdeMk\n+wJP/gxC43iCnOxmUONu4HB8kitm7zKL9aPcIKxa95eNHkt+L5UmTqI8yjjv\nN2+szJcHQ6+lZKqlKXlytjZ1UW+a6pIptu7eRuhuWQeyO8ezBKYidQJi93kY\neMXBWM6e8noPpAEr3pwqz9Af213e6j56v5YwfTnFmAztkp5ZlsL/1cRWxurF\ntdLA/MZGxogFDVzHJspQjxheoDj/rxq2qb+FEAt57+C6s4h+yVtKGF/Ck26f\njtydywSDqZmJqOqjMTvssAfoFq6W+XZph2GDsvsV17SXLAH9HfWBkTnaK6pK\n/JXhq54hLAUW8D66PvzYL5qLxkgQH6fhMyGxpiLQdWg02y+3Z0okGmlk8GWa\nNsTko9/CmbwFCExHYZdul1kDQbA6hecJF3jHNS7nAt9CMM+N9VYtDBkPu1Mb\ny0ZulINiluB7IvhljI6eeQUuHCnq86ewL7JQ8dLYfTvFoBxG9zQU61WKXzH2\nZfHvOPVhgBAL5lfLnUxjZI8SRe5asQwVBTyyQorUtK+OBWu/sBsy1oknjwXX\nc7o5\r\n=/eX4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c6332f5a080dd32aac8da171e122ccbb9df9a2e3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.8","@storybook/router":"5.3.0-beta.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.8","@storybook/core-events":"5.3.0-beta.8","@storybook/client-logger":"5.3.0-beta.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.8","@storybook/addon-actions":"5.3.0-beta.8","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.8_1574730304073_0.27031760081372935","host":"s3://npm-registry-packages"}},"5.3.0-beta.9":{"name":"@storybook/ui","version":"5.3.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"298e01a60e58996d0cdf597a1de97f2d839d1174","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.9.tgz","fileCount":86,"integrity":"sha512-cV2T9p0MPeZZOLLkpylbj9Lk0ZokaibRVdEFE/8k3YEAYG2WNlN0JHPOhfdzibt+fLHu3D/kmsxMFUkSPoD21A==","signatures":[{"sig":"MEYCIQCFkqybnClLU6SSL2jFGa8yH0DppHgc8WHIJizpgRbXjAIhAMv4eEeAP03HpV0VOQhFJn4LW2s740kl6MdVSTBAkEt5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3PYxCRA9TVsSAnZWagAAerAP/ikZG2GVeUD8EtXpCEB8\nky5Kc7Tf9szHME+mS3U/Iaq/4yvuFyjccTNwdiZj654NZzDidZnR4uMYWpkd\n5hOhn6Z/DADhV4syQOgXIrWilYhmdANIOo+FF9o2Ct+A6WCS2FcYC0Cjpfsl\nMXOc7EmPlJvWVbJBZOnt0dMKq2sjciFyywseechlYIycyP4vBARaFMcLprVa\nCH6ab6TqJyfupwRxf7GfyNdQ3M7UxZxT9MU+W2LCMGnCPboIAK1tXLC7dwp6\nZI3VeoKYGU/7UdZFVM80WWfx9ZNLuA9aT5CvScMsvszQUEWH0Q5QaVjk+dDs\nSCgx3fNWuYgZn7c2g2FNEM76osNteaRHjiwlab0MFtHKUasqbOo6RNB8NRvz\n4ttKWy7zlparQPMjgDC8AUhP4dUH1VgYUPjD/vqgrJnp17DHq0sHDZqn2bUJ\nISqNUytqdfESqBPY7DZVX41drAXyvbk5Tqx4loGhnWx1PvBtuqHbgOFUa7jQ\n/6ft9rw9orBrL31qXu0JyYB02WOcMh5DOn3wbdMQTarBCpEuf/MI0tRVWue+\nQwFmMeoyoiiZHV3IJoTg2ycpcWMljlzhiBsd9AqFUCuTCXbuXwOFRy1zuSru\nf2pRbpQkcBafF5RGtaminYWj4gdywc29Ydsvy9O8mbbCJmUE+6kCLLr2ebJR\nBk5G\r\n=BzwQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"82c574db7837a5f748e47a5dba1efacbb0214689","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.9","@storybook/router":"5.3.0-beta.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.9","@storybook/core-events":"5.3.0-beta.9","@storybook/client-logger":"5.3.0-beta.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.9","@storybook/addon-actions":"5.3.0-beta.9","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.9_1574762033388_0.23948241558324201","host":"s3://npm-registry-packages"}},"5.3.0-beta.10":{"name":"@storybook/ui","version":"5.3.0-beta.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5149084d097171ebd6dbf002d53e98bf4a7751f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.10.tgz","fileCount":86,"integrity":"sha512-65eEAkJSvSuPp1AvJpZ+eptSQrklBOtqOtBSTTmpwYdJWAcKAqjobBLgQ4SrxV8IfhVeZFrbXW//AFfYTDSs0g==","signatures":[{"sig":"MEQCIFfrdWV/szSDFOMxuBQQpXo1r22O7UUf50oedQXxtzKvAiA+EJ7qBRl0Q/Cn2fsu+WJMutulFaC3UQsYunilzqk85w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3dCdCRA9TVsSAnZWagAA0wMP+gINU5OSzB4KPQXK1X/f\nukfWzLtQYLIlB7+HKgaSzIZ4ncRUx4zprRO32R4j0vUDEsvf8a/7qdYPPmWJ\n1Tel1K8+Fi8xv/yCxZSz+MJSisS7dfptjgeQReCjH+fmXOcNqrXlUZn8Zn6z\nEhpIutEwkeA+H4aZuT1Cz1m6IRDO6QYCT2Iuy6bfdU+W9mbiwoKtTiyWP+dX\nJykV+/jfLJ7DdrmNpPvzYuoB40uqlHz4Ov6aikda3k9ZKn3TZ+ggjB1cZAHo\nA+EP5aqfgAcJSHsnKss/SfmhhVRzY+H4zOukP2UxNser3CAiW2fgd7LqJu7w\nxgWzRdUsNTt3YjoJBPgwnvlhkmIipRdM26EzbYTl4U1wlkPb+BQ8kwbPpa+G\nWJIRQNqnlD/jhtgNA+9Eq/osSkrrGyvI4WhWC0o00RaC1jUoWnlNKP9Mm8Po\nJHSEy9RiIKdS76yQ2z0Dr1urLLvbQLwD3orDNcTJBoDScy+E98C81H4VshKu\nWWjxntkZ+MozyLrXe/iuc9pHjX0N+Ah5JiFyDUVV1YYd8xoi/iSrwVB0JTZo\n4wKeOleo0Io8iL/vgHvl3j8W2lvBtUEVgzW49TDlXuiwz0/K1HnNFr3cWAO6\nfprqVydF59oaZIAxn/lNwYoRKt4CIqiwnWEomEkBUGjD5w64e1p0SXgWJBY+\n0wGD\r\n=n02/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/config.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e098a12bf89f4a50b991c5aa400dfbcaea03706d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.10","@storybook/router":"5.3.0-beta.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.10","@storybook/core-events":"5.3.0-beta.10","@storybook/client-logger":"5.3.0-beta.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.10","@storybook/addon-actions":"5.3.0-beta.10","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.10_1574817948938_0.8308335635561175","host":"s3://npm-registry-packages"}},"5.3.0-beta.11":{"name":"@storybook/ui","version":"5.3.0-beta.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"35d269ac149e289126a013b8026c2d28c82b04ca","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.11.tgz","fileCount":86,"integrity":"sha512-M+89JqADyQi7yC1NaHQyvQhsXfQ2XO44jJhyeqoMp7p183nHXpyxhuWaOB85AsBXUKLRMyd6oLyYqibaz4F1rQ==","signatures":[{"sig":"MEQCIGLdOhsrbki2q3GNaCUla3gdorGsmXc1CMd4MNTJwqzYAiBU7a/I9mm4eUL+4d/KBe7967Vt0kxuYQ6l0ZCcBla6tA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":379073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3wMbCRA9TVsSAnZWagAApsIQAJ8krxasydEqE2TKmBdv\nT02JurM/BJp3bM0QZqJ+k9j7n6FTJ3qtEoKssP1T+KuJIXBYTpZs+3EwvEd0\n/qlbqBPrREUr/SKcz21jnAeUXg+8VXVypgtTm89m/uNu4uL8wO/SjuUf/zBb\nboZezxImTwVBVUx4IGb+dI73YSFRmkZ2llX8VrV4lCvjIBSsQm55sdEh7SDI\ngym8oXvENA9JD+75BVn/+eBI20RC5uX/idIeDT8veKkz2CcPEGHtUV5gPVmU\nY91WVkXkI0dkhN7MdLIfTltoBLcM15BZyIVFq6NCHp3Ml8yaUMKt9mO0zvSr\nx4mT3sH6PIrRAAw/PTZLV54Ip5WDNnynS+vsxxyZ0t0UkMj2IiGTJ83DKWWZ\nvXpLJusRkrIJTO5fxzhaDayOEWRx9Lu3NFHjW6vZiPQs+B2T5NyUP1SQp+Cy\n2A5iW/MAB24QEejaqlIRMOZSsb6khn3vEXuZoL7/7kyBxTXzZsyoMaFsZSmk\nF1RDhSpimzA76E8ZuydWVBNKSuFNFGTj4q6xGTqCwFmz4nEetNGhzBXeB4Kd\njl02FSkq6qaVEpu4Ht4hbUrEzQzZ6CAYWDBzRW/eqd020QGTFLb3ZwOkwOMd\nIHKvB+h7NuoGFXbpqXPtlldY/vtRvpzv3GzoqGx6VxwihlDE0lyM8Bd486WO\nsn1/\r\n=h3IQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"51b1739038f6612b7cc6366c49e4a30c21747f1b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.11","@storybook/router":"5.3.0-beta.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.11","@storybook/core-events":"5.3.0-beta.11","@storybook/client-logger":"5.3.0-beta.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.11","@storybook/addon-actions":"5.3.0-beta.11","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.11_1574896410635_0.03323897871931858","host":"s3://npm-registry-packages"}},"5.3.0-beta.12":{"name":"@storybook/ui","version":"5.3.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"38cec474c69ca979863ca972d86af5e6533f7013","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.12.tgz","fileCount":86,"integrity":"sha512-xwkPyIxiDJjNMEx3zVldu87ZaGt5xvWZF2d7JyZ+jO3RMDbE+vnbAxui1PandHN5NAOcGfZtKpZZXxVUPItsBw==","signatures":[{"sig":"MEQCICn3W8JxGMnnl35e+f8Z1MNOE3Z9ED86QPISjlCQ0SIYAiBNav7j3V8LdQ6LgtqA3mCsfGAwg/XN2HkFna9hn1dpLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3/+UCRA9TVsSAnZWagAAr50P/14ucJCxezZf0W2g/jRR\n7OKAnv1mQxZZ15Q3ROv9ldiX904UkU1uoxJrkFKXjetpDpMedf/IK/5gl7QO\nFH9qMSKWvxgR+lsURh+CM6ViQ9LQoU26q+M3OSxXNBHtM9FRDOdIvLgQY1mp\n81RlU678Y79S1KeiGR62MWJr+XZgY02lNOg9vYiiUheZsYGXar/hj/3LXvts\nesbYDiwoGwGYgRtgCCfLWKBvStQycu3HvVv+VSdj7o16twOIjZqhGm8V2UE6\nT7FCJ3cjKK7Hm59GiZtOdGTz3JQEw1IrOtpR1UJ+kPCZMISPbRwn7/ervw5U\ni5/yb2y6HaDVhQpcqjgJTGwA0pStaD4o0pWXdzZ5kHlvhIAY6i/O7tKdiW41\nc0SIKfDFuyLNpt/fGgrzMKi92V0NG3L3f/le6S9vxcnaj+zRutEFgZd5lsJr\nSEWQXRAQw/BKqilENLfd8TII2rYLzg31uXIGdGH9O+DZ63w2VAVQc8W4SYxM\ngiiw19JgKEZyoo0VH2XeKWFFvBmBpWvRjv00ctXactadHFg58rjinRmCyl8u\ni4VkJ3jBsdXTT/y3TBbmVn5DK2FDJqd39hwp5Wh7AQE20CGkrGO5t/katSCe\njOPQIYGJMQhKMHSdbVAtUGiZVonFxTx5dGDh7t81aeVakaWg9fl4bjDK17/M\nCSkk\r\n=yosJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0577c421a7c7d4fd1f9c03ff22cd1cee0b55cedf","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.12","@storybook/router":"5.3.0-beta.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.12","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.12","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.12","@storybook/core-events":"5.3.0-beta.12","@storybook/client-logger":"5.3.0-beta.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.12","@storybook/addon-actions":"5.3.0-beta.12","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.12_1574961044189_0.9445661364024656","host":"s3://npm-registry-packages"}},"5.3.0-beta.13":{"name":"@storybook/ui","version":"5.3.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"453c106638b1cbb8810303e61323947c5867ee4c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.13.tgz","fileCount":86,"integrity":"sha512-L43XbJiM6b7bGCzCqxjdTt5GSwnq0w/z4Fj/6og0JnIEv8+xtzX3EsGSS+YqzHW8PT2Qo3x+xM5352LDczwvIw==","signatures":[{"sig":"MEUCIBc3zvHzjCW7dqUVPTXmFZ6bqp4LQyxa+jYVIE4nYDVuAiEA2phR8JJv1MW/7zzOM5wtzn7ULU1Z3nId+wK/Xguu9BY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4jlyCRA9TVsSAnZWagAAJusQAKHUgrCwgmHPrJRlYBEW\niLLhQwHYeJvuKVL4mLs525v9eI1cKLHh3zdRsHA9erkL+c0yExioT2i3aca5\nxoBdcYiLIyq/UwaV1t5Fhbb63DhscLVeMONbMrHYjGNKVFV00nulnOhjLcU3\njq5IO+ciMY02/OEKfzvX1bmf26cOJG/NsZD5eFpnzu1deEkhInCkvtbB5cRG\nM38z5j+DNe7VMztOmtvbccCVTRV1d2yKtEnhNSOf4N+HP56/j9pE/C9bLCnl\nLH5kgWDVz03ys3vWInP6MI4y6eiosnvTw19H19ODmgs2u0xdfZXv0AcmBSWz\nIkHg7rZYnNVsYOpqOkbLW4ioA8V0VlLrYcYx3/YiaB88PrNzGHW6ulBVYa0U\ncXBsz6wa/DbRjY7FjCpqYKW7WXKHPjeOGUAA6cHyP1S2E+tbRzDbF2+jd+aM\nP8h1QeiGky5bn1GqozLYauaFnf0h71P4N3mdxVpbKesd8w3Y+Icmff4NWqmO\nFC8loQTa7EHH5Ng4Aoa75XD2e766+awr2Qz7ALsAdtBfs6NIocF1P6rh5eP7\nDrL4T3BSyeFA4k1HF8W2kSj107msZRrHuqmRT7ipGDjiKU8TdUgURTod80Wc\ngZ/voR4h7l72v5eTSSmNiQGBiUulLuv2jKsPhGntTZ4+NaohZDveZa1ypDAs\nsWXV\r\n=+jkb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"830455efa9a647d14ccb0b5db8d556c3a98fe3ee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.13","@storybook/router":"5.3.0-beta.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.13","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.13","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.13","@storybook/core-events":"5.3.0-beta.13","@storybook/client-logger":"5.3.0-beta.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.13","@storybook/addon-actions":"5.3.0-beta.13","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.13_1575106929396_0.8448217563545204","host":"s3://npm-registry-packages"}},"5.2.7":{"name":"@storybook/ui","version":"5.2.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a80ad3c647df7c494c305d59a03b931ba92e0e92","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.7.tgz","fileCount":86,"integrity":"sha512-muTEFTqaXhkuEtCSHhsxmrWlI+8inqdKBjl5I+gn9em4OnXI/QLPpwNh/WmFulL3nJVt+JQbA6JV3hanwLyudw==","signatures":[{"sig":"MEQCIBVU5MTdAJ9/qD28LTEgazpf0RKTdSJRmnJHLf4XQZ2KAiAh/rzs3MsdoT6Nlp3yeo0N2KZrFcPrNP9QjyaojSjAOQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":376285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4mvyCRA9TVsSAnZWagAAR0EP/Am+zQ4KwyMuvanHZkam\nKUU9t4VhbE8ZCB6pbfdICOVxIbaELVztLWIELVU7hXr6Uhg6WH6pMKAbeWC+\nSko+KPD3uiKS3+WfV6wGRLH2sK/NpDiYIgrsfT19nlP9V61VLnSwZmGatsC0\nwxim2rAY15nXL3Id0le7p4cQlQQmzbrIYUG/ZDY6u8hWOp3bcLswaPUg0XUb\nDh8qlro04xQTddLNpBC7UrxKq9XgoOxhPs5Ll1/0qNVPetG9rxBjvEn5VqWe\nN87jgh/qQABIDUKsAmpo5IYENO+L4tnhxRZ2Wf00jD9pMBvhY1nzxZ4R5hWb\nD0MsZEn9IYqHPsMSKE+rAD57Ul+OyqgcGO6fwZrM6O32I409Hy3IN62Xtu3K\nh/QnuR+tC0kHYOrasKRF0TIIXF+0VSgGDyn1YXUcuAOgExPB0ns08QBWj4J4\nrGeAj7VJw95YMcrQeJmrKJ0bY2BHLzKvir6OiAM6M46vBgb49gp//RpXWGPW\n+2se4y3PnqEuxQPVThVQzqaBFeAAqyZzZqcr4/sRZgntGshU+EuPKVct2PCl\nMqaB9yqENSq+wAFZM8bRF6CN02QAQnPJUA4oJKeE7WIAwx0MZ7umLh3uMvGP\nZdPiltSV/sbTwzCHvQZcvm50aq2/wrrMof88GQs/4ncQccuhQAIjdh9fCl9m\nF621\r\n=zXki\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"cc73963b943213cc0e7f291d4d813d5f04c161b3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.7","@storybook/router":"5.2.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.7","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.7","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.7","@storybook/core-events":"5.2.7","@storybook/client-logger":"5.2.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.7_1575119858250_0.5310053650462117","host":"s3://npm-registry-packages"}},"5.3.0-beta.14":{"name":"@storybook/ui","version":"5.3.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e5e7aac4fc16838b976d81d629f4017ed603298b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.14.tgz","fileCount":86,"integrity":"sha512-66bDZYWdx0MtGS5X7gqjmF8F3U+5V4WSsWDF7G8Jh0taGuUSl1A2FfKB1Gano8bPMeg1zwIwBceM26M7th410Q==","signatures":[{"sig":"MEUCIQDVDGHGwZdDo5zVZ6n6jBxTGAy/zhaAE1qcNkncfXf5iwIga9Q6f5DomeB8yYD5Umo5YO96A6NUkC+Ryup6vARJ/hk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5IkwCRA9TVsSAnZWagAAB7gP/RbA7UVDcmvoj4Nw9sTv\npGRPJz6hh8JjjuzbkdYMkFCiIsMoi34Fxh5YS5waDxDVMmD1lZEawQvYEBh3\nLRQUjtR4MBgOpgBnp8WdUu38hytinsD+kkbRsp52Afx7+NoIKs2SVKL5oLCW\nKhjk/tluYWV9jmNS6PweOW2zrSNvHaLeO+FdTQGM99NezlqsJ7zL9LdyHc9g\nonDkjaRdRSIK0bE48eq5NBO+1GcakHlHLk0G1dhrmFVM1HlsjQOUvvFkmL88\nwkygzvUubSg3/2bRqYfEIqtdwWbzaPIQcFgnXKkl3xmwWtuZ0JOjhFnYCsob\nKyLN3o9E8LXPWyYfse/irjsiPGTJzNc42CV8AtHHcBM3acsjRTUpqtmf+l+L\nnLkRAkgtO3H9xUvgtgtbJ3b2hTB4K+0MUNGFW4KmF1cAlRSy/C5hXhpg037Z\n2Mn8sv17O562gsyQ/qmTsOAYt7zbNwIvcUHwOg3BrDDx+4bslCsyjxxlJzKJ\np8rpbUI5S9X0sSlkITrCx41R+gDVymxf3k1S6bKT7ca0BWL/sNzOkb1krCCK\nr6LW52s2n2E1uIICQLKOXHngXJaYIQXOBJ8gHdz+W6USENZv+W48s7ijwsjw\naptEicKSM+T8HBKJJZS2IHj25AtkyP9s5vMIHABO/8Q6mfejwZH47BDEmOyz\nUhUU\r\n=E9pg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1c93a96d8eb248ba1647dd64536cf7f9ea9f63b0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.14","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.14","@storybook/router":"5.3.0-beta.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.14","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.14","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.14","@storybook/core-events":"5.3.0-beta.14","@storybook/client-logger":"5.3.0-beta.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.14","@storybook/addon-actions":"5.3.0-beta.14","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.14_1575258415764_0.11757025546515143","host":"s3://npm-registry-packages"}},"5.2.8":{"name":"@storybook/ui","version":"5.2.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.2.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"da8afca9eb29a40ef3ddc6a9f6e76d7a3344f2ef","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.2.8.tgz","fileCount":86,"integrity":"sha512-7t1ARBfylhEsLmGsZBUCj1Wf1oAgCDDrf7fi+Fhdg5Rr16CMoBbe24Gv/mPYv01/pUDhGodxzltKGX5x0Hto2w==","signatures":[{"sig":"MEUCIQCaIlUm+kRlnRWqCVPwGpYrjXM3TLrwTdpbsmFt+25ihgIgW4G4jUgWcAdNWjphpCxcca8TVcTtWM81uyVyzilqgqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":376285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5K9dCRA9TVsSAnZWagAA7n0P/iiXMOQspTsWNW+uw744\nifaVSrqPcqlNeWZwjVPL6jRcAYA7iiaV3nNU0EfrXOzJ+7LYN2lr2i/pKsFh\nGBjRMSHVDMX+higXZVK0MbCbhSAV0z0LLbYzIYvkikRJ+fY5RqfKK5dMf4pp\n+Nezbw9Wa+NPcfjnxD3S94QMilFaLaDQfHWJKSr95qp+mdB7zR0kwUf1zFLr\nb12fSYC7hrzHTHAdrLSpClO66BN5MD1xncSXPK+24Sxfzx2WaH5J3o9U596n\n1HBOSjbjA4W41MPRqM7tRXLQiAd4u1xvxYES6LlwHkaNZzByyKiK4wQ/DQ7V\nszpnHPT3ESumV1rq0b5vG0ydP/nIeEclfc6Nqn2sFseRkZ7ju6NCmVPBH+po\n6hY8UKVpUB20feD1JwCpGvhXCZILXFT1QGEFM90Fj+3NElHGprg3cP2Se0v0\nCj/G97uhgZu9+rggjAzxNf6xdl1dV7A5z/HxjJIJQyFVgeKhYqx3N934dyPH\n5lBjfSrb9LLZd0FIhFG6g6RdE3n5r8vlKM4one5W52WnnQMfMbd6rMyHqgKK\nZZnCBZEg+Sx6F81ZA8q5hgNclRb0KTnJZtInUV24KSyDzc37tMy2yMNvKkaj\nVFXE6SSfgDZMvOviUWKJ4kL2GByH/X1Ngs6w7ya8nd/9BTUszcJ4DGL1g4lK\nkmKv\r\n=IPSw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"1555b7b6a159a9803e2bf48fe4b2095c27b810dc","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.15.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.4","polished":"^3.3.1","telejson":"^3.0.2","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","react-hotkeys":"2.0.0-pre4","@storybook/api":"5.2.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.14","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.2.8","@storybook/router":"5.2.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.2.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.2.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.2.8","@storybook/core-events":"5.2.8","@storybook/client-logger":"5.2.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^1.2.4","@storybook/addon-knobs":"5.3.0-alpha.3","@storybook/addon-actions":"5.3.0-alpha.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.2.8_1575268189185_0.10221239703812168","host":"s3://npm-registry-packages"}},"5.3.0-beta.15":{"name":"@storybook/ui","version":"5.3.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a3ff18de30b676a67acf2f35a8e8ac9244b9bfd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.15.tgz","fileCount":86,"integrity":"sha512-Zv01x5xCguVwwbLaZu/E96Ujh3Ec5zERH0+lh01+8M+dXJsW4rgrCaBrm0MzXGyBwdLhiac50xZJj1U+zXTPDw==","signatures":[{"sig":"MEUCIQCC0XzGvYQZrJBiDoHyE2GuaoOUuM6jGOO4xTlJhSi8SQIge+nnqWgp4C+J4zWaU+M3AXEmez14GajsAz9oZPz6OnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5y9HCRA9TVsSAnZWagAAdnsP/iDYoCiy0RRxa0L8OIPD\nAZojw3YH++OqQFl1r73QZOYrF5tCp54cYmx0F7AI7JKheeQTNa9bP4CEkNoP\nC37ywBiyOFj6T0NUxdeS7a0KI36D7RaZR0DKuZS3epbpNHshuwpxAolVtPS+\ndz+LQTaapSR2+F0dniRSlJMGxc6GX20U9s+THDyXIZ43WHTlKi/JDGdfCZ1I\nNNB+7jjcfWI/RRkRG2iFWGQ3Cj8P5ZTkKeBq43qs0E2q6uvaBD3Ta0kWec9P\nqgdYB9suT/U2dAyCl/Fhb6vSbKgrJ2DjNK9FQn9zdrzVbe3bjFQWc+VuQk94\n+VSZxuQznyYzCNgeK+mH128eIzXVpeoVpCKVpRp8rI8uGgdllWP0rMFlFowE\nIq+tiOKS2tAZ8L31MIlGrcpYwqzpovyyMEhz3BQCkKvEOqIP8HSYABE8efAJ\nwf1cJTMi9tTSMMV2wkBYpCSwUogDemp3XeXPmvEvdm0q9oNbrKc3qhgkY3Y4\nX7XsPcKcLlQIE537xHXYeuBjjpJ5BxvNeHYl22csH+xnHDennsO73iuh4w0f\n37R6UoGC491u/P1KcPhljgV6dcVePSOpv0C+miD8heWF8swrOrH3hAR5XpWW\n6rY5xwybbzCkLBPO1Uz02RnzjciP/d4ByMFfmc9aBDqN0qYaQLS+q11Pw+sT\nfeld\r\n=E2K5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"95fba51683681b34117c9f1076d15bb6f257dc86","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.15","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.15","@storybook/router":"5.3.0-beta.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.15","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.15","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.15","@storybook/core-events":"5.3.0-beta.15","@storybook/client-logger":"5.3.0-beta.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.15","@storybook/addon-actions":"5.3.0-beta.15","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.15_1575432006971_0.6659242835448911","host":"s3://npm-registry-packages"}},"5.3.0-beta.16":{"name":"@storybook/ui","version":"5.3.0-beta.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"53f0fadb48d9264a6fa8b8f2f49ffacb508bb302","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.16.tgz","fileCount":86,"integrity":"sha512-JK2/YoHLPYwRrGbWtQSNiKcmsBcZ1GDS0BKMnXiKy9f+Mi18Ti+aJtUa/8mWQ9lnRCvK7iKQjWyWmMSa07CzQQ==","signatures":[{"sig":"MEQCIAwUNQFYwhLnVMifk9Yah9yBASVPRJONTsu9NMz8id+4AiAL0ul7P1Z9CgWK+6LKGCugV4mul6HX4pCnad4R02XTkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6Hz+CRA9TVsSAnZWagAAn1QP/0Ynt9xu9JThkQpkNGJ+\nGx9xPx8v0UprkgGUFWe6ELmmxNfZtMKE0QdGkS2abuEPhNvviHTZ8amGPGUX\npFdTQ4Yh2YiYo/XckadY7eJEwhZUHhgWGqVIv0JktpVN9/3aI8yPfDB5/T1x\neTN1sDOW8AmWTBTQ80i9ZCNXFal7D1ReQp1iuj0wYnsW6vWUyuPZxougKWfI\nHt33j7K3661quhh+/rBoHx7mkuJ+Mbjq9iDjq2jXeJljWVI7eNBSK7EWB2PB\niBGxTwUjrvCjvH6mQpW9EQjREVe3WhfXtY1kpTQ5aOABNNB2PE9mbN4hitfb\nJ4Vezhuh+hgnf5Cg5x4ZVf9/5ehLyaF3lJd3oAaJyFL4crklmgRZcXwn+Ita\n1sGBD5+TDdQtZCuVG/5CWDt7oXkrEkf9090RovXJkRWpJu4XJ9pvWw9aHKJ6\n6cr9ABdhKse7AuPAUrdVsVRikIfOsts5iJimcwV20fDB1cpMX+Vsj4/pfk4l\n1C3Nxnk42lFY70sVWYCW01XUk91TLbpjPfEo1osRvqnVyLvpk6blviRxHrv1\n2oqyLeuixdZNzEUu7W1HclhqM9F9x2/EBp7nUcC657u/61ySRitJ4cQjH86b\nZBZTV5yo6GAIxVefVzRwFB1L1y7V5uCQlfKNMcbfKWfM2rqipAg1zC5ltCp6\n40ky\r\n=jBmr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"eeb36ed8220c52ba15420a090f415ce2945504c4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.16","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.16","@storybook/router":"5.3.0-beta.16","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.16","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.16","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.16","@storybook/core-events":"5.3.0-beta.16","@storybook/client-logger":"5.3.0-beta.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.16","@storybook/addon-actions":"5.3.0-beta.16","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.16_1575517438356_0.3689174015319716","host":"s3://npm-registry-packages"}},"5.3.0-beta.17":{"name":"@storybook/ui","version":"5.3.0-beta.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b3139bfb0b821cb6ee095c664b2eddff6489f509","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.17.tgz","fileCount":86,"integrity":"sha512-b6xKlgt36yARh9zK6ZU//lkwDG7vm7VEhJDmA+b4Nms35BQSKOMaR9VdH459GlWnGGEfPUzz1/tfY+Vk8s1PAw==","signatures":[{"sig":"MEQCIFW6L+D7bq4w445VKyzxUWj1DMXmjUHk7J2HiMoSsYp3AiAhujH+69jnoOXn+0/sU3/OB7kRTfBisYSgCuy/e/rt9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6mnBCRA9TVsSAnZWagAAIp8P/Rg3tljq9cHfTTtt6cwN\nuQRnVXp/NCepw5bmjrtADVd2cmSKkHGgbjIsepJFJCE2p1XIB2Qq2aA6vlyh\nbwu5i3QBQKVXNVseFhzQoOp6KQxtfZK4XHooZYEBq+IY5yRKJ1TUX2yqGA1E\nbekagkCeQbs1KSgKQRvUb3lk1VfqBPIgp4v+smz+xolVi4172H+GHTXEyOOa\nd7TUkW+G950HjqV6fwEu17TO8z1C/FLZ9XPpzS23Nde0WUhRa0a6aOj10+ec\ndNFtZ07vvry2dk38TJDuabSb+PECnxb2kYCkyZtiHj0Erc0nI58AzsQE1zf2\naKsbYLqZF8whJfrVf8c0O2IgIE1yKMXyuQquUVUlEim7djvoXftnVu22YVSE\nWQffnFwsQixZzeqC8GNCTodQwrGxyNG1/2mFkd/eWRiYHKKDitklHCY0BfZa\n/9/I73bfOumRw2SBDe6uZj/rLwcSLsbKCsZHuFjSQw+2ZDw4Mcjsp+FVgYXv\nJlnzG8t5zLERvOBCLRc2uSdXN2GPCbd6UyxxxoiTGemRM05d0+mCfyPKaboF\ngzW7DH7RMLUdyUDWIZ/UQGkHxOLrYWX+uWbwUfkMSTiCD9ql56RCKX84u17x\n5NKZO1uezYGtJ/fmRulDPFQP+xouoY0FEFW8mktkkNdHmkGtIeBGIuIvAi9W\nZMLT\r\n=WRTC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"796951f038d31a7d461e790606e6402bbf197c84","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.17","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.17","@storybook/router":"5.3.0-beta.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.17","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.17","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.17","@storybook/core-events":"5.3.0-beta.17","@storybook/client-logger":"5.3.0-beta.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.17","@storybook/addon-actions":"5.3.0-beta.17","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.17_1575643585368_0.4962735851905369","host":"s3://npm-registry-packages"}},"5.3.0-beta.18":{"name":"@storybook/ui","version":"5.3.0-beta.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c8bde7a767ec03661204d437ed328346464ae01d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.18.tgz","fileCount":86,"integrity":"sha512-4Gtvj7pocfqO3TjevTzCtd4Ks2rHnz/I3xkb36ho0GFqMIzFxvPUB0rnW8DLivtWe8duuelNoFB5mkyLDt6nPQ==","signatures":[{"sig":"MEUCIA3SGwwAcXfFRIvuFGtPEz6C0mUgOQNFRoeR44mDNO9sAiEAohEykno/4UtgOzotiU8t/2iwJJByqCh9eT3YvOrgbDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6m+LCRA9TVsSAnZWagAAuLYP/0AHor0imc8hROVRoPi6\n8GS8o36LrcGoRwUYRZQFsKCMGLSFVEVWq1SEtYpCsMeDHHVOJKDrgIq82Cd4\n5OvYkFj+d4iw8ziarHDsWs9WMrqPt4ah1c9pnusSBUAslmJvNJa4hrM++Jst\nXsYaDVq8ejF1BvREXx3WjF3gnyKm20HXb8XanMU6KaQ/u555n2T/WA4D1ndM\ngA7EddOsSxGd5kMyZoT3VO/rfp9yKLinFmVgVQqCkirwPIX2iXgfElsGYc8u\nFoBuQbCp9JcgXU/9aizaGqoBgaGx8oLSObxUEl5zTxWcWNvGMI/GH2iEazEu\nFYu73M96Fn7P1GWrDd5H1K8/MIt3saMPF4hGW7vnuIQ6onDHuYr7VKpbn893\nbRYZiMfdCMR8Icj4Uhh5oGIe1IorJeUGZgMJKNRBnVd/qWNZP35Axg9xKxQZ\nzONLGvSZbjyVt6yW9jpC4yVsEDn+g94mFX+s2cf9LyxZFwQDp+taxuK+OKxb\nASGG/Inxd4CMkD2HBtfRIIhWz6xlgpCLqW3IZ3X819TBWcHc54JOGotZx0p6\ni4ES+ZsUzey5HQ4+uHnQc1vu7VenVznXmpF4luPUtNsr/LtQ/D+v0WK/ORhS\nZzFHRjjFTlQGGQmvp911axUAByuYIMc3HHqjVFlSCojpE/8b+ZQbOp6cwPJM\nhT7a\r\n=PYyW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ab6ef5333017d3133f5037b5df39a3eee4e3f05b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.18","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.18","@storybook/router":"5.3.0-beta.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.18","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.18","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.18","@storybook/core-events":"5.3.0-beta.18","@storybook/client-logger":"5.3.0-beta.18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.18","@storybook/addon-actions":"5.3.0-beta.18","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.18_1575645066635_0.7708256898839123","host":"s3://npm-registry-packages"}},"5.3.0-beta.19":{"name":"@storybook/ui","version":"5.3.0-beta.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"69f529866823cb05dd94f3c8abe7b4580d392f61","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.19.tgz","fileCount":86,"integrity":"sha512-aPNtFuC9I5UjQ0oDxoIE1sQXabs+YDRpwhf3ZembMoBhPdflNfQMAQc058Zy9AthE0z7hAIPVd64V1+hrf5IyA==","signatures":[{"sig":"MEUCIQCVYB2WyIWnqpygJA8ezWCh6FiwA/yxBbnUB/8qpv4dAgIgem5DswIVHjQCF3/9jgrb2xBLOw4FEPwdZ3DkATnOlSY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd62icCRA9TVsSAnZWagAAKu0P/2ASy+C7aUb6Yv8v4zMF\nlRZBopKe80LvIPkwUCjV2njIXzW2l6cAjrbDR40oUq1x67NZiYXpOBiZjjUL\nqv0KHABtV8OW/jg25pqHVJajch6iJb6vGge06aAtujOKRpB6Oybpu0wzFyVH\nt6RsnmTlYttaxQi6/eeLe67U98SG3AeHrefLw9wUz4wy1+wu/75obEYfxTMa\n/f2p+3WrYbNaEL0XrqtkJimJ/ZFoIK2ioXn5NSKRq0Cj46jm2aCJ7fvZZF+p\ndXwJOst8+2D3bVpxqaaXIXkkyH6YroWS28/bDL+WsZS5fGLRI7uQa69KrhLG\ngSJ39PgVoG94hqrzu6phKSuHZ5TtxsLCp8w8URbKw/IGbV0QO2EK+1JDsQQR\nUFYmeqF8KsNyp7fhbOV0Lpyn9VI+GPiO1wRKoQgeeRSWRugI4+G0FPPNb/OI\n6cqmCZLgmwtvwLtbqm4HRqX1RiMh4OpsAUYi8Df5JG6QE2x13Prz5SvFdE9+\nrpp38xHtfeErNGmZS4H/LO5udFHx+XttDHApMnSLktLelmOzyCCzrXSxdqQm\nChDAltHHAvlvOB4lh4u/P29enXsC5VlyXSXzWgWelSS9e3QPyZBDgoOuvEn2\nhdr/2MBDOs6gXtGx6w4H4ghRM3xTbZ1hHhHQ82N/Q6AYGD0LPDx+rbruTyxQ\nTyMa\r\n=WtRv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9843746f3a0a831a2d9c234f21754f30ae403965","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.19","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.19","@storybook/router":"5.3.0-beta.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.19","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.19","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.19","@storybook/core-events":"5.3.0-beta.19","@storybook/client-logger":"5.3.0-beta.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.19","@storybook/addon-actions":"5.3.0-beta.19","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.19_1575708828125_0.23574241211895708","host":"s3://npm-registry-packages"}},"5.3.0-beta.20":{"name":"@storybook/ui","version":"5.3.0-beta.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e154c657a1bc0ba63461c805bd5741758c79e399","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.20.tgz","fileCount":86,"integrity":"sha512-98+bF3sdAsWtLarVjA1M/zWNIsSPEmnqUkV0th68keqAtbBPEVuF9b6GZy5CSFBTDKHsYupYjUJFNLueOob/BA==","signatures":[{"sig":"MEQCIDnOh+S5dtZKGIUnApQPtcWoqOsWoiOIc+qwtcFyKFH7AiBVT4e+CqthLRE7Ou1hPGh16s2+zg59E69lWZEagNSnVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7kR4CRA9TVsSAnZWagAAK5EQAJS04zD8WQT13GfLvXr3\nVr44i+MTWS6xDWAcCx7q73b1RVFdi0u71jMUx2C1urr7Q1VUmaaFuPD9Glu4\ndTs8K4mEmSOjopvthJImw5g/cLbMLFzSvKAjUVFg64rvdSY3+4Z8deJHhUc5\n5uPpiw07qwBi6O20weKekPVKsiC4+WK8gDcWQqKnAldbhG5d8Mz9MF7eGUbx\nyxL257c3kCeFTnrzYfQCO2oj11tZwk6XicTwry6ILv9F9kOpIJt+Eap03uJs\nDHFnKe9fx5TyVZ9kZOMvqXbuHvlv2zNusOZ5YRh7o0DVBMEMnVM5Iv1mBDs1\ns0ygjoG+BX0SAtAFkmvmB5DXpfXXv+aScjFQdr1m/O+u3bqJcv7OP4R8NPQm\nORbTmKRx3JQ+UjTnYuiC0pa8S/C2rCCnOBy2osVh7dy6MCSKVbIqPpdnNvuH\n/N147dM8avfGDYFnl6XPyAVIFVdO+LS21PSEMm44rLWL9dCl2lGRfR11Vhk8\nIJtUzRN7xeDu9LUpsiioKikuK8oMq0XvCBRQfqcqLyMpxTIOCmxzXvciqMhG\nPCknPiGa5LG2cUgqXf686LJaBp+gQ+rBeAK08hKDnRZWxmgxlPlX/3KscD3G\nL5z5uM+RSIVKrsWnCQyuiGDLEUAAl1Vd/9Bc31thmjJTL+6uD9X4YCWpKZrW\nmm+k\r\n=9+ic\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5d890bf37b8b20d6c8f3483166689afa2e030a76","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.20","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.20","@storybook/router":"5.3.0-beta.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.20","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.20","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.20","@storybook/core-events":"5.3.0-beta.20","@storybook/client-logger":"5.3.0-beta.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.20","@storybook/addon-actions":"5.3.0-beta.20","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.20_1575896184196_0.44169686246366524","host":"s3://npm-registry-packages"}},"5.3.0-beta.21":{"name":"@storybook/ui","version":"5.3.0-beta.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e0588a360090f3f32d241845fdbab48839ca2230","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.21.tgz","fileCount":86,"integrity":"sha512-bjyr5CLXW7VQm1Bf4wowNRumt+wnRz1d4TYIHLEcpVLo1ZRgXpWjviOs6CQdd6VdLn1IsHr3fzMC4P+4j4bKkg==","signatures":[{"sig":"MEUCIQD1d9bfhMt1JRE4btfTa0e51obi1kwOioIjLkAi8zJnZgIgeLDeeTjIBPP5JREkSQl+kKOU0clSxcvZQLCg/YDiejA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd783oCRA9TVsSAnZWagAAJaMP+QFVMc4CWYkEbrXYJ0so\nTkj749DDSGwCglsen4h19JTzv3DFptP1h2ImgqhTP8mHFH0V5dszjdqk31Xz\nDXJmPHc+AGMcjppRXjlMD5S5R4/JWF5PZLAW4iimPVNNFedx/33oq7S4vWW8\n6e9AisZmCGc3I44D6JWn/1Z98rCKzqVzEMzEwUtCKlyViyKv+UlpWl2yhiQJ\nyVudsL173lT5YisTVydeAFUTLAmUFj4b8jD+cY7ohrrcLmGVIXX4TUHb70S1\nmkFdF+fysZMujdgT2X14MrM94ST2SQIUwx4UrfevM1s3a2A1k0cBgVt/bObR\nx0SKAF6lYFfLU5BTX4xmWycVj9mTdauBP60AHsxLIOdELGgTV5f1jqszOACQ\n2vCPFlQduYzyULEuLIYE2hqJVSX98jaCkbewA2tsIBYEJFlPCr4BZ2/4xdLd\naJEwz8b/tcRs5NvL/XAA+G2Jb+JRB5hSQsQDPv2EYBG1nYTLxqpeLZkK7522\nqOwCFVUcKjN0BYDf9ninFWBtYKE+oZVWQE936hqL4SB4aAWhL4il3JCQ7136\n+wu1+hRQYDMYUENZMpYbVOtO+7+anEUXSWyXIOv78yD8MjPF6FipCLmlR+XV\nTkMg/FG2ep5yQOTvXGCKImez43TRtTo2KAwPMFFMV6fzTFH+uEMDCQUVAWDF\nc7DU\r\n=cbVD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b4332a39eeada108caba2e8f6f7f6b4391ba5733","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.21","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.21","@storybook/router":"5.3.0-beta.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.21","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.21","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.21","@storybook/core-events":"5.3.0-beta.21","@storybook/client-logger":"5.3.0-beta.21"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.21","@storybook/addon-actions":"5.3.0-beta.21","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.21_1575996904409_0.6820368764909033","host":"s3://npm-registry-packages"}},"5.3.0-beta.22":{"name":"@storybook/ui","version":"5.3.0-beta.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b50d52dbc94a9b03cf35e60fa55fe1130f8eeeb6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.22.tgz","fileCount":86,"integrity":"sha512-FGL4Bu+CbbIt0tmMSIapdyzpJbGt4sm6/Jco4FylYcj5DqBloESyssQ6p1djtYyKTEj+59oGDI44Zo8Ghqr/iA==","signatures":[{"sig":"MEUCIQCFSoC4Y+5WMpNu36aXsBiJWHrWVwh6/Shj6VnTpb9F1gIgRsOZm24rsQP+1iJIro7RERvCwwgdjfedCA4QCiUKGtE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":378897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8lzsCRA9TVsSAnZWagAA/twP/0Cedzp6vwp+52/LYO15\nW+9X8D25FRu7eh4J5rTfDTLjMwJLzwJO1+A0BaklvUZBtNDbL/dvAWMuflNC\nt6La6YcYUYn9qCMOTXAseOQB8ISwnwSp5S1KYVivz9/rxpRkbapCQ1p59aWu\nQKscf2OUwdovqc7jNnUIKibmllrxxRiLxA8raWuWiQxK8Zx0NPjEIfPTkAjz\nyVSBc8GDdPF1OHiDfkULFjHBVIh7hTXZ8osFS0SRdjrDoZ2l+diyHZzVGhip\nD8dRoH5a1lF0ODV/uJ4RCozn3Ykp/5Cl6aA0vLpC0FJEg5jE93BME5/RsBOv\nW2bYZObbeQxe351nIibzOlBy+9V/EVtr+TNeq2qpoxyHnd+ZslxchZ/vt1b0\nFmiuKtcYcPVChh+2F77fWbJfGHprDK+S7S07nQ5MhdzqzdTPPOKnDdpTvfjP\n9Dz0cMBGDzl74aKYqrYgav0hsFZl/I67YegeU6luDYEWy8W0djVXHO5r4mZU\n0ZLKyFOx0YE1MrmCd0kLYNb3786OKL11R4/pdmrWNQ9F/Sk2cK5x+Dwvl3XA\njCkv+9SA4DKqG7LE2qGMS06Iu+SumVdh8hUB049j7YRQ2xC1k8OqN/AggFUa\nPEt8yewuyiAGK2hhab9qtrFVJuKICcrE8jvkWvkM3vk8327pxAYk+n4mv2Nw\nee0p\r\n=TCdr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cb706f32ab672669ab9ab8766fbaa9775c3de07b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.22","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.22","@storybook/router":"5.3.0-beta.22","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.22","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.22","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.22","@storybook/core-events":"5.3.0-beta.22","@storybook/client-logger":"5.3.0-beta.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.22","@storybook/addon-actions":"5.3.0-beta.22","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.22_1576164587648_0.9214454836027777","host":"s3://npm-registry-packages"}},"5.3.0-beta.23":{"name":"@storybook/ui","version":"5.3.0-beta.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee83917079587dbcb95086349f345cd450edb3e8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.23.tgz","fileCount":86,"integrity":"sha512-sNahNlI71+T2zRUfLdVVlSuActdJcHsVTBewnU0qcRV5/EpO1fWoiMJLuVR1NX/ml4I8K8Mnl+ehJL5Vy1GlDA==","signatures":[{"sig":"MEQCIB5cLxKauO+YWd4ExRjrzjRDXC64ydOF7SoQtOTWUwLjAiAJqOkzISIYbyhJ/0FHrNJUZeqL5eiY10HQdgSjU+76aA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":382536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9O5FCRA9TVsSAnZWagAAgvQQAIWQ3Hm/zWw8OUqoFPdV\ne9g77Mxh07XTVLNE4JudHYGTclkvFgVST0x8kJlmMZIS/nywKXgDN2V1rMHn\nMEc3ftZ2uvomGup3ovtFrogzDUGEkDlrE6iwh9Zq7xZEgDr9OtqkgWJW4g6/\ndbnXxNB5/H2WedCQoUNDaGqTkEgitKOsZKiL04GTbA9hWjRwqOBuL7GpSuzy\nOs5gwDV8HFUbtUWP4L/VTbazb8qpy9cKaoiTtL88azGCPGqczWnt00U4C/3s\nxmJunxBz1/OtmlK1wM8Jm1dWteAxM/FdH824xJtC1HojBv9zyybPXYTh5cA/\ng6+TBz08UnQQhwKKO7jS7HkmnEBhXgayW1B5Z2kANFGfQT/HG2zQfZ8O3j9y\nkm0M60bYu5TC5GtM8L/keGt/J/6WVE32AYfuVvTUawf0OY4O6z8qAKX+Z4h+\nAqXw1VY6kGneH1+THb0k8k5OqNE+M4M50/dPogNd57ga75EnXwpS3TYdbJ09\nMUQuYAs6O0hxsiA7u+ij4etiT9yjGJ7xPFoFUSOmWN9XsBuxVqzMj2YFXGTx\nIRtNGkoECoO0sjb+dFxaTk0h2trzicfnQeMCGbyP/OGvL0BLfPBnhkcbUq6Y\nQEtauP+3x3YrJdyWMf+5bhwm4ar4C2WQPR5mNWUgkv7dWctKDZ0V56D2L8Pj\n8SkQ\r\n=u71e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e15eddb8874f11bd239a890a327bf999c9c8e61a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.23","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.23","@storybook/router":"5.3.0-beta.23","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.23","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.23","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.23","@storybook/core-events":"5.3.0-beta.23","@storybook/client-logger":"5.3.0-beta.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.23","@storybook/addon-actions":"5.3.0-beta.23","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.23_1576332868713_0.4261641909343765","host":"s3://npm-registry-packages"}},"5.3.0-beta.25":{"name":"@storybook/ui","version":"5.3.0-beta.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"83065f61dbaa4517af1d2a792e9d6cbf914966d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.25.tgz","fileCount":86,"integrity":"sha512-WhimTte0WAa6NOHtkpb6TVTrHR+VWDGZENxoJlFkLWlAHSx4TslY8vTXhE2z8AWCNFR92h5RIplZ+OH+j/DHbA==","signatures":[{"sig":"MEQCICSUEnlLMPpiNXBLGcHy1eD9Isn/HBIZjBy5jvREzFr3AiAwHP5RVF0PkklwKkmjASJ9jU6skAb3Ofbl1QFe6dTX4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9gdgCRA9TVsSAnZWagAA3GIP/1O5UqUQsviA0HVa5kTj\neK7mMyGWVBnWHI97ag23AVRUtudXFrvcgajVhp9qccKpnlTdWjKfcT9Uoecb\nIb21gjoCJZ0XU8kpNsUiS5f4RMlgHv0pI0nDF17O5F9pHK+sm+W4SbiIePYF\njTvefI8NiHb2SdE8SkQoEf3n3corTELr3gWG+fUyNFiJW7ySJI62zWdqMlZe\nXsoLhfbyJBg2cBllRABxIiK1TldRSxVxkqAA7J7sA5xsDus2V1C8KEeUZ5+T\nW6g1U7X7yA+g/SVqGDVzqd5mtwYvRr+pgkCAyGk/fSVSocDETZrYVodEpVTT\nGxGH+fo7Wf8Go/GcoHbZJU829R/66rDvvk9HXsBsoh4ppWPkVu0BwnWd2K18\n8/4O9q1kWcavplCjqTYhxB4xgk+xLyPv+2KmUdcOMHMK7ZutVEKtXtVGcfFW\nTHsMphcQ/5ItG3+lU7iz4GWn8LB3dksQGkXCwriKUKE/Dkua7zST1qXcDIwH\ndVO8yqY3wJyp8KvqLz9HW51V8TIFmazivwK0gk9pb2fkUJLoERNrnr51P4SZ\nIIYzrJlFJYkMi6xObH7kt4Qa3II2ORhB8tJirjOknGs1X1rjUF1EvdxcfMp+\naBZEJYHPw5dGGGYXv7pAsDPoTPrjk6GZD1fGC4AETwpOwmtqDrzaHpxS79/K\n9fDO\r\n=SbM4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c84bb43e8723c4422f2967e5a4033f495cea11ef","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.25","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.25","@storybook/router":"5.3.0-beta.25","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.25","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.25","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.25","@storybook/core-events":"5.3.0-beta.25","@storybook/client-logger":"5.3.0-beta.25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.25","@storybook/addon-actions":"5.3.0-beta.25","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.25_1576404831716_0.6730615388517924","host":"s3://npm-registry-packages"}},"5.3.0-beta.26":{"name":"@storybook/ui","version":"5.3.0-beta.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b196b7312db4cc5ab761e077f44f0aeaab31e09a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.26.tgz","fileCount":86,"integrity":"sha512-Mgg4cg0O5Zv+JTUPYTgEoQGhsTSqqE/3UO8oS+8+83SGOlFGSqqc5QlmPlc1S2g5dJj/lGOGLcb1en/KDSDIhA==","signatures":[{"sig":"MEYCIQCO2GN4jEBh6g/nlw8Qn+jFmktBS2iJJSzoPa0nO9LkBgIhALVvcbmoDKk/CLlwPebeRcnX5RPe2cCUgmfLWl9ep+eo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9v/OCRA9TVsSAnZWagAAHScP/REgNI6WxF75LXXVMFv/\nG3jACszhNicE15dLq6hX6bFM7XPAbdYJ2qFJyQIy15ZfuqjWVRg+3wH1q+TL\n5tU75Ho9rnJBUKGiw3AC+/Yxj0t8XXOKhFqi1gaRMdWc/eNHVikZRvZqWzOZ\nh+yiuY8Py3Vr9EzCrCKHXAIbW/u9wDmpzR7gE29dG0uwIMapBfemYR55edft\n7jNu49d5ZS2ZZw63EZoAc6IsNRaMro61WzDTUN8TZEghwXxh+vLdyjRmecyQ\nAvxFyk81zaqik4GvdXbclorM4aWendJNcHpF0PSVKurntlbKwnZROG1rPUGN\nGvh88kcbwuT4m+bpcAF2bd5t6Uy4Z9MK5f7qOy35/tSLulbPUJEbcezzwlfG\nqF5kyyxs9sKQxd53FRY9StmbyLxUwopUJLCsvvyfnTnK7o7WqbNDmu4NCTEK\n9J1tUUPN3kasRMJ1Xs1gDiVVM3QUVcSOYNZpx1kM7zxVXuUeyZhXfGoQsRDD\nOyWO8ZPknCs32vc7tUtSJZ8eWg9oacuDMAuUKJfbKJh3d9FcoNLie/vFhrJ9\ndg80go61aXvSO5B0a6928b/uBj7jnQPiAqzvRzKocsQnfmddbDD6KYeQKfAT\noJvzcYRpm9I1h9gjGrvVuVGsc6HRBGqt+M9b2jxN5zDyIQDa8Y3iV1F11rA6\naQ5K\r\n=cN0X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d6a13a22877f8f4e9fe136ef5dcdd9c075537c15","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.26","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.26","@storybook/router":"5.3.0-beta.26","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.26","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.26","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.26","@storybook/core-events":"5.3.0-beta.26","@storybook/client-logger":"5.3.0-beta.26"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.26","@storybook/addon-actions":"5.3.0-beta.26","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.26_1576468430471_0.6510409755659254","host":"s3://npm-registry-packages"}},"5.3.0-beta.27":{"name":"@storybook/ui","version":"5.3.0-beta.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"44e1cca5cfff33a9c672fedf624987bfe9305356","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.27.tgz","fileCount":86,"integrity":"sha512-g8Es15Xj+qNA4bukE+mqjdUBuU/3kE036fKTOEc8D38zb8hilJKfD/TKZDS45r+LkmplZfM4kxLDcK2a7/Kw4g==","signatures":[{"sig":"MEUCIQCGt2T/1zg9bk3naMgntzlfxyxE7RH7zfzcR5jsYbrCKAIgXw2Ikf3IcZpquOO2pLOrE1XlNQctK7P4zw+aD+3wl5M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9wRgCRA9TVsSAnZWagAAP3cP/1eWmG1+MsmDDFkvMhq2\nFx9n1CVF42/VWeQaF2IROIpNFtcTtccpeoDI/Xp64/YOTJaRtbTtIDUZLAsp\n1Lybcc1H6gMmrXtlkF/Vo9u9X2kG5lJfRNZtH/8ooW58CNhlF+Qh3FJRbYXC\nA7gGASoy//wa7kGn7AoIiR40LrccR+jPP6uxDD0P+P3PKMzaMhAfCcOWfoMP\nBFuJsiKMfl2tFHABy+hiUXd7/E6HTp/edUt3+p0EaQq/omyWJhe0ytYXePXq\n3eT1RITVHxuJsAWvWNJFtEZG4pZe1UdUr3kReL29nRCEs5YO7f2QRcV2DtwC\nyL1mj8fWOcydWOUdDvzGPMV+tNIn+pajKCo0cwlRCWplFqaja5yQ8j7pjS17\nsExNaHW1bWL61Mt5jPm5wA/uOKaikHVeY9G9hQcQojVYg1YEPHKpQAqucFDS\nd0D3dOlDOX7kb3ANZVOCmeMUaambez6p5qXc5H65T5deCKqtHx18PlpgSk+l\nr/jTKV1DbIdcEXVZQ8IXdGVH+kmAv4O48BgpokJLOY5oUHHzM4544IviXFQz\nrxpqv69sHv7pjD5cWBlFs3X3fYp26IH15Vqard2i90LVroRZ5Z9KWyjcnESe\nbDuHXqmNuJSyN/RVclHpVBrnt2xbzzJXzEvVhnQ+2sW/sWBM/KcArMaVNJn+\nOs6e\r\n=8liu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ec095b015e45fccbaee4236f8936c2823edc5649","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.27","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.27","@storybook/router":"5.3.0-beta.27","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.27","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.27","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.27","@storybook/core-events":"5.3.0-beta.27","@storybook/client-logger":"5.3.0-beta.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.27","@storybook/addon-actions":"5.3.0-beta.27","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.27_1576469599818_0.2880116286834049","host":"s3://npm-registry-packages"}},"5.3.0-beta.28":{"name":"@storybook/ui","version":"5.3.0-beta.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b5cc49ab74307a229269c25193614c8176b40a6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.28.tgz","fileCount":86,"integrity":"sha512-NYBAEyjo4ioymLqZyaYC/vVRKKXUA+VOeos+Heb3pmy/m9hQqu+80PLTVtAa+lqz8q9A9o/aXRNj7Hzm++AprA==","signatures":[{"sig":"MEUCIC9FQwmO6rPeTzvnsu9v4e9wcSnapFayJWHqrJI+DlMVAiEAr6rw16D+beVRu34w+y3tPK91HKzkUUx25aMfDzuXYzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9xPpCRA9TVsSAnZWagAA4HwP/Rvb6uvAmb6XvXBW1rye\nGKz/pdOb7ZqBrXReYyvCU57kt1t0FW9yM2PkjL7lnIN4XWPloXDc79MC+le2\nOqStisryhtEMwJvyZu0xTG/Zn5ZRWEu6I9+q8luNdnzJwk7aO/RZ00RK5Bcu\nCygmoP1sUKgw2QiiIThgGGCApLRYsQogNR6C4Gx+60m3cg4ClsndzhvQo3pp\n64OCrprCZ2ndhX9rqIlBcUKWTAmIr4MLeLvqLOQV0p8txdflIDLfZCLB77Zy\nxFdps4H9WRiw0TDmqRxZk3OUU3KUz14nYO15JAuIw8JsDKg7uRu6y4BIfWy3\nvCOz7wvjVJvnX1/PVn9mL6iRvAHNFTF6l+VIsGiQsJQs82teUqfEyB6yBa7y\nUFWLdD9NF7ywISMbVTaZQB8it/qWShMrEvejESC9QLTFJo1Cc+0RfozZhOhu\nqz0bDk1dqFyhXLPjGfIFnzZWzK35Rh+XxYzarkys140klCIBz9m+kVFWU4EW\ngSjN2FjkG5im4uKda2jnMsCkQELJltTSKXADpMDPReyVikIrDdWXXGy3TXEC\naVKBo6CCBzABmvTWXde4cOhAiBVYx4jxgYgZ/c8LBSxf3LR3QCM6xu1es/D1\nrSosgbqkdsFPTbFEnOL8DfqNjrS+/vjS0tZyMWICh/ccMktw/ZG3kGfgMF8V\nrJT5\r\n=Pq/A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5666c2c62bbf417c1f13eb3b45ad4b1dc7bf345b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.28","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.28","@storybook/router":"5.3.0-beta.28","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.28","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.28","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.28","@storybook/core-events":"5.3.0-beta.28","@storybook/client-logger":"5.3.0-beta.28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.28","@storybook/addon-actions":"5.3.0-beta.28","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.28_1576473577291_0.3746574816002115","host":"s3://npm-registry-packages"}},"5.3.0-beta.29":{"name":"@storybook/ui","version":"5.3.0-beta.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee02f92e3061f54b36e62034722e7d88afe7aea6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.29.tgz","fileCount":86,"integrity":"sha512-F20BE2zSYlXg9cndXDYb0Hwmdjb1NJ76WA4EgWmcxnG7hDZFSsWtn+fOCE8xrbZcggJTKqFpfKcPq1ovuCtr8Q==","signatures":[{"sig":"MEYCIQDSoqPadcsOVi8PfnOCg3BpVIZwr7+AIX4X4ScvCuMYtQIhAIfJ0teZxbJNdC4r7CYzGGGAEdJLEBgrByvZkeJ7Qd5Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9yk2CRA9TVsSAnZWagAAXJYP+gOAF0mtAOOFw+80CymV\nkPq+c5oNDOfoFU5mGjgR1zq2sOUkxKmbNHhd0djK50JLNOmF1KDTr80tGa3H\n44xEOXFvwO0EmltvoCgTNjDzKMLQlPqzAtpoG0itCqiLTevRnTlyLe0+CO1K\n2qxb373YT9SbMQ7fN2Gtr/1h2uNtWDCWbNmWJoJZMbzLIGHddEjhKuJ+yWbV\nYVSQ/xNkgjf8cRIMzkOBCvY8J6p7sUfrrt20w/B3DcXv0hW8lJR/VAuV33cB\nO6Blkgf4O33Ym76sf9kiIe9P7vufwLd6zNC619LdJOv2meSbPvWJow8zsMQn\nm7RS+cY9FxP5i5oCvqbnJNW5ygwpEpJGB/ZTCEQijPZvQy0bjisodCJVwy/S\nNVyGiuloYJHhTUKBg1uSybjE+cWWqPQYvP+Wht4tumAgBewPeyjJyVz9YxbY\nWMcQ2WxMMtezYYruXSRqpqJOlpQXGeXES+d1CIO9nrbSVYE97zsXvx/e3S+f\npsvO8z45tFUwls8NNEpAvYORj/yWIomt6KqZHMrILOhJ0y4tFD9svS7encFu\nzdG5LQXqOMEEO/PTPG2r9DfvYzqAjG8e0tY/QtOMdpP8OhtKJo1ijre8nwVL\njh6PdfkoBazAY7oBxJiCgeAvAXZckaIiArraf0MOK4SGHu8lB+Ab5AptPZqf\n70Am\r\n=gmV2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0eb3cff488dbdd83161dae188cac4c867725b8f0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.29","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.29","@storybook/router":"5.3.0-beta.29","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.29","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.29","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.29","@storybook/core-events":"5.3.0-beta.29","@storybook/client-logger":"5.3.0-beta.29"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.29","@storybook/addon-actions":"5.3.0-beta.29","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.29_1576479030572_0.9981495787173231","host":"s3://npm-registry-packages"}},"5.3.0-beta.30":{"name":"@storybook/ui","version":"5.3.0-beta.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9efa51dac6e3e31eaec7dabd45b09d87d411d658","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.30.tgz","fileCount":86,"integrity":"sha512-OldUIE8y6JX9RQpt078730I2WfIctIufKtHmeg9RnefIDRbGEI1d+YbIF9vKQx2VzINDhJ/gQ9jADd+TtxgOxQ==","signatures":[{"sig":"MEYCIQDzxy7xi537R9un4r+eY1dzCpCwiGuKBx0zOxNvZ2P77AIhAIvJ8kojCjHhm8my6tU37MG5TNDqSCIw6hhTEK+dzO74","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91G6CRA9TVsSAnZWagAAHF0P/1IqmI1T2kFzc/DlphE3\nOSmIu452ZLqfxIAawvQfM8KIDuxI9apPOXKjWErLKfr8nB+5bNRdqaw0scAc\nkyd821iGFssigEcFFIsdEbdJJNg8SxNqYy/2YQ9TSLoceGJw+3rBrvTcs3ty\ni2qmNKqvRa99Vzrkep9hOZqbSgG8dHfdgJ70xdkUrEw+t7SoHY14LWiE8R0W\nXObeBiej2qkldaxrylHyNdBAqrQyGOXtv5Un3zj8Y2PtT+OlerQFbp0+qyPf\n0o7hSyKEZ3hOtjsZ9u90BbeXX/XY2Q/9lUzJQz8MLKeaaM33UwWBRImb0ahf\nFMZZ7rjDCjoC44ehaYVOe4U89K5VTdyZHKhcjJvnVmVAwDZ2/hUp43MGxHVL\ndJ9Lw4Tn9/6rYehPgh2jStwXfOyEIVKwQULtCJwMjJrJ+w+d9kFQYAApKt0k\nBx+xE538XXywcB0sutyNIQlXgbzydA0tliv7ROA4tVJ8A/mcA603iDS5uFQX\nnY9CKQyitHVdG9gtmq6fQzrlfOwedzd57A1nPCBIyFnlNKM0a+i/cAjiyYEN\n7Qsr2XGdculxJuAjO6/TsYYi5FEuf4utYBNq4mi9z5i/ZmkCJpcyKnSOqZC5\nDC7OtHrdNAAq32mBZqLswMdgRpiaQ6kTwGQfz4/8K4b961/UlajagVo1J8j3\nXbjb\r\n=wmAm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"52147410f243d401b27c9b9f8b56afd199c4504c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.30","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.30","@storybook/router":"5.3.0-beta.30","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.30","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.30","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.30","@storybook/core-events":"5.3.0-beta.30","@storybook/client-logger":"5.3.0-beta.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.30","@storybook/addon-actions":"5.3.0-beta.30","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.30_1576489402241_0.8505203548899962","host":"s3://npm-registry-packages"}},"5.3.0-beta.31":{"name":"@storybook/ui","version":"5.3.0-beta.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-beta.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"43a7fdf7fc85bb86fa1473cc72ee4726b36b9f15","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-beta.31.tgz","fileCount":86,"integrity":"sha512-jXF4uPSZxW6AaJi2LvqoPj3Z3HBZLyUSsJ7oFka66Ld7BptNOHq/I6fCYGsEgsvEt+A6XOe8LIXqqS9i2ebIKQ==","signatures":[{"sig":"MEQCICi1FjolkA2P3u6uHKkdYLr9anzkTSWsm88jiq9fzr8VAiBEJqnfnxn8lZLo458QIDQw5TC/9yiC/NJXEXP/U5p8Wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd94ThCRA9TVsSAnZWagAAvRsP/10BP7YcOxPm2triOjvr\nc4OwDiEeRAHxaRu2VTxa3Ca5+2bqSBgekYBAYaVqJ4j8u7jY53o+KujS+NTI\n2/cGw+2Nz2dQvezz7zhTHXfWt0DPsGENBFTV7XG+rKpR4bDxVDUEe+o8EApG\nZAPEd53EUobtRTXIIci6fBuLos7GHCIHSx4w+m3TIXs8s2SBdkc4QJWkmLeV\n43JNkHNtH6LoiM3dZ/2UPbYi/4vGlySwV4zk35VcUVo6YLKWJluQE5fmKqg1\nFgXT7128j3GQjP1rOLaLRkiA6/KA1zcJ0H6wuSXnvRQ8l4tQZioMXhClTNDo\nSiwSCladyG/UIsGW6yWGj9fKZhu9ber4MQI7HlBumxjz8YQr7Ce8F3dagmFx\n2blQUsQIJR2ZfT5QahNF/soIFmdh+fKLIaMtDEJNy8J85/7AWvD5NnA91bTh\nUG9XRFakbCMVVVVDlSEJLFF3T2fa4RAq9lCJuehhCWnHdd+hmZIYQBYdMZwV\n7MA3MoQZJ5nDGejpuZ13V6kRG5Lj3izDFRvlAvt3Zix5D5C/kIxkmEMCTVGY\nH8ADcK5R0yhODBClwPUylnC3G3bUw1PMIr8rci8kYPbN8Q8nF4tjtJrN97kv\nAkDnIipF32ljizrCUinQUxvkdt4wBaqhVnIYibM0qAf+BpQXDLJeOjiKG10r\n5QO2\r\n=0kov\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4d2d0bbb2dcfeab6d790c9fa4ab37de0b23435e8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-beta.31","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-beta.31","@storybook/router":"5.3.0-beta.31","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-beta.31","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-beta.31","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-beta.31","@storybook/core-events":"5.3.0-beta.31","@storybook/client-logger":"5.3.0-beta.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-beta.31","@storybook/addon-actions":"5.3.0-beta.31","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-beta.31_1576502496960_0.3758439794906623","host":"s3://npm-registry-packages"}},"5.3.0-rc.0":{"name":"@storybook/ui","version":"5.3.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a9988b9ef483e394f98ab91ef8250714f4e608d5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.0.tgz","fileCount":86,"integrity":"sha512-XQZvuZuMBHTfM7Hl6M6jns7z22gQ0FGlBV04yDacgIMEVW8kip2+WJom9fFoopGS8xUjBJ8y2G4rwXwoce+8Lg==","signatures":[{"sig":"MEYCIQCX08uEYBqROAs/OJPtlnXWDhh+58bjQaHIdOBvvcT4nQIhAKhJKpkQ5lEfjVcr3e1icn1lwxqJqLBnHmrP1Mm+7bKs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+zuHCRA9TVsSAnZWagAAGYMQAJ1QffsKmxsItKHVJJjM\n/13++XhTQwdQ0WA05SN2BGbVAfAyGAR0HCWU8hv1mjObSxT8y6gOtMvFcuqK\nwEmnpuFlveRrbeCJBuvMy375wRfVFg6Rhx6s/9+/Exbdgffe1NstxcGGJM62\nciNQdOwTfR6rdTtZCBA1W5SKlvmsAmaIWTuvOt0CBAk1jqQq80jK4RpoWGpA\nXYXSULo51n+crFyEtMCfpXzxC+5+Ny/PBsVLIXNwkCw5HJDR2+06BaIwfm0D\nWnNHEBJZOCkUWv/Y+l8mJRiS4CpI4smZ9E79FyxxOrbUIvl5Ys4d62xKCAGB\nHxja6tMpIIeJWwOje/f8BUrUy0XJ5IJb3u42uHaOOdj38eLAwCYxPBKZlvIY\nn0H+VL7SlWjFjRud7pONTx0KQljoJMeDc+/s0MJqPAGVBFanRpjQD3hsfgJm\n6+wHMYoNXX0XCHRUXgK8tmrYpNwEGW4gDZ3tOzTOY55MXd5+pddwMOSgRqKR\nRxDKinzqM8cNHIJYkv0lq2YQhsmQBEMfQbIyJOYqImaZO7dBPUvDmrBwmijW\neVgm4fD10JKS/DFsUwAxqI0cBpnaNa53CKpnWjeY/06sRQ0YC7GvBuE/3MjR\nefzE6rjY3pDNWkTgmD5tuMvWlxTw4g3krOG0asLdMANGuGhh6EccpwrMKOAn\nxmmW\r\n=2foo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7acb51d15ddc748b464394a8cd63f018bf96b527","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.0","@storybook/router":"5.3.0-rc.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.0","@storybook/core-events":"5.3.0-rc.0","@storybook/client-logger":"5.3.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.0","@storybook/addon-actions":"5.3.0-rc.0","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.0_1576745863173_0.639663852003044","host":"s3://npm-registry-packages"}},"5.3.0-rc.1":{"name":"@storybook/ui","version":"5.3.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b6f9a3656670c23562078b04451a6332744061c4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.1.tgz","fileCount":86,"integrity":"sha512-qIiFStyQwwg5KUbSYDJ8tmkofWDu0oqNVAtYGyuYzlfOGGWGaqiYv95sZAyt8L+BdAS1uMTW4dk5n2FYRJwlxQ==","signatures":[{"sig":"MEYCIQC27mATsEAaj3vmIeLJMq/4/yyXgQXkZKwevtOpHjanSgIhALviax+iZDZHmbw3jLPBaLTyVoixX9AsCiDP82Xm9QJB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAIfmCRA9TVsSAnZWagAAh7EP/2uVJDJtRCem+6PRmZNA\nYTortE9HHJN6rX73FamjsOQgmZtb3sQOvmLGEeJ2FhJ2F37Vcqq+gf1rmITL\n4iYywqh73wF+pkmKpElOmiKJNPv4w404nMWcK+i+oso4Aw2l1U4VROxJQe9a\n7ugTcSHxXKQhnIKGD0SBv8xeKR6ywnepgki7vdxlyeVzv9ksW4hkA5zdk3g7\ndymYTw3OZq4kreeHosaGIeKFmVUnyctw45GMWLkjVYW0QYihA7veriCEnlhk\nTdFLnQNDKGKZnu/aTND9AWT8o26CKDAlH0Ie0GaIF3ByRcC1I84cwJzNhBvH\nUPJERwO9FmR1vw8zwarCsuVFS6O27HITIPj6ioo1v8RHxKSdDKEuds/0ilmm\nhNOH9XG8aIloXML1STH+z/Okfm2LNresfXCPdZrfFhTP/S5pMOd0Z5mtqhvC\nyVYftipdwMx1cdCXLbEdieSomeFxVxGfwM1Cx0LwB9MAocaotUsdxkxxzIgb\nYOoI2w4aVXJIkKUM3s6MpN006lIIgFAC7uHdgw7+rdduVlOINbg0UBNFl39y\nBawojYAoI2mSXvbYM94YE9TkQYmjqR0ZNidZaCAr2exPXPiijUDDzJaYu1tq\nyQdvItAPKrV1gy7lM93v70xlzDR/8xbx27WExh9+axn7W50iOU51vQM9yYu+\nDMTt\r\n=M20/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c64a498a62180619dccf905a25346cc3e00247af","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.1","@storybook/router":"5.3.0-rc.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.1","@storybook/core-events":"5.3.0-rc.1","@storybook/client-logger":"5.3.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.1","@storybook/addon-actions":"5.3.0-rc.1","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.1_1577093094087_0.9601468274100224","host":"s3://npm-registry-packages"}},"5.3.0-rc.3":{"name":"@storybook/ui","version":"5.3.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7c193a7eb9a4f6b2c496bdb84947cc2262cb0cc8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.3.tgz","fileCount":86,"integrity":"sha512-UxTVpJvKo5vJyXNx42Faa5jtqSoQhPEbaTvlVpkxc1dMze5fGo5WQBelZ/BcNAx/4JVJ+87zUayhpdg6BteaTA==","signatures":[{"sig":"MEYCIQCmPdXcZzA2j214weFLJa/6Ofyxe6v2ebemuuLf2ZEJQQIhAPHAJRqo8Duu8lddOeaIhH9Hc3y2UAUk3UbFUTXyzCss","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBKQZCRA9TVsSAnZWagAAjXoP/jl5D/iQlNz96/UqoaZe\npX7fn/bIquwjo1ZV9uttyxiKYx4K5OPfGviJOlZTyq20c3/wrzhZMglTrMfZ\nlJG/pIsE4LlseSkkRaytuxNKfJbUh9jwBbjz2DdAajCo5PaTmaTxI9zo9v+/\nDDpuX/DE2ro7SSbpTOPoNAzS6LTMaBl8tkfpQQW/9ROklecSMOjzs8w0DBiL\nCfR8TgYrDR6e1CUQyf17Ojj4W4EPT9ZBEtImsAYiE6josYfsj6Gkm7PP2gTh\noPRAIppaXgaOcBR4453KV8jPZvnilFYJHtmnaDYOKNNlpCJdPAElx6VLF65W\nuyrK67MJjqLqkFR7TYB8QB3I+b0FF6t/yRntWlAE9uG3TmnmzX3tsuoXQNYD\nZxfj4tE81UUggWYgcoYCpGLdC3B5JnxTT+GYHFbMI67nDXfR0zTl1CmDxhIf\n6ajApoZty1GYsXARHtn6AZ1k2d6U8SQlO0E4gZUe8b2QDYATeML5YzF+DfMZ\npf6KOXnD4EkUGb2gxVeW3tIlTXyznMDzFyasz8i13+/MjA3lBVqtjoI15u96\nMWjyJ2XRgmBNZ1VghSQm9YMjLIxbhluvxLY79XXYW1pfwT+lr6lNWtvfdkMu\nqWN6Lwvhy38WNQSM40mZ0XYMUG88f62egCSjFmZG0miAIlQFJa2w721px/x6\nYgfU\r\n=cPmV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9c5005e16cf7b0acf1b36acf3e783d3ccddc0953","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.3","@storybook/router":"5.3.0-rc.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.3","@storybook/core-events":"5.3.0-rc.3","@storybook/client-logger":"5.3.0-rc.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.3","@storybook/addon-actions":"5.3.0-rc.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.3_1577362457458_0.29533058084773556","host":"s3://npm-registry-packages"}},"5.3.0-rc.4":{"name":"@storybook/ui","version":"5.3.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c0558fee5d2147220d5da22be10cc2365f534a3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.4.tgz","fileCount":86,"integrity":"sha512-6tRDs92nNtJSe6lpvGturMl3GYOPrqvebf3gQvyIjAMzIV2Cf3nwelYFy1xyn8XPcLS1U2OwpJjlCZrWmFXg9A==","signatures":[{"sig":"MEQCIDgX3bcTbRZy4jKrdC/3tRKJqYW3ut5A9KalUTqNgfvDAiANmt4u5MwVb83u5lZa7DUxGtUy7vdCnafriKLrwJYAIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeB1ToCRA9TVsSAnZWagAAET0P/2tFR2JxwiiU9M0nVNtL\nnHTEDj1VXHAmLnjhepW57i/8ChS4uOVuMRvrRK0B8XcYFJLED9Z4cgSZqOry\nr3+xK0i6ZHGSx90QQ8X1vL9o7+ovjJFmu2Nrq7Hj4jAw5HEBYf9zkoLENcRG\nU97bd5D6vnQJxz0x5mc4sEXph5e1Hw5QOlJRcTwjpTdjHNi65D0BznXeeiRs\nhobFBcAdBZv/NSggwrHFPqTMXBtVF8DcWGprm5Rd4/NxA8JKCPkrtJHZ3DM2\nQZsAuv6SkAfv5k6f1JlTpr9WtGM60Du9NaPKcp5nDy2wnqoR4hxrAeQpxPDO\nSIeE8Da7dPZOPdy0jnkD8B/4aTstEWG5I5RreBe2P6MEfcaGQvRs6bFhz/5W\nlM0lKNCtGa1omADQ/2iY96aUVnhRDOWfi0f1DDCo5whrhBVdGhussQdcqxDq\nk4pGEJW6JZI1y/VKVOdp/2G35seArOnpoTdOyaNbusFsc+CN1Nm4T0yhj3/w\nthfCJJJ0hnN28osZXdUPlGeh5BcpyWFLkR/0lUJr4Ro3PLOsDOhBbxvajaoj\nPrltWNTz7FY1mujxfOHd0Vth++P9gkHq7ExnCioRuPXHAicTCDhXJw3OzmvK\neexAQaRTctADqR2dm79++Jf2QYAdWRiezMnHmlRCHJwg6oI8mJQOW81f6C+a\nPIBh\r\n=7dzJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1681a28c83f7f5644103e3204a3d6d669dfb821a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.4","@storybook/router":"5.3.0-rc.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.4","@storybook/core-events":"5.3.0-rc.4","@storybook/client-logger":"5.3.0-rc.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.4","@storybook/addon-actions":"5.3.0-rc.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.4_1577538791647_0.29117327604411614","host":"s3://npm-registry-packages"}},"5.3.0-rc.5":{"name":"@storybook/ui","version":"5.3.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cc86cdfff8cc08a960801342858d419467579b8c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.5.tgz","fileCount":86,"integrity":"sha512-qhBjWTrKF6eoNjQmC6zqt4n5uQbS778hXeSvrgDRafGpUuCjIBXYEXwqbttCuKY8cjOGEEu6IfavT+3rAI8wyg==","signatures":[{"sig":"MEYCIQD/oOJRNHONVn2REzBDP8XFDFpJ8bfOaIhJHEFGR4+G8QIhAKoQif3GYgFczKQW0ybizZbNXza33K2N/wXNH7ZUDa4l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeClKzCRA9TVsSAnZWagAA6l8P/2wW7g6tPLgs6O9Kb3FI\nJ+7bg16atcDZa46Ieyed5Oxneb87vQ7E+c8tlejyCG7BcoFPkTu4nIQUb8+r\nLfwmNijbzisj+CHDiYF6wNV1vtpk1KSQAFETh7pU0lTKv1xUCm7iBOLcWdey\nZTq7e+4A2ERTcEJS1DJp9z6oNzzxEDDaYXqs4a8eH4NT76lQnnJQZ7OGaVe6\nQbY4MPztm9YtPvemOSdm27y2/DokskzZWhFpAziBvi/h6Wj9nCY8wnsbW3fy\n3maa7rXV99WumMbYQTc70j40cItlLLaUgQSsyWaXyDqUxc4BKyy2HdruKkI4\nzThICqJl/jm/WkGwcOnz45jiYUD99PIiD4ZcGmprZj1gkjfV9nw+/wVRT/9X\nC6CscUP7BKFfS/YXklFPzC7XXUrvsLRp3cKy0yocxzVFFJiF6uJUXDwJe1gl\n33fEngc3GfO/J7qJF31RJjwLhuuOJ+dE4X7oQ4mqaZcZz7LCWCVrzqsyuU0n\ndAbQfpUbqorL+whttn+4SV3i95OCCGB6EzGfvA+Ajn49tDdnpdG71TZZFOI0\nMAn9jTNfXuu9K1Pxtn+BrOha7fPc5RJRdjMTxIa+ACb6YYwYRKb4cvN4yMIO\nmYEsUP37RInYKtesULDdtR+4tvv+W/dLtAaHs8qIRRFfpqTLIZhqTTL7KXIr\nMXO8\r\n=43e4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"49e0ffa81181dc692e5a26c35eb74a4e7da7aad1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.5","@storybook/router":"5.3.0-rc.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.5","@storybook/core-events":"5.3.0-rc.5","@storybook/client-logger":"5.3.0-rc.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.5","@storybook/addon-actions":"5.3.0-rc.5","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.5_1577734835241_0.05338856142704285","host":"s3://npm-registry-packages"}},"5.3.0-rc.6":{"name":"@storybook/ui","version":"5.3.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8ca33bccef00feb0783dda8a4452940a37714cd9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.6.tgz","fileCount":86,"integrity":"sha512-p+RW+IhI/GorNfseVwFw9ljobrTpxZGzhPqpqlrc8qKY4C7BWTLzyKbSeVWw1NC7iULQV18gVjeDSJCQyXrEIw==","signatures":[{"sig":"MEQCIEqfw0+9dTrXvRq5IQbgEa1AbxsOqd6mrM8Jr84B02oAAiA0GArJfznO3WewUyZHGP+FX/M0lhLjjZYuy1HvnX3QHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCwbhCRA9TVsSAnZWagAAy9sP/2jRJIYgWZlVH+pQ/wfN\nmOPcPTIRhIB/7FCRLGCa2NokM3hm3+/g/WK/owmbnD8L6ZbHqPeOJV1hKd7n\nzfzSjrgMQa3w+KyAII2j2MDGIeBb+qXk3Ai+9LZfoHg4FBlxrgAczwuzXf4t\nnakRlXxYiCXPvnhiBYmZK+vxaGqbLJZsUTv2zroMHYhj3pjf0m6O2yhk+hEl\nWCYshbCNcaja4e96KWHfLgv5FIJ7aRW051Fo4CMVrGkCTP3HWmBFlTsWJe0Y\nzQsArBg5iRQ6p1kMVTDobASuneTK4hv+yuzSbpUbvhIum+r+MdjWHQ9lEQbw\nITaApXbCXrhA/+vdeij6qA9VU4eVfYqj5UNEzwANiRDyhsc8oa+7AIc1+CRb\nFprqgw1nqffz/1ANSQIZRzOOUtX0aXLuRjT9Bii9qEz/iJ9NcfoKeh6Khs8y\nFtsVPmK50814cUlgFsA7nPg54IjN/Lx5LX+B7OGNHjZWiGUm2sWWhVGmhapu\nwz2Z5jmuFInyoMcVm//fYrAsMzc4ivfjU2VPM8rseTKCoJ5FLUGlJHLrNXbx\nsGy61j3XmqQvYpdJ2a/VDUhbsDesHfGBYx7oOUC4QvRP6urA3yBPVIXferSI\n5Mlxvo9J1/8ri6liS+6Xoj9uv4kYHNj5rsftaXSxySFVdmSeYH/vQB2GQZMc\nziZL\r\n=AG2R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"25f36c6492c7d815aa70d9fb5615712c31019738","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.6","@storybook/router":"5.3.0-rc.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.6","@storybook/core-events":"5.3.0-rc.6","@storybook/client-logger":"5.3.0-rc.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.6","@storybook/addon-actions":"5.3.0-rc.6","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.6_1577780960764_0.4965586224688454","host":"s3://npm-registry-packages"}},"5.3.0-rc.7":{"name":"@storybook/ui","version":"5.3.0-rc.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"39a27275c68e554f0be94022f0a7402fbcd5f09b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.7.tgz","fileCount":86,"integrity":"sha512-UzHBvO8lqziBKYoopSCOaQf/0yL7FQTk9uhvj7jNGXCbQXaVSNsnzdhIPmwA9TLl1bUBIYJpALSPW0KBS+rnAw==","signatures":[{"sig":"MEUCIQCrMJlTfJoYRMKiiiWhZVMEJwCMdpJhSFAqGQsNbQuXUAIgEUVgjD9+mZ8OnyIXNQMjGzW60+D2wGRkK51S4MkTw0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDV6kCRA9TVsSAnZWagAAwpAP/3F0FMir11Pg3eXZIkJe\nxE22wyMieuhqSMqjRPrc0iIBEB6xWL53sqiMlwuBf/mWCMTs24tcx/sv9Fte\nuUYp1/yIdSbC2sy7mMN6k4e0QtL2pw/4XxcitwbZ1sT+kOLiJ6ArDkyPNijd\nppjreWo5FFyt4EIVJ+fK5CaNc/l3nX+NJZMpbdojsMF5rYUTly1FD3A91bQa\n1+p4V3S2VNGzhpPmRSvDtI3smoT7S24CiN66qmbtBjNgAJnr3Sv/GFD9cZgk\nM8CBJLb0NiYfN9glVOlWeZK/XxQrlKxqjPHeeRzDt+moCJgssVTkFLig8u4S\nNo42vmDqgzhkzSCJPB8SIFO+ObXYN0lHh3sAE5O9Repg6mm3islcFJZNOgsI\ntRB+kr2of8d+QyvjNTpPp+rrxLCoM7uDgyoRCAfEQqj8JCISFzgHsq3ku7NA\n16c/S2esqNycAlHVE6Rnv9PtdRV5Myihf8khQ9rCUYLSIOnCgSGKJpCpvAaD\nNAzMI2J48mGSKFneB5Cxzry8N5TYL/+aB3k4EtmcHjwgfcjZJxB2bM+XgJZK\nVK4os37mqk147IqzIePq6GLWEWw4kkGZfgwJGy1/ZPOHId8KTo0IEK2ZRtXT\nEmPK8NEQWhjW4t5i0tG3pSfiNWG4SiTaTOIADS9nN4bAYKdsWvZCgIgRgrpz\nkWaR\r\n=QQDe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f54e19061b27204d2b569db1c0cd720eb6a5b25a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.7","@storybook/router":"5.3.0-rc.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.7","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.7","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.7","@storybook/core-events":"5.3.0-rc.7","@storybook/client-logger":"5.3.0-rc.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.7","@storybook/addon-actions":"5.3.0-rc.7","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.7_1577934499933_0.4685708088757268","host":"s3://npm-registry-packages"}},"5.3.0-rc.8":{"name":"@storybook/ui","version":"5.3.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f362d1d516419c92055a1e0afe978d1b5557222a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.8.tgz","fileCount":86,"integrity":"sha512-YiXBHyXBof5bk528XLGIqoltDodOZsvhPi2N/v7mAtbbAeiKdq5oxsNK6zWMPLArmRid4i/TLMUiy+KYDRQF4Q==","signatures":[{"sig":"MEQCICCZe12mM4k3y0DyG5a0Xy6YvByfjVBT49dsGp90xmwXAiAQHPQwdV85efKXUAlFZEoDjesfvTUIKXlZPj6aENBFVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDwDMCRA9TVsSAnZWagAAV9EP/AkEMzxRuX6CFgHQD6iR\nOaCcs0Ov8+9AuUnMdQfezUZJWYtzWDAXD1sEOfXoVRxnsjUVXGBd54DTh3Zh\n524ltqwOtREk68zc7oL+aMscge5zXfyC/akX+48txHAj4W1tynT4uyLRr1gm\ngkoKYktIJ4pdMiy3v8LF4/rYcnkHSaZKh7KfwaP/LRUibcW+7DNkyaztOmFt\nJi2vzSZMZ4wCRSn0KJ6yscMi6HqeWyYeDl+8CPYW3qWFAU2eTruY+NF0cfQi\nRd5KEDGoOTrXENBNfVNTqDOd1IR9dQ17Z+lMcNuOndHx5xLg/KMavtB97+U+\nsP/YWDLB5nmJqYqYQKxYMvHGYA6EunXHQIEETOce1luxKsdbpV9i7HROwfCe\n8DvwhMqmQHCVDHYKd6IVVMMr8CQTLfWt2WNPRzNVnPsBkgULgqs4dv7PMi9V\np0vjxbFnVTRqVViMtqs0Luj7+mzy9uq4E/GN1TVEwasEw0ws+a5FZ+bBwBz5\niTvgu+9a97u+KfizP4gwtvXt5/tofO5vcAR95nrkg5AHqiVDqn5r/YF1uvbb\nUAvtqMlRM061qhgQTKNVTvVOnhHKCtne+l8jDWFZMVnxVyGJsigGwxiPkaPa\n+msKM46VDRtQg7SX1gxkZNb9Dn8VuNIbMk52fdMqv74qaf041erLs/8U3mMZ\nMx/m\r\n=wJVg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"755e90db0fc60592298ee8cd327227fa86dca6b1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.8","@storybook/router":"5.3.0-rc.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.8","@storybook/core-events":"5.3.0-rc.8","@storybook/client-logger":"5.3.0-rc.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.8","@storybook/addon-actions":"5.3.0-rc.8","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.8_1578041547586_0.8455858370343194","host":"s3://npm-registry-packages"}},"5.3.0-rc.9":{"name":"@storybook/ui","version":"5.3.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"44b742be99a2b97fb9a161aa150f4c0376e7fdcd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.9.tgz","fileCount":86,"integrity":"sha512-yW70vTQKALrLlIM9lV4x/l8yWmPEHfS/KsJB/tneUXoN7tlOcCO1gepgyecRxLkUqKwtT8pa3rlqoF6IhdSzOQ==","signatures":[{"sig":"MEMCHx+DMAhkQZhbd7hoX69R3Cz7n6u6gAeBb07i1MPG4hQCIC0rEFyqRyxw7ZhCD3qTlznXzRRXUgECt6qVDG5abQM4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEIyZCRA9TVsSAnZWagAAb98P/Rz2hqaJtDvedK1oAKKy\nHVsNPUMZFd7F5VQoDn7wbmbFWcETOCZTVAVoFp5B1X5VXZee82kaqld1o/on\nVFl0gKzzjocXva+6zrYjvpyO+SRnMwMLHmoTnfznd7G1/21240bz646tmvZm\nkOTsHcvJP8rnj953aufkZpfUStSYdAobiONRTSqM4qtLVFqjLwm8QBkx72wZ\ndk3Sn4R7nvrDib0wsfvmiEprAYhl4rTJCtBNaHcIbJryFx0KsTMU5kJcT3we\nmMJhfgdzWyF1+FjVWrp5HPfxOZQaQ4+8/+XolioHD3UgV14Y/8nz/uviR9G1\nVDq6NJoTg60K9RQmnebO5KkG5xVGyKjkfHsK2IWLwWbxrjlkVA8g5v5FwhCD\n/V7Ap5PrL4kngwkLopob2c+rVC2FauVU6JBsu5YUKss2US08+L8dpLVe5Ftw\n8Im4UIy1M3iM/wihVidYOd5xXhUqrF4BROM4plhe6PsqTJWP6KCk/eZZBmJ9\nFwStLU8ihfOnyXWyx+K1LiBTtwpbv5wvmmP15h1P6T15zWlYYGnYIkKA2mi9\nbkrKJuWd8EP9tH7Gb+cWo7XVUwnqe1PmfoqumpP/oWxNxLM/SYEZbLk9Q0sL\nNP9H+b68jJNRUqlalc+MerDY11fPlyKeUiETL7CrAoACuCFz++mq2xRk5i/z\nRtzh\r\n=SdJI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"16da56cf90998ec4da7c423dd3868850bbd250c9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.9","@storybook/router":"5.3.0-rc.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.9","@storybook/core-events":"5.3.0-rc.9","@storybook/client-logger":"5.3.0-rc.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.9","@storybook/addon-actions":"5.3.0-rc.9","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.9_1578142872554_0.5588017617204084","host":"s3://npm-registry-packages"}},"5.3.0-rc.10":{"name":"@storybook/ui","version":"5.3.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d0763d49ce0a8331488088e9b0c315bfbc901df2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.10.tgz","fileCount":86,"integrity":"sha512-ASrOB2MO6IrrdhD1gJ9RIx2fP8jfmPFZnHqU5n6X060TWpkjRAzAv4Oz3mTkmT+SS0ZpcikS9dmhy/XTj/aR7A==","signatures":[{"sig":"MEUCIA4MKTX7A41UHXf6zbkRsmOnn1gt4uYDZLl26FRadYnpAiEAlQHAUDVGEJUK7MY0Q1JqQ9MdxC+QJOtToRBR1r3gvQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE0XACRA9TVsSAnZWagAAAwsP/0iMbzLjNOUzyX2CSAa8\nGbrI6/znMSgKklnh4vONsXQ6Y72HsEUQFnKdKuaSLLPvbVT0lOfIdn/RG5sx\nskJvRYKX1HwjphKxY14OiEHiiOPuWkoDcH8forRVme3AEiH446Zn3HO0xBSa\noEbGypD+EOO2JX5JIlTyKIFx9MFlcbsxCqZtp4c9rXft3B9uTX1mPvWtlQso\nr2OSaB/ezusTI1qFPUiDNNw27KHvdDF8xGCO1SynsIDdQTjrKM0rYbFv9EFo\noz7Kb5tqlEWKKVOpOxwMdZwdyP2NFq9vh+Ajw6v7e0wZjoUeNtOwhFd604Qh\nu/CBCn83VQ2H+s02lKMD8ZteOo0IFfmXRphOs4OBIALT1jcI/fFBszSZdzYh\nHNKJpuv/Qn4asB8doyLNgsLn+lZ2ViTaG1SARPpE8cru4zdvKTxROqgpL6uW\nhV3gHDBa6kVwI2Dfq0VZx2plAFWdHDtx7wp2c9lcwy/K2K0z3pVdzwExoejX\nUIV4/K1/sEd60X4RDADk5u3++vbTZqV9vQJm94DWiPjDtBtDtrp2vMcRpPI/\nlMk9EJaUMrNYJEmNSoB2Ln3L4thSeM0a3dvveVunbSRJ1zL24DxDdSTba2kF\nBERhi8M4GTmSeRlZXe18S70HG70XULhHNNRs4YHJQSkNIdJeCxvPgyeSB8iU\n9gF6\r\n=L2BU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"70b3a7aa30b5465f11b42f97599144eaf00e6fda","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.10","@storybook/router":"5.3.0-rc.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.10","@storybook/core-events":"5.3.0-rc.10","@storybook/client-logger":"5.3.0-rc.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.10","@storybook/addon-actions":"5.3.0-rc.10","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.10_1578321344204_0.21905649060897425","host":"s3://npm-registry-packages"}},"5.3.0-rc.11":{"name":"@storybook/ui","version":"5.3.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cd1b88312dbea8d1ef49624dcfab723537efdb44","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.11.tgz","fileCount":86,"integrity":"sha512-UODqvOnJ8kFByV092aRTgPB/Ei+H1YObpz5b+A5GGKSUl1uKw1ksKpz2otZ4Jn/dYyQJxu9EtcxUg8qttJAejQ==","signatures":[{"sig":"MEQCIEZqkBaUu0zpFyXqKS3eAcuaUz0jtily3ks3qHaPOYXBAiBSaXtAqi5Pn7/V+k7cScifBLOxJpAPjY7O3QFYgdzfCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFI9aCRA9TVsSAnZWagAAxxAQAJnBniXXLQuJtaIlqVtI\nVB13XEaRZkVgAvQuhxtFXdxwz0AvFl6XeGnjJ1dcqaYE74OGk2nY8rfDbCy7\nFrE3GJelchT+EnwReGQsmhAEZ9tzEVf8CFGXlgTZZqKorGFBE1r94N5rX2Yq\nFBBE0I7EJ4tRmZf0r2qJS+NX1tLdZ4xBJhZ6akZQ7ufrfaGkWlkehT04dRf8\nCq3nj/E2OF8h9okAcQoQHbg5XAwzH8zwEu8ZwI7fmH8f3L8HT/4thrOpkTCh\n4kpqCrwlayTGPR4MDJ9oZA1CHpI1Pp4t4558NcJPHGds0Se9+IN1H7UksADX\neYuCgeoe3JqDhYCRUWzEXYVlyBcjBTUJV0au/KKukpYGl2sk1h0brh+cYveh\nYzOO4nxjbcfbLz2s3ZCkzRKKrnwBXxJtxAc0xCIsDWfWpb7ljmWFO9vnfH/v\nBFFZJGyDjB4JlM8tn9QT5pRD/jViLg5/CURstgTZsx/jMLz4HnqdHKBcLF22\n+g4UVtix3Qm3dHQ80L0RP9pSIrqlGm1Ziqf2ig9zEMfZX6wDXtsEENjWuvr3\nFa5C/BuzGKJaM1xEe60uaQPMX8HQRv4k4tq8gvcaP/zFohWfAd4nmet+dllG\nfZrVQjSq6u3AyMMyp1NN9m+72NlRS0QOGnQjghTVqrp6Ih9AMOr7wbVbkWe8\nLLAq\r\n=09TN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a44240e42090742fcb7cfa8e76c53cd8cccbf3fa","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.11","@storybook/router":"5.3.0-rc.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.11","@storybook/core-events":"5.3.0-rc.11","@storybook/client-logger":"5.3.0-rc.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.11","@storybook/addon-actions":"5.3.0-rc.11","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.11_1578405722039_0.6751158458294282","host":"s3://npm-registry-packages"}},"5.3.0-rc.12":{"name":"@storybook/ui","version":"5.3.0-rc.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"94013d65b58fc7d4fc95d018861b2e57f99193fd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.12.tgz","fileCount":86,"integrity":"sha512-DYFzyt/BvnSKRh5lLQauRH1jSGSJwZmqthv8RKEFw6QKhjLlrqVNQQQVmPbmhvVAHO1pGtfdij4a/aSB+0n2qg==","signatures":[{"sig":"MEYCIQDWTiuUjZIShIJXUiN1a40uwqWvkWRPcpvgxqhLLADE2wIhAP3585FV711OVIMCGn+3NQ7OPcAOAnmvoKahZXdF8n9j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFe4eCRA9TVsSAnZWagAA8KQP/3R4Be9fA3tEGLHrfGov\nkskw7/ixZCqoFFZYwfSq50f56tEzSWZOif5SWVYJfuJwqM4pxWZkceodzuSr\n+5T9JsF2sFBBqg6BRotDSICFSrXjQZCuyxYDMs0I4dbTMOSvZwmbwpvREK+d\nG3pLSoQEq9BtwXJDUsrdjjQq6mKKet0jrIHNspArLTqEG/wqdQ/J0kLpMtxu\nmW8fcodBDs0UWNyd++/r2Rw8YWZZ0CLMptS+jWURL2dhO+BS+7j77umiX4l6\nG3szUdkLQB7FFCrw8De7pBWJpCcZuB+Pkzv5WfYZJwfqWuKMM76awJKnMuQq\nfWj6Y5Nxi5fuQZI+2o8OfaazptEiWKA/vLqtXGzP+EWNcXfoZ/ZrvCJZOdbr\nxU/DAXsVQGY7B0YBRpBqp09P4VcCFiATpyn66qp5LGUKGCXflrfyd8BnJYS+\nuhjTv8IU9OlRPmAiyTDoXEaJdY0lcXWsTFhNxDE65at8n4cUQrLd3b4OwDkG\nmKZT8q3mlvLNQAHUKE/7V7ffyLGxVsEdcUDDvCVchu9l9glWdovDtIuSLv8a\n+EzgdlraIpLl6kq+yPiOgF4ZJtHz1iuOTbmmczDtWxgvVPWN78TIQ0FFwl6r\n0fIIotD0IVRPQr7D32Or+5u/NRc/qGr5I0FWLPIlO7jq1AyxaLlnEstQzdoq\nrMR4\r\n=1dsd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2c0b28727a924c06028eb755e7b11a06c82ee464","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.12","@storybook/router":"5.3.0-rc.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.12","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.12","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.12","@storybook/core-events":"5.3.0-rc.12","@storybook/client-logger":"5.3.0-rc.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.12","@storybook/addon-actions":"5.3.0-rc.12","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.12_1578495517864_0.7496357722430358","host":"s3://npm-registry-packages"}},"5.3.0-rc.13":{"name":"@storybook/ui","version":"5.3.0-rc.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c2efca205deec9cc11349c96863624671597eaf","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.13.tgz","fileCount":86,"integrity":"sha512-DkHwTotlNuNiWMPPflSWTwZKsNabHEc/dKHEbQKOyPgzYFmkQdVokTi3iJ8dvf5790kqwsAhKSDIoccl4VpnBw==","signatures":[{"sig":"MEUCIGMrmSkdO/yaulKhNMv2QQs3YGbW3t8bBjxBcDpMtdtZAiEAqVs8ak/kyEQG1D3Bxvehktb02jjRYN61V/ohWUUsqKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGTDzCRA9TVsSAnZWagAAVjMP/jQWqVsV746aAFWrokUq\n9O00p0vxtSWliCRPE+Vk/vGcriXxDXcfo0gQ6kFUro4uTNir01LcLPQlfx4K\nMvzSbQYXSGmNAdeLTmPQvHxKjw6zh2L+IwyktIyrN18ACHkxbHGvZcFPmhqn\nICAb1IBmURSwSvYs3cpV+jQndMpEq41VJf3Ak8pfxv7XPX/RQCaCJTKdUyjE\nUSE/EL4JDS7dDDPO7VRyCqWCI2cnOlvJOaz1OdRikJfhNW2tRv1LfxJjWEW4\nfeVawRq2fh6SjYXI3kKFOMajlw5fN4hhf3Dw+eNcRQpjBbxt5koqYQH48KWV\nBvTn922J7qiP52Sz0g47jHYeJOC4pR3y3duXVvyp9HFvwOV9Z6/c7EXis31Q\nV4VwX8RypBfBT+/Hre1WeBrBWGma4hN1ABJ18h3WCsoXF0tzQo2LoJbMV0yv\nIhKA3W+QOVTKtvLxw7qMcwaxj1IfFJvcocbzQM9Y102tVO9uPyrXO8whLU20\n0d3e7+LN/x0exqRPrmwVIVeUv1KVJiUv1N4DpqzMHAGQ2dmTcubf2uP6ngpG\ntx1pD6nYSR2cDpJnGJ79Q2pG3s2pqVV7NuTwZkQzFCaZlJwXQk8quWwKRLcq\nYH4qEWstsLGu0t3HiCIpv3wuG7jaEcNHMCf3z27osu7q1MWXhjG7jAtiwe4i\nAhSy\r\n=B0NT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"90421068801bb17ca58ab29e6c10a73d807f3d87","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.13","@storybook/router":"5.3.0-rc.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.13","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.13","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.13","@storybook/core-events":"5.3.0-rc.13","@storybook/client-logger":"5.3.0-rc.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.13","@storybook/addon-actions":"5.3.0-rc.13","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.13_1578709235538_0.22940078642812467","host":"s3://npm-registry-packages"}},"5.3.0-rc.14":{"name":"@storybook/ui","version":"5.3.0-rc.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0-rc.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5aa2457e5e9f6b03dfb482fab25bd554288b13ec","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0-rc.14.tgz","fileCount":86,"integrity":"sha512-zjYgEUqFYlTrinAMfAjoLjn93pJ42NSUaG1sMEqV+qDY//dUxVEyGyj3VCDKljVKhZYztAJTKNLvlfaOFafGXw==","signatures":[{"sig":"MEUCIDa3wF8+072WjELa/L4dsvVs7WNaoNcUrk1XyFkY6QFaAiEAz1kUDnqFQWXEPsdaSg34vIqWWYo50XHRi639GTJ1+K4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGYziCRA9TVsSAnZWagAAitIP/jydswshJLTg1B+EEVt/\neZfkd7Q1ObxDfr/HFRj8ijFDYGGHXtw2UgPho00xU+ZFxV1zkXceC+Bugfi7\ndFGM0M1z0sTx+0OOGrA9dfWkt7sqGVSXN5bektaYykYFd0j+/HQpDDsxglu6\nx/eKv4fhtZpbus5ZXZ2FWntnIXCdiWlgE+BBDrQY+6hceRmiBYkSFi9pNbw8\nyysCNJZQ2D+f6k08cAdsvf6EBwREEBfJ0VwUoqpl44saJ324ZjYHFI5QMD/1\nY2VSH7uqJ1Tli9jp6rDqgE86tIseWQLzGLUzkqkk2XvCdnF7qzgAt1nlOb+S\n/uLfZVZ0772M5yOli8L04s+2m1hKv048/qAx+R4f3PdjGC3/GkYWK5twD27o\nxlrdIQyx8GWYIguSRIUF7shEkeeBbmyHCF6BP6D2Ad9SnyCBRJstV6fGrIy6\n3hNez3vTE6c5+Fl2zJmMMkiu8iMkOfDFihEQkQ5zx4tojr5rt+LMSWMTl3sb\nM4xc3V4yRFzBUX+GnuNiikuyyOsGv8978H9iIJQZQyVw3LHXOvCxHRSsgplw\nR3pMgaxNU+euCloU5iTjfUpnhhDUhpDu3tYctxDD09J/ehTYoqk69kyD/+UH\nWbs6emxFUjQVzuuQB0wnGoJCUeHHMwoPEOf4AMEmKCKu203G+2D4buFzyTlF\nVyZl\r\n=kA4k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"aaef883c4786495bfdd1c0745df8c1302acb3255","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0-rc.14","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0-rc.14","@storybook/router":"5.3.0-rc.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0-rc.14","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0-rc.14","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0-rc.14","@storybook/core-events":"5.3.0-rc.14","@storybook/client-logger":"5.3.0-rc.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0-rc.14","@storybook/addon-actions":"5.3.0-rc.14","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0-rc.14_1578732770024_0.3597206292946076","host":"s3://npm-registry-packages"}},"5.3.0":{"name":"@storybook/ui","version":"5.3.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2c174540296086c814768fb4cee82a456019a1db","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.0.tgz","fileCount":86,"integrity":"sha512-MwoslKvgxJiTGVRD8deXFye2OFG3sFs32MuRXb2aJb1S7/60TQh8H3vaJFnvULpgv3MQuZXxLqpkHbj+2ohU6A==","signatures":[{"sig":"MEYCIQDpM5h9EyZu2H2ErMn2fJuuMm8M1N86DKNV4xFviPa0cAIhALnPrV6/SLroolXkCoLsboZWB8tb/fJff0PMd5OBE+5A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGZb1CRA9TVsSAnZWagAAI4MQAKUMFtzARx1JZsAFq7l3\nl9rtBk71Z+maQhAzo5Ve2dWGrws1v3CQYJzeHpJpql8iFFNPoluSmGvUBuT8\nw66Z7pUutiVXEdq5sOqyO5j4G587wW/36VVFWklOE7vOpfvZnKLMgHIvRDur\nTBo6Y729xKAImL8/IH9SsKOuc2I3aW6w0qis4iEB7Y410ptwtPpHt9Kh4szS\nLdoEtxVHspEV0OvqYfassO7fkrq9nykFd2d2uvaX0zNEGg+ImeaYUGRp1ZkR\nSEw6rKpHdzfgyIg6tQyWfh4SsZsWN9ZipF4X6fgrcmwmpFxcOaB4jvR1BiJW\nOb5zItYZgtl7COCvMx1krB90JT5VGIO3vYYmedsbLR07HOF9kNEUA+mFHeeL\nt+4UnZflp/jcQxkRdXlttiKgjPLSfZdReNekh72A7JFPb51M3qEpEPsP2eTH\n3GFR3t668Ce3DAV4WyCL9lDpKNtdRspEnpvf8rkoCVKDsBt4S2TB6leFc6dI\nbWNc7FlObNjdcH/I4gW0h94+KU2poOcdJERnNc7bYQ5mz/VLZXczFuXzjgPN\nmYt+1BmAftimvAL7MSI19Q7iUgkFEiHzdz9A+CAk34TVyGoVbpYqzXDpUa8b\nCHfik3Uj6kJcUj4BTbktH2VpDF1ll3UHp1xMNTHaoAbO/oVr9m3s6q0zbl6r\n4pyL\r\n=c0Uh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ee7b9591ba9b2c1eec15e8a67bb2d52db99aa1f8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.0","@storybook/router":"5.3.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.0","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.0","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.0","@storybook/core-events":"5.3.0","@storybook/client-logger":"5.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.0","@storybook/addon-actions":"5.3.0","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.0_1578735349534_0.5463694532085448","host":"s3://npm-registry-packages"}},"5.3.1":{"name":"@storybook/ui","version":"5.3.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a9063fde920ab2b0e6d41ec2fd50015c4e4f4651","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.1.tgz","fileCount":86,"integrity":"sha512-FldNbDAFwIUDR2+Y/xpQAgcG5AwhRCLbon5kcOMBENR9ABONoHMpbvEJZ7BaO2krfzf4DhZV3I3xrNVblTpFRQ==","signatures":[{"sig":"MEUCIQC06HzE1Ph0tv8hf0kzOxkiQG6hXqQgrnrBOeaAAHM01gIgYGs2kzRPd+4daLHmDm+gHkVLvh3vlar54jN3Y3fzjvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGz1/CRA9TVsSAnZWagAANc8P/04idY5kJm0xosIT6uuy\nWG2kodJao/YrWjJjKtgiLMtv9fSCjAEG7Xbwe6/nZeAI6c1SJfdARW34CP2B\ngI2yGeM9v/Pge8lday43usNtHNvwdgFsafMiYbQeCCajVD6clb6xhKw2XxdK\n3Wt0FHFn5pLh9clUevmkNFQLDpeDNMWc4k5pqdJmBpoPXPNoQmZhihLWr1wj\nHu0FBMLkhzh60DUlo9mZYv2R53QWY1lRQrEMjnaR1MfG7+fbNbyxLanXzzaQ\n5WejWcG++lbwRC6Iry6+YAm88bs23g22erbZXzkeJxfM4Ate7+sd1DUC9HvY\nR/OFjL5/2tHF3SQtl8IRIyoCGxi7Ml9wXTX3hxzVVDrIBDSG777SxUw4c/3c\nxxiwzxQ8imjaPy1472Bkbsqe8XvcYBo0pPBIK2I2ImzlFAju40mhS3E3cJCp\neNKq3QyGVIN9ofY4QdlqZLBzKbsB66z5CW7ctUHBpdTRX6FR21jq0x2KEuwy\nWitvVTCOmVj5AOuIt8ThBAm8PGxyy2zeiv3TPKQrv7LRV3UL/GNZf7+FR1lH\nCu5D9FR3s9ep7VDww51B8kcuXwkkKCUqq+Pd6i7gk+TLQ997DsqMdmTKo1kV\nvedcbKmSjARhdvS5ng11n49oDlZiqTyy+zedN3+e/sRpEtPA1+2X86RgOOIa\nlJco\r\n=P+yk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"14f9760411c2087f78e3b65c5c63947c2037c52b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.1","@storybook/router":"5.3.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.1","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.1","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.1","@storybook/core-events":"5.3.1","@storybook/client-logger":"5.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.1","@storybook/addon-actions":"5.3.1","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.1_1578843519278_0.004639919481544519","host":"s3://npm-registry-packages"}},"5.3.2":{"name":"@storybook/ui","version":"5.3.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dca6c6d3ad249745f9726b0f767aa4e8e45bc4f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.2.tgz","fileCount":86,"integrity":"sha512-8trE1N5jQ7YUjcV/kOoeGjeZnR8ESY8m3CGTzGupnZiNKpXYhSTm4GPBmiUoFXQaJCUse/GDPejIyZUo4+x6ZA==","signatures":[{"sig":"MEUCIQD9qYyQMH4Dy7mQp8raJPkE5XjGvgdEK6jgrkZcq19oyAIgKipi6o9bJePczR9XTiNKE2IHZHvkXFvvaalwZyyyvCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHI8SCRA9TVsSAnZWagAAlLIP/i05zxwF3Bdv1wiKZVgQ\nO9DIYiP6iqkU/s1VJFUZZpSeXpFTJZAkVM65MTzZEJxNetakMtW1cdx6pXhj\n2li1VYlcyNM6Q5b8vgjkoWA16T+N5zL12StBD2B3qh2jRDQZtc1Z6N4pvgAp\nApfiWlceeReRaK53L0HlNVZDPzX7q7eeyrnAikNXaszllG/01Gksew22vjUW\nYmIxoTWha89cdVfuFl1AgedPH6fTmIdnEu2T8fKUPKyQUpZQVvLO1OBuYnBs\n7ZHa/nDum0eYVHKAY020l0GZF/SP8bpu3oydOKVLGNVzgrk97bNRVkNjFPor\nXW1qfgs3z95t9PL1s8qXWEymKUYaygwhsJTXOywLMRIC2i6odFtFJ25vPVr9\nVFh6haah1+dgXnHIGXsx5NLVXUa0498NoctpReSYg6GygNGTdX7gOUln+eZU\ncm34Vl5DEftIG73qUEPhOk/69tC644fADB5zEtFC2kF7JpAGoTt+78Sy/rHo\n/ba0Up2nsRUbkN5G7xP40LiuE6M612LbfCTTMi/2h55LovrhbamPczXUqE+b\ngFMSoIHlJnBmL3K9OWXxaLWsMBUx6kTF4NiaHcqX3eWDFjJNnE2XzEnC/E//\n7H2OlqZMt+2dp9Ia2uECoCaV58rfKNCZ4Owj+Ynu9/bxeHslARFR0mf8fy7m\njjgR\r\n=rYvy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5d581285e2410e238c1f0d7d5567d9b467712620","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.2","@storybook/router":"5.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.2","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.2","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.2","@storybook/core-events":"5.3.2","@storybook/client-logger":"5.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.2","@storybook/addon-actions":"5.3.2","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.2_1578929937895_0.623749267047577","host":"s3://npm-registry-packages"}},"5.3.3":{"name":"@storybook/ui","version":"5.3.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a8e2d8ade181dfe09822176d7858f98a7f16ba90","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.3.tgz","fileCount":86,"integrity":"sha512-p0qGYncwKLshzLZYq/6X8PntdUD1Sz73BI6XpLTwfV3jJYZMZD3v7QwXjucOyd/VfVF8gmJXZmhd/GCfVBdmMw==","signatures":[{"sig":"MEUCIBnIR1biH/UzKeYSt1pjE69aQ6Zd0YJv6xeCgVRHXiDEAiEAw+betUn2KPfIAYEMs8L22B8Tn2jK2q7L7QoLHoFW/zg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHZEkCRA9TVsSAnZWagAAP2MP/jT/hn4Xe5/r3PhuySxx\ncOEp3sb84MlGotYpm0tsotM4gSaau44fdc0zx5xwQnUKDI9ILboSFDIcH3Zm\ncDxTWeeOlBJZcMlhAeCt+ehf4g8OImgbOZDo4OjIa9rI9IB9Nk5LoE49cZAt\nXVe+LRzKbxIPOHf+wEc6xck/kqtLGnFO2JRUKK/L0+UkUC9LwlngfGhlsCnR\nY5sQV6FQAx7hDGyIRB4c9fl+XzlLF82d/D1IfO0mR/1i3P9PtHo1j1fEb3mr\nwIvaIuGwxnZzp/cN5XmlnH/cFuJLffddTAhabDWE9pjsqWSBIbqI6EiHFie9\nXvDcqGedFVvU3XSP3cscZTRo57/FZuDr8p2hS+S/dGdjUP0XF511XSNIBG1j\n/Z9ssqnTpyCl5q7DdOvfJ4ry7Y0EAV8Qqf4m73Xia8kxc270LBR8eU4tVMgn\nYm0wdFIbE+aavpfkHuxtuuhbI5VxfNNFaxG6F6LszeO+GxJLMVZyCLYTR/Db\nuu9lRcKj3d81WRKaXUMrRgAu+NZNvNGyUy76Y1eEIFb2ve0EUFqUc+olrOhS\nk4fGy1nCGgVYCWriPP4OzFnK80RZa9kZYBUxMi6jQbMOF6TOplEnTOkQoiTA\neW+5r1cG/K0yXOHj1enEEC+5CxHcvqqm4Vnns3ok38zL7UyWN6aKrqhqqI8w\ntDTe\r\n=C2WM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"24ee5fa7473282d0d5ff0b2ac9fa6632990a8917","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.3","@storybook/router":"5.3.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.3","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.3","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.3","@storybook/core-events":"5.3.3","@storybook/client-logger":"5.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.3","@storybook/addon-actions":"5.3.3","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.3_1578996004369_0.987414868866999","host":"s3://npm-registry-packages"}},"5.3.4":{"name":"@storybook/ui","version":"5.3.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0d4eaeaacba4656b1f02ae17b601a68daa137de1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.4.tgz","fileCount":86,"integrity":"sha512-189TKat6jtn89tgC+pLt0UyX9p8bLMUkp5NvkZ2uG5dRRJcyq3euZNcz0iSfWthIzJZ4aQuPhR8OkjHSxOMnuA==","signatures":[{"sig":"MEUCIQDCcV9i/F8rJor5mMb0HWLBzp1VwWPhJxzEnFgFyvmx2gIgHCwkSopMHjVr0RefQeFVjsFmf3MwJQd5Xv7Rf+JnmGc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIAGGCRA9TVsSAnZWagAAtg8P/2dp2025+Mwps2nAhoFs\npafl9WZtOVtqmtz1qIkEbiw/Hpup0AXuBRCqDNpiOby5d1ab7dTa72DvRh+x\nltADEFjp72aOo6TWu2cyd0g085uhzOFlvJ32tZxhv5FL6m7BotIhU91kxSyl\n9ryZ00BsB0PpNwccdvR1NteMdgH7bz8pWp/WoHuzxrlTrdfKcIq6YCUIO9N3\nzmdg2YUMsNHv+ybHMGhD2xEOP3u+lF2H963si98p84lfABJtMbeHGCtowYdc\n6RKnGAMhwiztFnSEPk/W/ZvYOo5Q0jpU0pKQtZsRhie9KVkNQXXZ3/dN/73e\nbC1UJVVCFGU95qfigaDiVCTWL2kOVN+7Gn+D07lEBwL8By4XdFZdprtJhuci\n96IUpcezerL1YPPIEIhJDkDqzYQ7P6rCmTHSeSYFLlESTcPfxHjjCGeEhA7u\nc58DB96uWzip3TFJ1ndk/OK5KRJuDT1B4Qx2pVVpsSIkBAktw4yxV0lqEMaj\n9dqcawyWeH+W2P8+gZt07UmQZwska4+0I0S/HRT8TjeEpFeyBNk9ABFaK9RX\nZfqJWIRwt/kfqgfACOmJ/xFXisbzSFbgnFR1J5jsv7psMjyT1RSi/fkdj5+y\nWarPRz0iswiCyG9barFpUdmVxTkmq0i1ncHAMqVmIvkwQ2Jq/wOfNt+yujMq\nTGP/\r\n=HuDQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"25850e1e34799a8e1da798e91873d2420956540a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.4","@storybook/router":"5.3.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.4","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.4","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.4","@storybook/core-events":"5.3.4","@storybook/client-logger":"5.3.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.4","@storybook/addon-actions":"5.3.4","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.4_1579155846291_0.8244857159198644","host":"s3://npm-registry-packages"}},"5.3.5":{"name":"@storybook/ui","version":"5.3.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3958d337da6314fa5e8683876eb5a9a75b34ed05","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.5.tgz","fileCount":86,"integrity":"sha512-7oWXcWRAaKlf59YV24pJ8dMrkJpe0IeMBCS8kR3EsAdGVF6zSbNCFSKdzED6y2l14jIFyBo4eRCHCpZLKc9m4w==","signatures":[{"sig":"MEUCIHuNEyJsvwThVLHiU7YvHDy24oBjBYqfMnwXaCriCFx3AiEA54gLw4QCgiXw5sE43ML1FQLQqBfs68Scg4bgLDqy92k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeILrBCRA9TVsSAnZWagAATQwP/jqUAOD/qMuGV80Asq4I\nrcJRPo8ZcL8h8ByppUpBKH3PAi0D3HkY5iooBDtOef77jVlgibqpBXNNVBqF\nGdeEPa1Ffn33oxye71b4LrAgsdwoh2ZT2V5jyi5kruprFOxfMcbv6d/YBUqD\nFWx79tY3YbpMQficLEfGfrWzvCup+cQGlCoEwpEuXmf1zcDBL8QJb65fU/aI\nPcFpuD5yhPU37bNIcJkTjeWpNRvl5u8ZVp5Ed+CEu9OGKKd+TngrSRfdyLO+\nJ9LZrpjjGh8JUvjlHXgJ9bCpQ9VCHU6Hpkh2WmKGk7IsMVTEn2sZcz4BZ3YL\nE/VgZ90iCfUcnxXQPEyV/B6rIjERSPUgjjSqeNJieVCQftM2IaRT26WqMmD7\nKR925AZGhyj6gQ0yimgsFDWTSdNNQCp8jYdG66xu3fDEzNnKr06DkfyOmEMP\nG6LByHZf/SJlplrkX4watSeVfKIMqUSrJYYtCghXZ/j8e7+AkMEYvqE626tp\n71ExcnkZ5mJBIOOajM8cQCWo7oXj/wvdawGBgf2y1wYIYyaw8vbI0yPxrZMu\nytiyNAznyHrDwHGt4WteroR8W3KFURjG6fbYMS1Mcuwy/jjBIUhksFTdoswq\nevdXROzm+4cGdV6dYLSM9xi+kSyCghOl3afqBajLDJ9DtmbJPxsp/LEUiRz+\n6YKB\r\n=WGGD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"f32b34b493b30f1f80ceb2568f3965c6d3d14dd9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.5","@storybook/router":"5.3.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.5","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.5","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.5","@storybook/core-events":"5.3.5","@storybook/client-logger":"5.3.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.5","@storybook/addon-actions":"5.3.5","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.5_1579203264607_0.29790915103479243","host":"s3://npm-registry-packages"}},"5.3.6":{"name":"@storybook/ui","version":"5.3.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"43f72ad1adf95e9b50b83f812373d5853706f72a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.6.tgz","fileCount":86,"integrity":"sha512-yYzS4zZPa3Uoc4O/IYO7GdKrkJWAuEpcrRy1FNxpSxboXm1HMomgK1Iv1+Sptoy85lRJ79d9qGzi1r/Pt1FjcQ==","signatures":[{"sig":"MEUCIA54vTM+KlPUuthnkAAj/f1vSTpqU3cJxI6cZGXpE+UlAiEAhBugO4ZcAVQBMqYP53WXl/Rz9p0GZwaFabLX1vQbLhY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIW1qCRA9TVsSAnZWagAAQGcP/17dng9aYLpNln9ca8Z8\nAxPz+yKC/5uA3R4yUTvBRIznEyFA8DrgILFhXudlvPcLl4L0NvEMNPkyuZlm\nqR2OKFd/X7ck9ch8By8S/1fWkK5UsAw2jwUGKyAH084KzFdifodKNsM1H5aL\nd57fk1c3OYJvBUJ1o2q+PsQum6KdVao000RTV2evEBlIrSYooKMsySBwLBY0\nDqGd0O30WCzygm0mfW2yD/kiOw0wndQqUaI2G7dH9Fag65y7NS8tTu+uH8+z\nBXcXlgCYwLec4MWRzbmiHb4FdknfOMmQiXt/upOETCQAUP3xGyOG49PB/Lg/\namT4qmxPeEFuKV5gBd9Aa20uii+pU0dDaof57s4kVczVq4YBGusaqbwB3c1F\nIILmlxyCzjOz39qEpLrs/bIKD6jmTDv3ab7KjB7cXQCyQwFOVZsZwszy8NXg\ndKgt6khAeKXVDoJTMC8LdsCynhO/+CPGmURzsHa9iJTxIt6PzG9qy+oUCQMv\nuvNzCJatvQJgRqXF5dfMwbn4ZrGSABfoIRaKdBhJTSOVW5e7jqfgD5sf7iyf\nGZO3uPTF1Rf+LjLPH+YqznuDhE4GSyNZ2wA0FYVN0zYQq+oSdxMKpI4h71WC\n6UDCL3vPFPI1f2IWufMr1+xfzwfbPDMG+oR201qR14j61s7p9zOAtoPrE2oL\nbTyJ\r\n=rmK1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b609ebbec1345c0162f98521a53c5890f0655804","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.6","@storybook/router":"5.3.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.6","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.6","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.6","@storybook/core-events":"5.3.6","@storybook/client-logger":"5.3.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.6","@storybook/addon-actions":"5.3.6","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.6_1579249001786_0.21989979190965703","host":"s3://npm-registry-packages"}},"5.3.7":{"name":"@storybook/ui","version":"5.3.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f46c9322301ee67121e0a9c3f1bc0d81de7d0888","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.7.tgz","fileCount":86,"integrity":"sha512-9yVMEcf0CF6yM9QbJ2HXqeQG3iXoW1I6B/MU/1AFytruNASeMRHU+0KEq2vgF6nXcA8X80J4I5c2KY742M6Qjw==","signatures":[{"sig":"MEUCIQCgSUYfNs6GDY+s1l0ml+Fa8fSOQoHwGKVtRWHoXo8MWgIgJmJAzgioF1dK47iBLFKAF+/EKARA2iGTiULk8La17yw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJU97CRA9TVsSAnZWagAAqNcP/i8LwHV5e0y1ea7+am/k\nCgJbqzE7rMplYM0b+xgIuMwQZaUPnlTJmoiHrA5JYcBlkLHIyKaZ+lDsSRCN\nVa/dGXKjHtnqcDjDhQ61ZkG+nvjBvoOdnYXu3wDT7wseghAwerIdYYtseT2q\nhvsghOjogWzSczm2r/kHU5azoAgfW+b+/wGp21TJI4G6JOtHrNOcFloPQfnd\nVUgBqM/dtyvTmXOGq0/GVIYH8yrFoq2zjWyANJVAC5TNA5XQWlc5Ye+cROm/\nhpbvkvYK9bEY//S88fEhbPuNOMSMEGUVZsBOFTeDGqdyd5ef99YDzw6Kt6Kz\nGlXncVYyIt3+e12y0bnp75X2bwJrDQPuou2gG88EgkwEW5CDLNrZCnrKLWIt\nb2lWYVkXeQjLhnyBPhOt7240ICNEFYyWZoXgfrKKqkyNewWOX+lliIWT9wV2\n2G9nXytXiRdPC8j3zihesTdqhNmi/1Ql5ED86BI3qIW9l3iK9PtYtCVapZOF\nVyhKOg+0K92+f7TiAH1XGox9bmRJ8UHd5yi6y4cnCCkdSffjwfe6D9I2fVQ4\nxa8lwtQu2lqBECq9rvzIpsK4x3fyoNFcDhS6HnPi012D3n9FGHBMZH1FTtE5\nCiNoXlbnnS07P8WHkDNAarXBPWtaffGDHiPVDlhRCjLWgknzCFwq7nIrIwXl\n5C9Z\r\n=f6O/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d6d745006f0a4d6e5dc8efe40d280a52468bc36b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.7","@storybook/router":"5.3.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.7","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.7","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.7","@storybook/core-events":"5.3.7","@storybook/client-logger":"5.3.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.7","@storybook/addon-actions":"5.3.7","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.7_1579503483124_0.9629761471112954","host":"s3://npm-registry-packages"}},"6.0.0-alpha.0":{"name":"@storybook/ui","version":"6.0.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ad7cead7ed93d1f30d6df4d362ac40aa11dcc676","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.0.tgz","fileCount":86,"integrity":"sha512-LJha6l9fUPEtV6AIscz2e/iCBojXGhjJBvjs4I4r08yqbJtXUomh1dc35Pks1M10Wcc/q0nbdpzLqu4vtwKfdg==","signatures":[{"sig":"MEYCIQDEwAVGi9n86m6DJwEHAT3aQdNw2OCTy7TbwZb2XqLw3wIhAMkWQGkjAf1+s9BnISUlbGD7Q5aZFrNoGdaRAhEiQ9st","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":385791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJwnPCRA9TVsSAnZWagAA/0MP/AqIztNH20o4nx3bRI9E\nrVPeXNo7rcfam9hX2EiWrSukvylxfNSbOTHyQ+AU5auqGuQTXG0sPskA3g+0\nvTWBUfxmCRLgrhB6JQOoG0T+F42CXn2IN80UW5aP1a2T2eTzUxzY8GLhj2cB\nDD9KiHR7bgrMCV0AiFVeRWYCUvy95/rpHUZiaS8Y32jjk2mp3LQrISkwGXt5\ndCFbvbRvPrbuw3klvk99MPKX4F9U9ZbaQ0pDp8tFKMmwG2RDjXDgbAs1e2fd\n7dMoiMX/nLA+6JSeAiKqOweCbuebBE21Ihatj8AY+TlKmSPX1xnZkYd2VIsG\nkTXPYmgtWu8D8LpmZFpBw+sqr8V5FSH81PZP+ZHcJF8Yt2bNS39m2v2EvRBv\nYTXn1IwzHyhZfClpJhjUISKT3Ic14Te22QKzsZW00yqvpsKtf6mqNSAY8y0C\ngGltIITPbRVmDUql58Z7TRuGFX1a4zV/L/GjZNSMH/cMc6OIElixZlmQUhIL\nS19ksrS/miswQi0zeo3H58QHX0Y54PwTxBu0D40cJ9+Lz8gP0z1KIYUIizSK\nsgZGcpKFZfoMxHDEFRR2me3VqGyOQu1bWeF166b6k2PI1hCuoNF1ARChl1Wj\nIqoTnEO13LKaGqNVpAsEqOL5NpOcjOiueuSMXVXvIZKzLxQmEBdLlN38OSTt\n5CgE\r\n=4Nly\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0cccdabb536469fb0bfce9e59ee70d4fe39881a9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.0","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.0","@storybook/router":"6.0.0-alpha.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.0","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.0","@storybook/core-events":"6.0.0-alpha.0","@storybook/client-logger":"6.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"6.0.0-alpha.0","@storybook/addon-actions":"6.0.0-alpha.0","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.0_1579616719374_0.8973737218066873","host":"s3://npm-registry-packages"}},"5.3.8":{"name":"@storybook/ui","version":"5.3.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b2e314882b2fdda64425a24b12162f070320193e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.8.tgz","fileCount":86,"integrity":"sha512-S/Zf1BHuPGsh+RXV20IFS+FUNVQy/3x44Qr1sqwP1ehUUPXq2giosDXW6OV9gaKsUYEGhywRwDKTUlN8MkI4Jg==","signatures":[{"sig":"MEUCIQDWYtDE89GCs26Rvoe3YwnxIBvr16oCoS5qM1XzNNf6YAIgcsNmbDHTOAbeodpvXaQnOWrzbO7NC9f+BMuLlZpOkF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJyzpCRA9TVsSAnZWagAAK6cP/37isFHTrjCZ+kRaCiqM\nsRFevz8sG46RABls1JGajpd1HV59n4vTjElhZjbRFnQYiYSkp9VGrLCvgnnW\nK10euzMoTZbmTY8lGCmGOCb94KRWWFsla4311izB+8wZqYYWDe/Tt0fltF7u\nxc+A99RDb4EYpfM3ryIhWE8L9hDVCLCKQtr7Q1Cja5C7n9wme5zm1JGrSwCv\nckqyq+84sFF63ihKSGkUJL91aeLX3K8VdfykNncxNSNIxEpB4BQE4LCLjUHi\nta7Nsrn5uKrh6GySQ9kqWvWxfnikEyNnKLtcRuFDPQCggiJ3yUOnKADZGSGd\nFcDUhqfFGhanwLiBvWMgkA+ShZ+TsT0jIEQgvZVFZe27ja8SRxcmVPy6rzXZ\nuWt4a+yyarScb71wmdTEdgW24ZS2QtRM6/reAXoJlRTFLTfoCy4x1NOxnETy\nUQrZj/EQbTvoS59iQQxS2AKedtsuMbodjstg1qXbx8kxZhVVrzzbL+Jtpm+l\nKRKr1RpHmLh3hJ870V2wRluPOOQZt0DN2whThWnwt/DfLZr24yAB8r5eWwLY\nWhsub6FUFUKoj64jMRMXleP+JwZd+wAni5K5leIoVwPlMa4N0E+nstvVqy4S\nfMCuyg1HIwdSE97SyiHUs7CMeDyVTpy/YUec6woaejScNtBaPmJfA39dwdYf\nbmvi\r\n=ptcV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"fb7d7e6169bb785b54c16c9b7e1dd8da94a78ab5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.8","@storybook/router":"5.3.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.8","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.8","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.8","@storybook/core-events":"5.3.8","@storybook/client-logger":"5.3.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.8","@storybook/addon-actions":"5.3.8","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.8_1579625705246_0.8488277442056746","host":"s3://npm-registry-packages"}},"6.0.0-alpha.1":{"name":"@storybook/ui","version":"6.0.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f2b7c59d886e9943a7d66f47562d6961f5a4763a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.1.tgz","fileCount":86,"integrity":"sha512-mvLobtcCckN1VeDXrjYFuIGUc8KOXMWlp82CTDoA/ybb/S/kYolAtfWgTu659ENR6FNcBekwCP7p73f0pDe7Hg==","signatures":[{"sig":"MEUCIGnXieEixnr3v2cZYYxjDMrjQPycHYwXWK7nyYxTjEW2AiEAt1MeEzJYmP3wAtJmUdL2Hi1vvJiRCJquoHxpjoYsT8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":385791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKZCNCRA9TVsSAnZWagAAQZMP/3LSYOu74STe4djVTK5Y\nu/D+gMxUVXGRNgEv83382ut6zxstDR1g/KfdO7F2GskeFw4o1b3fB7ibF9aH\nORNu/SijI++sCb120sA5yQ3XdwhX3SU5hlc86Xo7eSCK+1miN3uXqBx5+kw1\nkFvcuR4M84Wztnj7OhWUVSRupOgjHx+N8eV5BOpEpH1fQtSqIutLriuPX5Um\n+lezpo/gExX7E3i+jzKn3/E2V+PEYpkrjVaDYcf5Ev7qD35lfr2hBjnb03U8\n0gYADNneFJnpbEzJKYwH9NsM5Ht1dPRnfIJtZj7Aextptsybu+RgL+Wi/oCf\nBr95+NhO41zLpmr2Ctx486d08n/nVHQaElmjAJMSNg/DSIVM99yqpqzB0Rhi\noJEFVobRFKHhbzWHcQXUtsN7WNc3/k/I9LAXJufjVOfqEj5TH9NhT9YRVVwZ\nYTND3vVMem0PFQTJBF5fE/2Jeg94Z8W/XQRw00fp9Q6XiqMmnCNFTypGO6CB\n1EfkwilBgtpxw8CqHp8mKIuckoFiQRhDOl8tFxFTsDIvMvaKHDExUTWxuWJD\neyclUqYqg+p+EGDDMLggKx1ESD0sxX0WbuyiKuGBRf2A0ntiOV1cgoSLpC/d\nBy26ogokeGz2uFenF2HQ19n1C5Bo+THFI+CfExBFrtDuDBOh7cFDmqK5lVwq\nR9WX\r\n=cc6P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"81cb58e2f0512eba22bdf49cbeb8920bb51be937","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.1","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.1","@storybook/router":"6.0.0-alpha.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.1","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.1","@storybook/core-events":"6.0.0-alpha.1","@storybook/client-logger":"6.0.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"6.0.0-alpha.1","@storybook/addon-actions":"6.0.0-alpha.1","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.1_1579782284984_0.008129233336892305","host":"s3://npm-registry-packages"}},"5.3.9":{"name":"@storybook/ui","version":"5.3.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7e084ef93abb90b50ac18d4eea879c1f16b3e741","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.9.tgz","fileCount":86,"integrity":"sha512-J1ktdeNaEGJmJUNFPGej71eVmjKct9DXaZq88eY3hwjrdfbBIPFrF6kUcAiP4SY900VlwMKuEtUJDcJpz55FYw==","signatures":[{"sig":"MEUCIQDvZ470zjvrDydKf5DkEPE5RchMNnFn5W58tUGfKjP8VQIgY4giz3k8Or4JPttZn292B0alaktxnWg9npF1Mwf7iJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKvwYCRA9TVsSAnZWagAAhXwP/R4355/SsuOwlXZOgw3b\netLdgwHuqnBhH3LH80Tp9yMXXtvvOysboEQpXtH5KQfLDCHAzE4KUG2UhyLB\nw7j0vLA4+Qnq6AZMpWRdl0SiPkqfi+HMWAGAU/0oE0Zp311WMTm24G+RsN/8\nLixJRxZ4NsyaYPsaHBJEPMvVKj1mkjoD4k/XWsCNgM83ZfbthHDAcJWn98kx\nk6pqE/IfrVVpsPiNufhcLpaHYREiK8JsgLoaOdQdBrnqLrixL3NQbxMRUZK4\nIQ9j9hXUV+Gw5IRHWPRmaQVk1hHa6/G0UjTnyaigJjFFNwCq7CPATVA7Gq+p\nkws3O/Q8z+vnXgyHXI+W2S+p1otCMKM7kR7xgNH3ICz5zWmpg363FWTSu6om\nwffotbz+Jnukxha/ySAwgFL8EaX+M8YfbRYk2U3MlIKrkmSO++GgXsNXkyX4\n6lonlBXL3FIHeamYDJyTjJch8/XpBj6AWtaHTAxHOV1Tb9qcNDzt9+lFmr5e\nteHnmbMJ1jpaeXtXOt/OwdfMdGKMhgyeEfsN8cJz4KQN4xNmg9yITtXK6ojd\nIIh2rif++2VTJ1QN1zK5NP5Lme2caaW+CHPG0UZB8KswcenUQTP8qrW+rBQ4\nuIXVGT/TjrSxI34AnQwdj8OlDQ5VMjRC4RpGsUxq05kWKZ//ueCTgS564TpI\nO+7L\r\n=dhSM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"94aca9f154a0ff6862bd8407d6769cbb6c90b1d9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.9","@storybook/router":"5.3.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.9","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.9","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.9","@storybook/core-events":"5.3.9","@storybook/client-logger":"5.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.9","@storybook/addon-actions":"5.3.9","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.9_1579875352207_0.6536230601453341","host":"s3://npm-registry-packages"}},"6.0.0-alpha.2":{"name":"@storybook/ui","version":"6.0.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8a14e868220889f6682dd03b9a338c860ca06550","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.2.tgz","fileCount":86,"integrity":"sha512-NoQ9gxH0HLpfVIU42+QGKvE+vCJbNEKXsowuud2LspWSyai/1QQZP7sMqErH70UM2H3o16hMXCtNpVPHek+cjg==","signatures":[{"sig":"MEYCIQD0aB2493gkvIAsQLszGIjBszSWny6LBeion1KLQFTd9AIhALY9aUzKixvbP5CGeJzGaat/Yt/RpB8eQ3ht7UFhTmUu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":388961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMt1ICRA9TVsSAnZWagAA4hwP/2YzUwqnbJL9p6QtQrPE\n6AgjY8fHQsbXve4DJWn4nPCZpaCzmr4o7oyM3PNytZwe5kcZvxQXxC8kwk6W\nfxzppabVSxk2DAJisbGgu0imEPkcNq7NgA4tQ37oBL9i3Fot1ZWZe5aLPVA5\nHksHXfvst1sJwQs7qiRSHsy/twsY/1LwtV77/5Q4kBXGYPvvP9pOsGDmTuQP\nGIUusHbSwEeZAMQQ754mTdMShKxBvBdOLaRrPUtt9Z9vJpvgDsw9KZreWPT0\nASut6+8vqTWh9PYXt5bVYm2wtjPcVaK2Cn25WfqktkBm4xORHkhoX16Rm/ni\n9XHu3NaPD4Ul2aERgCLWOA4u+b5GQk52NuRGIbDze9qxQ+5m2RPE/pt1lVi6\nXL24ZxsJfj1EuvY8Ts3bRfJQClkX/ZuSUFSJmuGpl+CrCZsr3l7WbveRA/3L\nZNQrLGoFDqHH0wYt7o4Xc7mmzVcORQu+wc30bT6oJB0QmqzOQsugoDi0STRt\n6ayh7hGiDNbYMd9gSIXNpQiZC0EhhMDfzXvlgg/om9uFcqrpESeI+ERPs+44\nWiEBGNH3mDa7rHb9bNDD+npIVrIRf5/JKdemOrNtz7P49xEgkezBcCg9XTqn\n54i32MSEsfuktJR3bVJIT0pKbf0LONKkrqkGC8ElSl/ZtC+foe98laaIpLs7\nZOh9\r\n=hd4u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"779ef4791d9e2ec24cbaccff2e4b9a5f9b0327eb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.2","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.2","@storybook/router":"6.0.0-alpha.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.2","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.2","@storybook/core-events":"6.0.0-alpha.2","@storybook/client-logger":"6.0.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"6.0.0-alpha.2","@storybook/addon-actions":"6.0.0-alpha.2","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.2_1580391751787_0.965673433226536","host":"s3://npm-registry-packages"}},"6.0.0-alpha.3":{"name":"@storybook/ui","version":"6.0.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3ed04f4745c694d76e306dd8b40610ac4f551ef2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.3.tgz","fileCount":86,"integrity":"sha512-swkRTHyqYyT2zWTgQLvi2gxRkyGYB9cvZZjBj/X5hzggfrPM48mKUrkzJ9O+P7u5jrl9nY+hGAXsBk7ogf3VTg==","signatures":[{"sig":"MEQCICLVi6Jer8PGDgzV4ntV2/xUaJp29IQueWC27fulk5BhAiAkr03U08u/xdx+jlh1zYj3e0fNEViVSvWp5ZS9x6V34Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":388973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNmO8CRA9TVsSAnZWagAASAgP/18cqyjRXWGhbn70qLqC\nGkkUQcxNohX62TexeR9O2Y+VsOGiXVOVh65PFRofVtALGDIUxIoV3Tjrdw34\nliETAKio/BwJWSsHxV33JX495QIvjLyEgGG/FqnFrXEtSq48DfrGrFSplTJP\niVF4onbdYRUoxSvB8ukpi/YauLiCSqWNCg24O4Uk8ZkdAePgLFve+Ch0XMJx\nzKmBXlIIucT2eFgrdd4uOio9r9XYpSwsvmvPrGNctHk3YRLmkKaZbAR6cQlH\nr2WxeGNvf8+WqMZeFC3oBlwYKtgYrOXmLJuoeOtEg0VtDFv7TtNZk+hCGSV9\nyD48gfoiQtrizEl6qETBuh/lY7Ifhq1anwm2un9FNcK31Q6EGq4jAjX9x0l4\ntKCZgtSWV1xLyKpYfk0fe0zRVjS59N3zOyk9xVoioHKGFyrMZCUradt1XEZu\n/euV+7He/5gP6HOUZXZt841vMXwlqn1ZNbDd7VfySwGNCMLNngLZhQgDaBLC\nDaBVcoxkiCuu/G9AxJORE9ZrQGjflv60NbjmGlng18XzKNkZgKNX1pvYywao\nWJl9OMLYn83kih6g9dxKoBJJPQkCkbTlbYczQWm8sr66YPvTOrg4ZEV1wbDb\nMUP/paW5cm8TMr16au4maBdkVEqSN1k4Aw7DFOyDXSoW1LZbwS/py0WDQpZv\nOYQV\r\n=ff1d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7f11ee2d7651df8a90537ea223bf36749b778e17","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.3","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.3","@storybook/router":"6.0.0-alpha.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.3","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.3","@storybook/core-events":"6.0.0-alpha.3","@storybook/client-logger":"6.0.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"6.0.0-alpha.3","@storybook/addon-actions":"6.0.0-alpha.3","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.3_1580622780235_0.21246151842027627","host":"s3://npm-registry-packages"}},"5.3.10":{"name":"@storybook/ui","version":"5.3.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7af027773f8fa300c02447455b85d26d8a762b13","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.10.tgz","fileCount":86,"integrity":"sha512-YVsFL7ZF2reDhubwjafyJK+eKKo5n9Np+VRMPnjeqpjd3+/N70Wg4VnT/AqgKrCXfCGExit+CVf3wbwBpnP1Kw==","signatures":[{"sig":"MEUCIQCbEXB9Gn7fivdRAjp+88vTyx6YFae5TmPlF/J3sZQLFwIgZwn350E4hrOwLCQG+W9E904C4MPqjITb/MB3dmBUymU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNnSdCRA9TVsSAnZWagAAxP8P/jXOvK6Yeck2POEjxJCT\nySu0u+4YglkKznIIWbw3rPgqe4eRrFAhgYChVnOfzaoOaf71nZY1fppLPcui\n/8N6EYbQHrCcGqjIfGb5Awu99LIpHOVDMAr/K3/A3JuDyyhc385SUO07RN1j\nBQOhV/7cEarZAQ7EO7d03Cf8UPjHwDfxrNZNzPWIVVpF2/8ZqlP14+Ew0iUk\nv8qTblSUNmY3ZANPwh57rihmuwyMYsxStFKRqG8UfGYBtqT406alcOFITe9K\nCw+vO26Yvqi81EvObnKex+1+Ut7tehCCMnTfdKs0gpaF8FZovAObHUPEx1Dq\njvnUoV2ygN8mLly0S7gefulVldPX1nTmonKvOy/SUqql1wQeGRgp2l+mknFM\nn4UnvAMoEMZ4nmVI3otwxkB09yN73V/LyqPO5nN7kZwcbS+z7Z2aaJcJQbD/\nxzIOVM1gygz5rtAD7sXEvpns53WVTTDXkiAR+QaRHOS7HZxbLMVoalRyJPN2\ngwYN691KfoOM7/9BCASExwR3nSRum/cDVC8nghHs3UdJo92bpzd4yty96sSP\nQKtRAyqQke5OJvaS0BHyjoUoCT3c2iBLNxo12PogoLgWm7aXk1wVnwRQo+5q\nuW8eoID5ivBE3J5Xg385hoFNzPVlw1dkIky2ONe4l4TmrmH9dfG2L526D2p3\nmr4P\r\n=06em\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"589bec8cb46cf8a32c887ac1d81fddc27e4aaac7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.10","@storybook/router":"5.3.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.10","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.10","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.10","@storybook/core-events":"5.3.10","@storybook/client-logger":"5.3.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.10","@storybook/addon-actions":"5.3.10","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.10_1580627100844_0.37730083627259714","host":"s3://npm-registry-packages"}},"6.0.0-alpha.4":{"name":"@storybook/ui","version":"6.0.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"60293fd5c1296eba086bb3eaeb0ddfa802015a7f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.4.tgz","fileCount":86,"integrity":"sha512-Ah0DK2OHVhr1rvqCAvJn9FRYTnnpS7XpgdpiTX0r5fIaPCEBeV8pr9MulGOqO3SgDaLczZUzKgDGn8XOzgG6rw==","signatures":[{"sig":"MEUCIBEVgtp9F/vUvBfDFxDklqZUUn0L5F48UENT8Uy+jzM4AiEA8kQQlO1dSagZIO4xK3mHfPrTZNpeqgVb/qLT7oc9HFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOEIwCRA9TVsSAnZWagAAKBEP/1ZhHTn915DwVLELeC58\n6j0WwCOMkwA7PgmLLjBozE0ZcmhG7fSsBV/JRwIAt0nUIUVokJc7W+dvRcJy\n+Ei0urGICtXx+gtpIxoEafcS/kOhlfJ8x3emjnzE+1BeNoZKcDMscNRQJ4Vz\nfmefjX2wA2jEsEYq2g4rU1bnNTl5V5BqpUyR0WypeJcsM1lK3pJzrKB2w5FH\nNpik/mbC2VoD59bf6kTRm86btOWmSuaShjySeCMtH5IJnxBUDIUft6RPBcAS\nHsKfV2BkPFslkeiAC13fS3L1JNgmNP/+wP0ddUhCoSHPt7KMAfY1nxk2ooFb\n+BYTjcPKuMOYhuzyA7dj5tZxLgr1TwaKMkt0gcf9vwDYPRjJkpQSL7NqLIVh\nbIAFb/BiW8A5zycZqcwXg0lDzMTT6Xw+ean0ffHXY0GiMJYU7t6Yzs4k88Uy\nDpzA6E2YgJhiyf/bNmmhYpdAXHivB/6vRF0XVL/jyYFnGkAts0e65ED2EGHt\nsrYBhdCt3O3/3bLoaUZtEChavhSZkUJVC5JqhmikWrYXd8IveVjoXtCSwZnD\n/saR9ESXnuixc98k9toKDEfe9/jw7kA7lWReYcRdCV6ykYsNzemL5150RBTL\nXOMVg0SKxWSb2LROmy/ARwfzRRQiYt7CMUbtxWkwDJJd/HImkA6UynR8Xt1r\nT+Zw\r\n=3S+I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d7f493b305f584dffb23737d15f7b757997b3617","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.4","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.4","@storybook/router":"6.0.0-alpha.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.4","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.4","@storybook/core-events":"6.0.0-alpha.4","@storybook/client-logger":"6.0.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.4","@storybook/addon-actions":"6.0.0-alpha.4","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.4_1580745263857_0.39502859794714484","host":"s3://npm-registry-packages"}},"6.0.0-alpha.5":{"name":"@storybook/ui","version":"6.0.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"015463bc2be810d6dee735efda462ca7cfd8db61","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.5.tgz","fileCount":86,"integrity":"sha512-zF/1JPGvTy+T3UGUHwr6jBNJe0PITlQUlSIsR/ntvqJokO3EBoqeTCxLnJYOou2XERj1/6hp4xVLv4VT1oogHg==","signatures":[{"sig":"MEYCIQDZnUFsgt4dU8oU9j+BE3rhy6pYTI99lSl8AHpyLRkfkQIhAILChQ/4KaAiXZrlpxbUnIpxOxz44OI98J4szCGdDdIe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOTIICRA9TVsSAnZWagAApVQQAIGXyBqw5cB97tZj3CZY\nRdWkMVx+pdatLogRtY0Wp13ys/m2b+uqIPP9f2iIb7kwN7sS60cGMEv40VOX\nntTagGqE1NI+E+sacQdn20SnwZ2D4F18IVxaHd/P4r8kozIDe6UsJQrF4AQt\nMQ3zx6V9KrUrg1ABEGtGJU4T00s6u2FK5f6dy+GesYe/KKmq2oF/3WXFmkK2\n+vBAkbgsZuUalq8ArSkCv/WtoQkfxmqnFM3S0GA2G9ep0M5f6BgPgDT7pbNN\n07ZSguEZqg7+Tu2Qxq9o3UafTCCYRIZXKRUO1UrYUyGXuNVpQ/GDpTKkwuVY\npiqoLloI2KvNyle+kFMR9pUwdrYImBM9yR7P7Z0EWwz0ref+Wgtc5mcPnl9e\nxXKTLu8NlI5EfoSk9pv1buriRrqbfC2PBrUd3uhDeqqmpm101fhYttGo/d0d\n8ctg0JW88RnCuqfBTkgaF5/sNhVMigcnsfYGZ+77wPxUbTrL600M7kgceqaQ\nH7/+KRz5lJDML61nmI3RcgQLWaUkkd58L1aVL9k6Pt1N3PkU3ftvBogNGB9a\nLcJ6MkZWydNGSFWEpGSWLBMtYsuYhunmx8AmAvCE9kLNbUQuhHsjsQjay/O8\nWywpMyVthFc8ZRCMVCgTSTmItAkFFpXUJgFkadodx1T1zAe3xN2qovroqj7c\ndUSx\r\n=eEK2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7393fc18ce13ccb329b323dc0d7fdeacbed3e658","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.5","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.5","@storybook/router":"6.0.0-alpha.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.5","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.5","@storybook/core-events":"6.0.0-alpha.5","@storybook/client-logger":"6.0.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.5","@storybook/addon-actions":"6.0.0-alpha.5","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.5_1580806664171_0.7904410981827006","host":"s3://npm-registry-packages"}},"5.3.11":{"name":"@storybook/ui","version":"5.3.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"51ffeb8e3fe3cf5df13b7f86f7b67e9df5d940f4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.11.tgz","fileCount":86,"integrity":"sha512-oJS1Zfso/xy4hd2NhGv/a/nYpcQ/GcHxfT59fPwYBGvxb3hHD0IyJ/3maT8Moq3twBLQeZhXFiAX0h45CimX4A==","signatures":[{"sig":"MEQCIH2so6mLB9zdvz/j392D6v/QY4AyJgJELutliYiJSbcAAiA1ENv7QyOC9uXKPwEAqzOZhZ3PDL8LSOP2yxXE8oSO1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOZVACRA9TVsSAnZWagAAHhYP/R49e97A2UvLnVlp1Og+\nVpmmIXenJ5tLaLG7g50/rkKdukE9wKEAGB3byt3PDmBB+EcjvKKMqwe2Exdy\nMoec8yABaQZSqn9au5fPimg3MPRn/u/2fgYkUCFTpjVYhZPRSaPjPppk4PU7\nol5aqTNRWWmxltMg2xQhgX6zOWDXijt9LcBvyGIHdPVBQ6v5r9A8jujhPAdV\n5tSVzvO5t3MzlNbhsfOoaIFmxQSF4N5940HD/MH+9xZ+qS3wYDNMcyQ70mNH\nGPaxTtE3O+guTGACdg0pHqhhep1i8uogOTK1pdL9SopmPg4kUxNTweQBX+y6\nVDYjYd1zSXKzyso9xQ1jiDzesywhO6AE0bRVTMG333gMUPmNeHp3o5pBNgVu\nQ4MsOoZnU0rahcKxBS7SAm/7KRblm4DIfTCPOAW11fix35JY027t0r4p6hV0\nChW79+aCTLDev8njRoOMLT6QQim7mD+RAqT8Kbl/j1QEjC9O4rKqV1RcgHA3\nyKRSO+9boywDdbSuGErjbp8RAcMPg8wI9UtQ2t4w9OFEcMm6I6BS7fEZeaR6\nlClAx5nwVVFruzfoureOorazw229PFKuDs/ytDavx9HGqKbFGbN8H/305rzh\njxvIaSMPbR7AYhQehWDfnZqHCBTLsH10Csr9UWzMp4h0bZsZpVw/ppbFqrPI\nOuVH\r\n=ELuP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"71b9291fad33bf92c66d4bf166e965f93d42a385","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.11","@storybook/router":"5.3.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.11","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.11","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.11","@storybook/core-events":"5.3.11","@storybook/client-logger":"5.3.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.11","@storybook/addon-actions":"5.3.11","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.11_1580832063509_0.5883844072760247","host":"s3://npm-registry-packages"}},"5.3.12":{"name":"@storybook/ui","version":"5.3.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c66f6a1302d2ff80a8b94402d95648d1b28066f8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.12.tgz","fileCount":86,"integrity":"sha512-dVYJJkwjfGkz3u0lnfawnT6hqBRnANVlKEYirKYZyQ/RouCN3naNh9Sagrpg7hJHYib4Ny6J/pyaNdfdieDS+w==","signatures":[{"sig":"MEUCIBzd7SuILJoi19qhaGgD5NDbKe8yYsXnPlcM1GuiV+KWAiEAzKY/phrIYTaVoyFeJ3ch3ZlRvSlyvkWHLPgIp7TqCfU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOfzZCRA9TVsSAnZWagAAf8sP/1CgwMVxnHtABlLj5gX+\n390dTWxCE9I7EeZ2SZLzxR0wl/QEbKwEKLRoOtYWRPEeNDq3JljniPgj1y8L\nYXnAhpA1m3DzcPsLORJr3hwkghFVQvZISbXeV5AuiuiDdTSgJHvY/CvJstXi\n6lVm/QQKOSNgNeiPjgdkhRwezeqfeZXw4aL7F8uJLH3o23Abzg6CqgoyoTo/\nAYqmW3HYpn09gZBY60u18nLASlsYP2uYf6Rt2TDM8KLw14kXqzenGZTm864Q\nt1ftaNZs+r1e/KISlGlusXIijKkOlnuH0n6idU32F49dOGjnbSJ+Z70ZS/3m\npa2un27Uzm+WFdBTiK5/1JHZPitZWPqmpo6hokVYavR5JQQ4atFAWObEXxn0\ncvuf+S268sBbORk999uW1rnLmbn/ZzQ6//BxMpcgOsBazUvwwF1oOp8Na4nB\noG8sBW1alotIZFqVIj17MoMd2T2P0Ta3xuUTsXI6+5MPs5oXRMswZL7lhjYG\nMgFC4Vefs8EI6CQiH6NBkz3ZTqy96Jfdjn9NgmvrvwJVj2jwkr7EdrMpIiEi\nLapBpwezg5j6GCKiSNz2H09dKjxix7wVJqyGSi3OXk+Gpfm1eU+nAWCqBc5u\nHKIS3G0sybwqfSKsGpeyJ00tSwIRATk7iqU1CGOI71NWvyXi0eFkQqJUMWfU\nLf/E\r\n=FHP2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"55b76e27762ac27ce9b872b8fa893cc8617fa25b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.19.0/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.12","@storybook/router":"5.3.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.12","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.12","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.12","@storybook/core-events":"5.3.12","@storybook/client-logger":"5.3.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.12","@storybook/addon-actions":"5.3.12","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.12_1580858585138_0.6646273547541977","host":"s3://npm-registry-packages"}},"6.0.0-alpha.6":{"name":"@storybook/ui","version":"6.0.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"15739add3bf416904e3b5e4692b36b4b78e89a2d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.6.tgz","fileCount":86,"integrity":"sha512-CaTKl8kpSQN9BhMSLc/IYBc1o7cUaiBZWUdqto7CtT0u8LjzKTSMVbbRj7yyTk6wVfuD/fznFlQLwjCzuKFv0A==","signatures":[{"sig":"MEUCIQD7PEn6gB2tthWKLC4miS+91FsbZLygC0UuA9Hui/5f1QIgBpr0mbJgkkV1ILnweLTgiOOKstm/mUUH+4qjbsPw4CI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOgL4CRA9TVsSAnZWagAAUTkP/iLw9IE41VtAPE70FsTn\n5+5iKyDJ9Hn/CYM33+f1aV2wW0KCUhcBOJwyZTh8Z3XtcXYgprpKU2+ze3j0\n98GOKgdK2jprxvwy9aa+9XZKK/dmBkHlZv785qSKPLh1xUjj6KuRApyZhWo5\nFwAa+jN3ThBopwMB9pr+9fp5c5/VHWhWmeEdRPO4WylD5O1kss1WFc20KVu1\nXoFb+0hSH9Z4pzvoc9XPKu0mymS1zBTwC3rpCc8RD5wrI4YhYeLP8BpySVTP\nt598rawopOfnFc0EU20ggIE1x/yZOSQZb1MS/QlaojBTJm/Ko1xOFnCwnXfc\n+DU6W7UsH4D3A9emN2p8/TycAhdeqikLWax16ttAVPc31b90iecOGT5sdub0\nexCkIj/VprkJ7osz/+VEqMiWiW334QmXrCQTC36Hcxi+Rrh7EQCXJcj/V2Wg\nU0F5CZAcHfFkz5lOJrc+T2ori1gxEhp3q+gnGC3Z/p8jyLzIrTc1cgsQCRV2\nDwCSD2wPVl6U8CncohHyCjYCtPBIq1xEaNIEDLAgCE/CzgSkLL2PZVbNm4G7\nXj9b3L1calofIlI673Tgb+bCpT4kNNU4HG+Mgj2lKAMBr0mC7MrGbprG70TZ\nldxz+7KOp5P7cbHMu5PG9z+BNWOdD6B8A18j72tzYc/N7GZUPR9iPXOOj5EX\n9Dvy\r\n=cmGi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"34bfe843971fbaec1c06fcaf3f6f4f82c490a767","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.6","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.6","@storybook/router":"6.0.0-alpha.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.6","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.6","@storybook/core-events":"6.0.0-alpha.6","@storybook/client-logger":"6.0.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.6","@storybook/addon-actions":"6.0.0-alpha.6","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.6_1580860152582_0.2963551098861077","host":"s3://npm-registry-packages"}},"6.0.0-alpha.7":{"name":"@storybook/ui","version":"6.0.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dec4b7e4f4e45df90cf9f72962a94403e7247d5c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.7.tgz","fileCount":86,"integrity":"sha512-vmZGd4cpQXxqcDIkDsy8OkeLCWg0O48bhdC0oqvc31oJ/D4pUY1AAgH84an4vaYbZRLAFDYio5DXn+HdrdSUMw==","signatures":[{"sig":"MEQCID0AmuADM5V8fo79NNAwtpU+I5vAEmvTKTZWjSik/wWeAiBVk7yBvEydfaMkl2emGRK65F3ypoJ6Z/dyvBxkOLwd6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePYetCRA9TVsSAnZWagAAJbsQAJ6Zf6FWezOBAr1H02JB\na+6ZK2f9Lz/nlWdWCTciCVb34NMYapw7/cC3p1kUVOlDtLuEO0AGB9YPlO4n\nDdyKhvBNHhAG4RIZBbzGmjVKUqYjdyw2LjsZbvv5VMPQILsac9zxPq+cS6Fc\nBuyZqsHZtn9h92YLhUdJ6TK6oNURqVviRLhKj2r8+jhgJjAHTeCvjV9Dse72\nizMZpOc621nDrbIetAmDxQnIoq8hQPLgOCn+Uhem12QnCt7+D02SfMf20UkH\nw3OnUaBVgbnX2G0tQs39Yp6wpotrSbALg9ywUGBk/gIqMhM0fpXOpOEEHzjQ\nJjyMhbyopS4oDAYdBAobvgIYMCm5eA4/rcpIBzUDoaqvUCANWeWqJkClv5Z0\nFfm7RTKd31Zb0CXVKAfY8bRH0TMqnZCTYpC/K+8zIgdfI+5ZUN4M3li82b7K\n+Mw9/T5qa3pnHHOhQOoIdlk6+3JXwJCD6WLup3L8bC6aLkexGK+iYcRT+t5i\nYuYkgmiodM26W390oWwzW/OfyC69I5IUVSwPSPKrGAan8ujcgjXs7U+o4edz\nsLRg9xUPjaftR9Yfj+UZpEwXBHDpatHIMIME/FfIRpaEMOF7pCW6ZnK6GDN8\n9PCDzVeuuRAHNA9jgZpPJl5cuDe0f5HLh1s0INM5N/hCZCqIBg/lJpegvuRp\nSyfP\r\n=cvZ/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"45c040045794124cb921db3a69f15b804e24e3a0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.7","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.7","@storybook/router":"6.0.0-alpha.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.7","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.7","@storybook/core-events":"6.0.0-alpha.7","@storybook/client-logger":"6.0.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.7","@storybook/addon-actions":"6.0.0-alpha.7","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.7_1581090733387_0.8791524189512814","host":"s3://npm-registry-packages"}},"6.0.0-alpha.8":{"name":"@storybook/ui","version":"6.0.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5779feda365be70929b82d7bc90a8490e047a6f4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.8.tgz","fileCount":86,"integrity":"sha512-sGXZHK/AKft967C8f/qsPmtdX8wySwXOxzcAUMzz5d3/scF3p8oqjEIGvY+0F7OFgTtFkVMpA00OkQ8BN3DQBg==","signatures":[{"sig":"MEUCIAZRNIPMjtPdTIS8kka0WYwNZnNtA13dcyo3OHVCokDyAiEAkK5+20q4L8F7huwwLJa0l1mXlni3ObCfADQHOzCVq80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePZAECRA9TVsSAnZWagAAJf8QAJJHDCPp+034xDa7ITkR\nyynSY3rKrIrgU1MmQt+gh2DLuYS0gYNl3YvZ0rtfnPhGz5rpn+Rf4nAobOZS\nCU9/BQ98vao10I7WOo+yaTmlWHKq8d1Hu3pfXyPBsOILL0AfN9h70UEeEEhu\naZbhSevoYyZ7Cy+dsPgJG85WEXLNocQTvQwLJ/6o3W4QxZhQKx2arZwfJpcn\ngjSkzlKO2MOXHNKX+4gjokPruo06Kr/WBqfJe9ZNpDoUeN3V9e50qUhNVWtl\njT6DNGUyOxw6Hg7j5OgLTwcEMB+B90k++pYeFboEYfGQIBT0+pr1LOC5NPpK\nuKFshSBn+XLRT+NJDzvj4izRjXJt+657lZxNcrixCA8WmK3O/bcjBe9piLs1\nboWXpJSuN9wJnDtPFPFfNzUq7y453KNJsYMaMZ0je+iBjQIBmdeaVwIymn5b\nFiw+ymNGZt49rdPGXOW5/Rax66A7lhnx0YaOoerp62QRqeGsu7qJX7gStfe2\nGlmeLXiOBMkbtbaKJFibckvjl4pyjtUzzE7cf8kNc1vB9x5f5WszvfLgu4nP\nrpuox2qjOVA8oSToPIEMEN1gAT1vuKRIOGWkN+C5T8G4CmYPgWcHXZiCR3RP\nIOX8yAjAVoiO2CDdL3gU/t9A47kSlAMYBOJoImDg41igGVeHa6ry0uQ/9syZ\nhPE4\r\n=/N02\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"582b5c4f433ba8f1fe8d56dfc7553b2a9bdb5dfb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.8","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.8","@storybook/router":"6.0.0-alpha.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.8","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.8","@storybook/core-events":"6.0.0-alpha.8","@storybook/client-logger":"6.0.0-alpha.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.8","@storybook/addon-actions":"6.0.0-alpha.8","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.8_1581092868007_0.4281242766571245","host":"s3://npm-registry-packages"}},"6.0.0-alpha.9":{"name":"@storybook/ui","version":"6.0.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b8a89bcc655d16a0b1dced7313424454049a0cf9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.9.tgz","fileCount":86,"integrity":"sha512-3Pt1GXYTi/KTeu93wc4SZvPUQEXyVbgAVw+g1Ab35xUTz+D0uptg2p8xumm9dK3Wxw0z3hQq4ZZIii5pweFyNw==","signatures":[{"sig":"MEQCIE54tbt1GNpZIsmX0b02mYDb70+fOnh1uVwz9pGKzrdqAiABw/gLT/mgkx/4+NgHZTyot4zPHnasN1LVFObPLL2fxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":389839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePvAyCRA9TVsSAnZWagAAxowQAJEnkYLRmKtzVYXyit0s\nR7uruYA/SKGFwnpCI2hPll15ytGM+nwI5RImyJ75NO1HcZIYyiNH2KTOvQaA\n9G+xAWVamPyr1H9CdeE86+x7WBgthle1o59P2FdLhDEt8h1dtuM+MuJzb8sr\nMlS15LJCR091i+DmjxzWsnc1cL6YqVOfFkzjW7Mo9Bi4zHyc8J5UpmQ8fDAQ\njxCdwwpuXMaP5bMzk3v0u25VAvEUmAIqU8UND1sIppAzF4Xm574Mhci+tiO9\n8OlMC4IL84Nspe5iDvpQ1+VsKH8tXJAhoG2279RJy1/L/TFHtRZZHLgiGOQa\n3zukSZqvgwOU6/j8gK51irWeHhNsSe9G52mhqZHoofdb88t5rQxkvzll7e5s\nsQdNAOwGp4Gi1vOJPDsXaJTx5Ejb0OKeBdTfSjkudTMd1TQMFjvmsPnhNVzG\nleaFlSdQjodl8cKvhPkw008rIIUuovMt1QT29iWVAXT7AvSBpdlQDoO7H2om\nB6NsIFVi7i2x75fVZTooFHhmnbG1yjWxrKYBwdqjYtR/Xd1cDcUmgjLV6oX0\nVeRWK5wPS6Qi4KMK4uvKilpJAEALZ/0mfWjEeZSbsh+Q6EcgHXnSMFaAWvGn\nsBb7+RUgHjbB52bNwB75FRgmmRAYsmxiXDCwF+SUdcrp9/W1drXsiyFkztt/\nx7tP\r\n=RsO0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4f0a75c824ed7079c5bb05d71aaa482b1e54569e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.9","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.9","@storybook/router":"6.0.0-alpha.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.9","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.9","@storybook/core-events":"6.0.0-alpha.9","@storybook/client-logger":"6.0.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.9","@storybook/addon-actions":"6.0.0-alpha.9","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.9_1581183026322_0.7655935335312793","host":"s3://npm-registry-packages"}},"6.0.0-alpha.10":{"name":"@storybook/ui","version":"6.0.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"555b079d3af9b05625cd24e39300f0faf9b712f5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.10.tgz","fileCount":121,"integrity":"sha512-gGdcsxWlluP/8lbIz4D9uX6UTM0aRfIc/tpkODX5CovjU1aM+Bp+p51j5nB5KbpHqkRBXEBWbXWXb0rV8LfOHg==","signatures":[{"sig":"MEUCIDFc6p0koANt+4ZMzoxCXzbFaTIZNsH8GNbXh9Sq3H1kAiEAi1dRatv4LS2za3cU7IrikpCmV8W6tSu9Kd78ZkvnPks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":488709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQrvgCRA9TVsSAnZWagAAVqEP/1UHeLyxqWOYQAC+A5tY\nFVZalNSHbH8iB0r+jyOdRSMCMuC96mad6TvNAaXAyHZ3hUngVkYOeiXCgqUm\nb9X83qMeLmivUJSRuRVuyJZD0Am6/h2N1GxnWahx6/fz8cRJSmMFKAz0KJFQ\nmobdXfeUUutu6Gt+LlumKzAGTSzjRD8S7mQkEfJYKEZ1DQmDKq5UJfoL1kVi\nvYPM/h/B4HgoaudRqHq1P7LggAYaTgLUCdNa4juU7GnOxEDTFODg1P13hNu5\nwtEU6FAHDD0yU8rgPPT75JG1yY1OnOf5Nvi+evb9tsl1z2ziXPLvDse4nm5e\nzkOeS6pc2oSNpwXE2A9fw0zXMMJ7c69mI2pS9gYKCDsT+wh8KASmqEJZ6zcq\n9F9aucbP8YPtwt8h18JaVIKL0alwU6kfyDIjnGPJnQ0agkCskdiUU8rgJfEg\nsTLchzaab53KlIRTELaj39L7QsgoMYEzgBZL2VELPbPGsQi7y3Vb+7KrGwT+\nAgyWGlQs5QTbUlGS0igB7TLpiW5rto4ohZhjvT/oVZqPOYMp3TUrBGt2rWaL\nRnO8zeHsAmmuPlsU9Si1Y1qr4AyXG1Lf7XwSKEZBuO1ACfP5l5Kq1ZKb9NRe\n0/gLozN+AcIhLoZSvZitPDKRQ+3PSm4CR2Ri+sjY7Tj4dq1Ppdqpv3Lq4Xkf\n0liF\r\n=N59Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"558371ae9d314244d616eca32547853a69d2b0ee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.10","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.10","@storybook/router":"6.0.0-alpha.10","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.10","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.10","@storybook/core-events":"6.0.0-alpha.10","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.10","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.10","@storybook/addon-actions":"6.0.0-alpha.10","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.10_1581431776392_0.8705216863574041","host":"s3://npm-registry-packages"}},"5.3.13":{"name":"@storybook/ui","version":"5.3.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c829bc1cbcd0995e4888056a9f43fbf8a7c22ee4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.13.tgz","fileCount":86,"integrity":"sha512-pEXWFPF097OjvbgwvMjLsjLsDViu6yBMmUcL+nd3jvtxyxkuzv5X+2J14N8Nz0veJysbp+5+5A8kKGTO+spZfA==","signatures":[{"sig":"MEYCIQD63iLoRFw7ynorQuIPxM58pGaiIZ4+UMPJ2KSBf+d/LAIhALzTE8YukknEMg7sVIOZWQ0e/feiLSpVupBoE5zFQ/qm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ3XxCRA9TVsSAnZWagAAH8sQAIjWVcEkceARvAP5te/5\npQZSUXgzh17z4Id4dUvQnkXrPAyuO153B1x2nsrvzF7OAzRqVuxv8i6+5zmo\nxjjTZjoTiyfWUx7SrCXo5LHvvlWLQvUDL6o/8pTRZSJALtUOC/OXFKFPzyCC\nu+naxqYpywwTGNuPpzbXGZ6qKCb9Pg5Ek0bZH8Rhm7Q0sSNMoKwa2v9hxmpf\ncTE5KhweBIEihP7LTWr/wKiATpAbNerBpuxtmmW+U/vhRSgsTzX8Jxt4y2Iz\n5oqCGDwYNTKE6BR0AFmUG9XnIqKvyVQ/xNKikMh/9+qWXkLkhil6LpY6sKFm\npg2cPs9AQJQDcgZOSGDxp6QdRN5vMNV85vAmFjoCuIbKkEny+kRSeLrsej6O\ntzwoBTkZnECNMb+K8NJisvi0Wuoa5+OD0Iax1YIeSmbsPtqmJ9G+kcdjOxRv\n7TIqFBgEwg3JhfBroS0b5LB2hTh8/a5BQhdiK0gAHz870VKzNgqUGYlNmaNn\ntVRYpiKDoB3EGLlzTb5qLn+P0TNVcv4SixrSEXOCIjztkRqRqX4lg/0bAb7w\nm7tOo4H82DepiN0hLKDgFmDc0dqIjV/RvTcq9a616g7Vx5JT/DUaxteMG0GJ\nqbQ7ZuN+gAyG43nvOeZgxxp45+QPN9A8X5H1x6E24Lbq/I4k6BDQ1GM/gHhH\nGIV9\r\n=LqAp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d840df052a887038e134207da26fd04cc2279d28","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.13","@storybook/router":"5.3.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.13","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.13","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.13","@storybook/core-events":"5.3.13","@storybook/client-logger":"5.3.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.13","@storybook/addon-actions":"5.3.13","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.13_1581479408630_0.09631424579871495","host":"s3://npm-registry-packages"}},"6.0.0-alpha.11":{"name":"@storybook/ui","version":"6.0.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8d67209c5cbf129881758927764d7e2106f6b0d0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.11.tgz","fileCount":121,"integrity":"sha512-Rs0dBVTfxt7GcKuRY2Zf7jd7j7cgLSxj7QBwqyD+MhlCky/v+3IsHsyLEJ0RdlIzZBvxW9eFJG9oXLTdxemv0Q==","signatures":[{"sig":"MEQCICRKwONSOP1AGkc1CoD5B9Lf9fAqu8hx+vy82VMsTDzTAiAfdBN2hTGhFtrFwZXAhBCe9YD5jU9yD65mP+gjnkO98g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":488709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRMzKCRA9TVsSAnZWagAAe64P/2CsCz3YT/Uapw42Uf9i\n2pTTor3t8hi0tLsz5ofCPsvlw3PqQULU4jLUNFWJJZ9JFSOcq8NXT7jn/AM+\nFHf5XkkPDKr1cwSNKIUL2R7VH6RBWpN80ims969pqWOS9ZiNz+gCOqgAuLDV\n2GzvCF3wF3kTT8tjKvUG03g4Z3F6FvD+0zXW7eqtLeZy00UXJ64MRFd+0M+j\nBloMHq8GK/TsS0aBPrP+YDfDbrDY9gkdhLHMCrPWW53UAEnFPOunYg0zMRbO\nMTED2lPMr36n5RJlFLMahhVk0yPqZ65UeKk46gI7cswERolNJzcPYm0W/t4v\nmMJG8BcEPlhxkx2lZBC+yB1wqFmRKoDk7f8YXivvbe8OLSEQSXqDO1Rfx/RU\na3TlWir71EP3PojwLL8awm7gQA7t7rijNmMH3JGA1U8ioQ+JAOVHAil92Vii\ncT++xpBLask/OysYjreIE6SkXEB4O8XpkZuu2lfLoIq9UszoZnRdS+4IcpMB\nfz5C36A2TZhjIdqtyPGne8bc7ull8otFdLlqEsmR7CMP7wXOKgQW59tdPdt7\n5tD/MXSEOe9WvxcTCeLne8sU/fG8qKdA7PU1jLQNXaGL/K+p+DlgJqYmDPrN\n7FvIjgYSczHnU7HWl6CqrQFEmydrh3vzDzO3gCiDHiP8LzcTpqGNrTznboP2\nqRVi\r\n=R44F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f46cdcf7f4f652be248e1c18a5b130e3ca9a07ee","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.11","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.11","@storybook/router":"6.0.0-alpha.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.11","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.11","@storybook/core-events":"6.0.0-alpha.11","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.11","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.11","@storybook/addon-actions":"6.0.0-alpha.11","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.11_1581567177983_0.8689370277675561","host":"s3://npm-registry-packages"}},"6.0.0-alpha.12":{"name":"@storybook/ui","version":"6.0.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"321896252cdcb9ef181ff88f4d60bf11ab6b6818","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.12.tgz","fileCount":145,"integrity":"sha512-dPLrhBu9mQLy3cIpXU6eMINJzyQZz9K9R9zrjG6mHIrYZx2jg1otkbLiMMpSvpoFh9pn+J7iwJryYDV5sfua0A==","signatures":[{"sig":"MEUCIGQ1fROS4kuLEAC2+7MLiUqNMObuo+YqHafKPmwmrnY6AiEA/UIhfB3kdLTj+93JWOCVmk1H8eA/CZugMY7fJHaj5gc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":506491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRYIuCRA9TVsSAnZWagAAqvoP/1Rhwwdlam/iqk+dOv16\ntMWpzt5BvC4r/AwOQS25QwKoyPybIb6YcI6+LIUK9unXJF72ltvO7CwZ1QFm\nT8OIzbkQvuvlD53sKPloCfJzI4ZgX5UXrppmxEZdg2jUk0B1tFm1I3N8F3Ge\nFP0V0diKG9jSLItObydGjQ2cejmbPwF1Ja2AOGiGSplubOm9+2i0e6sBGrPU\nD2W/3jZ71vcKkc9BrIeFrcP/EXuFuzOkM06q3J+OxChQiQ5vBARznj3FTShP\nr5i0uRF1MAQDkkSpbtBiTK8LXPi1cQBZitKyxRwJbiqJyZoRmE6G30xroyaa\npS4PfAXHjZLudihNhI7+ciwXt2Qo1Q1NLCnpZeCMZKyjrecRca9HGJUkyfCy\nfL6SWL3fjSZvlw+GnSAHkBoqSrjGIiKHTIct6gfwWApYBgHPzQid03DOEVsQ\nc/H06aToz8wyFGAzhIBPZpjgA81YvnIifnGbt6evPargnEw7Fh1gMK775CzW\nh28hqO3Ouneyi2DnV9f6R+gEHl1dGu0Ir5Uap4Bg6d/oS3zwOHvHBF2qLH4r\nqHM0rmgUHK7k91J6B8f0kjTqcSYHJycChxggxBELvYSMNfsrcOB6E6UcY5dc\nwfpVx6+of15rV+UrTRyUauc62Za4tvkNF7F8qOt/Yf4m4YiCZKYFb14YQwqy\nlpDd\r\n=eKOf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ba5430acb5a6e7695528604c1d264641afc7f6b4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.12","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.12","@storybook/router":"6.0.0-alpha.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.12","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.12","@storybook/core-events":"6.0.0-alpha.12","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.12","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.12","@storybook/addon-actions":"6.0.0-alpha.12","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.12_1581613614044_0.21451616594204848","host":"s3://npm-registry-packages"}},"6.0.0-alpha.13":{"name":"@storybook/ui","version":"6.0.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6b52d4c30898d93b8a735db87d8b35273452c328","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.13.tgz","fileCount":145,"integrity":"sha512-oy4GM+BG33MmwtaGM9QOPQulH10wBsB/q/eVx0xWKGkeWblIlvvABwkY3LtwGLpJUIDNEF7NN5Vmlyo3kFG97Q==","signatures":[{"sig":"MEUCIQDhgIfg12EcV0ie4r1dMHxJ6yzbvqCTMdP+v4DDrK+5MAIgE0jvpAO4Fmw7Ynt/qW1VKPBAjeCvPMnBVsSRclfFhC0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":506266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR+iwCRA9TVsSAnZWagAA3BEP/1JIBf4QAADrmSPiGy03\nMVFKpnPocKvhHM6MbIIeOurC80XgJhU9XLaj1X6okz50LF3csqEQdTaRVOUZ\nwTH5tmgpdB8vVNMYWCA/S2+GC1CtzvA0S3P1QVxMb2hD9rmVsHpgBeHSJEvo\nWbWyFVGK7hTj+YL/Evhx3tOLSpXtyEx2Y87WgluhJASfabsD2LNys7WN6pMC\nxc7rdPMykv17uxCumncTJi7RHf+J1ciLZA2I44CbOuqSihSF+2Od9ewYq/KJ\nI0BULCFDkkLOlmHPVYoM4q7IrZL2fer4b6yfqbmGvwqgcHAPC6sOBVgmuETK\nxPYQvCocERzidcDpCL/6moggZ2Ib91Dzrc2/VWgRjQfIDklNauJlHA0ULsYV\ny6I3RITAzzf5BXwPsa3Fjyd7mZJe6mcTGe8H6FK+iG5vHbPQZAPbmXsAzjwC\nF8FEIN4hPe1EIU9lYj/JbtHJJSzQigFci0W7mFxvZbzvYKvLo3d+5V1wbdji\nldcCBhwISFzPINkEBo58DWH12MCvEZ1jLUdmSijFH5f5rxOrddtBGFzLZbcz\nEbocb6zNOPA/dCf4WHC2J9wc1ii6xgXVcbOSiZpOxx/cqG6vdB5sXIa9fK1L\nnduxWZgtQNYAGFtOBJR1hJx+FQJB2FHmT1xm0OWPsvQQ6zhAwczxJuapkzA8\nJ8WC\r\n=ZgYf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5b11df0638c68341ecb936530e24ea30df17e7bf","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.13","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.13","@storybook/router":"6.0.0-alpha.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.13","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.13","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.13","@storybook/core-events":"6.0.0-alpha.13","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.13","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.13","@storybook/addon-actions":"6.0.0-alpha.13","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.13_1581770928485_0.5802882332579249","host":"s3://npm-registry-packages"}},"6.0.0-alpha.14":{"name":"@storybook/ui","version":"6.0.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0a5ad6e248be12589adaa7459c4d144516533084","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.14.tgz","fileCount":213,"integrity":"sha512-dyLTwHe/WK9pgNUWJNKZaiIpT45wd0O96I0dY8oatPLS72uCSTrYxZ/JP4WqdjUBEmY+Kaiepp1D/UsFNO8eJQ==","signatures":[{"sig":"MEUCIHVHUzktBEOggUa6FoZUxmCyiHx0zNyaEs5QycI8R2YAAiEA+8IvYR8YnHPNl6yOt6K+JJ/znC9WrPHxEy9MQuhiUIE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTGyiCRA9TVsSAnZWagAAgYgP/1QOD2Zd6R41WSlIOOJI\n+ZlOj/boAdc2dcHIcIEUIpCLSVBZNLh0HaBtfHgRDY8/PNgqFmYxLfWbFAmP\nqVlhN5NutmvkRuOzO3I2OuRyqrYobJ5oIVujbH5UzQpyDMFgXoCfTwf4rxGu\nmK27dNak2irAvC8nM0bCb1Ig62boMmb3Dq3ZWC6IOpwmdWTb6AoQthQ9ZF3U\n18LU19UQQgipFnXWJbKqyL9sFOs2XBuqxbvpn+gg1y96NC7A42ZKUJiXcOCO\nRY3RtnFqHn4685Xq2ytCeNif0fcIKMW5uMev+SuUAR98DjFuVWC3VbCf6nUg\ngoia1lb/pjKYiEaXqW2n0Ob25JcigePxCVFhf0oDjN1e+sgShOoxA0utMdUr\nUHJb3PrTNYITWvm6qlZNYYgJxamTDT7EucRK3PoqDnLT/CsIehuY8JJ2qk6S\nc1reQ35wUoBgXSoK0yNDXTxPHWArWREzgr75m1v5eqGiL1c8SGA2VTyVMhXj\n3J+6R53v6czdmuITmaZ3Wn+C0XL20HNaG1Qi8A5KFq3syolH9jwRvEsoK2pr\n1AVDHbGMP1E0nNsAhvO+rPOgny+7iTHqT9Bag6AV4hH8mwb+/RGKxXx9Ebwm\nLUaPb8Qfl/YzIqEzMoGsN/9alDTWpVBRt5bMVMfd+9EHLPPoQAviQCX99d5U\nv5m5\r\n=r/LM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4341bc65f76a969f4c509e0377782964d687fa01","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.14","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.14","@storybook/router":"6.0.0-alpha.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.14","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.14","@storybook/core-events":"6.0.0-alpha.14","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.14","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.14","@storybook/addon-actions":"6.0.0-alpha.14","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.14_1582066849773_0.5453685042835292","host":"s3://npm-registry-packages"}},"6.0.0-alpha.15":{"name":"@storybook/ui","version":"6.0.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f0f3792ac85315813ba2483db62ee6cc38d4ba05","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.15.tgz","fileCount":213,"integrity":"sha512-40z3emcw9tsHpskC6hhWxhHNCFnrfoiWGDXiDpUDA/OcA5RETWAPvvEsq2jG4rYaI4z+KKmXUpbU/l991+FRNA==","signatures":[{"sig":"MEQCIBk9CTMXbcNUAiIY939cBuesC4dnwvcI2MSjo/1oZSZ8AiByV8YU+PymmyWO1fiwegcJdob+Qj7Blw4XEmLtxI7l3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTgS5CRA9TVsSAnZWagAALSYQAJcr8IiIjVfowumQ3f2P\n3elo3R5Zkw+km6UXJfnNyKB6k1db6p4IyloNQlOAmB4y/jrcOvPgdgn4hvwY\n+D6muYvpwpuZLxSq+PEhc/pbsxwl9mjdZcncI5hqB5CidyXuSafQ2+BjpeeA\n0sxZY/EPMFsuFLJOdqr9Co1GJi64Qd79E85im8eDcWyYBJUrLb3wgUgtm8Wt\nL7C29xrq+ye9FuY5WEa5htcZyt5twKoVlC48nSnlKjG7d+Bw50x0RpbwTScH\nsAHY352MKKmRb5svPSb5S2RmHJWQLcqGUNoubwBXJK5Ta7gs74+X8wBYkpjA\nU0fvlXCBCYzyORsL0gKrLFg0r3+7YsvT95oP0aLgPp10LC2yZtPsaDf2Cjp2\nTFT1hGhbMI2WO0DDKIG7LaTMRZuUQ7ao1WTXlsVLZ9lScHb0GJv2rOsrcY7Z\nyEbu5aQe9HV7Geho6zdR6oaQohGf74LqE2iptEN1swnMc+BWIgILnWBd5wFZ\ntihPsTlDlKIhldHC/Dmyzq0Q9MfCIGnWKB98192aWxrNQflfpuLdr3A3IcCO\nZWeuxZ/RKDKC5k0FA54ItE6Dbx8wWCvd7Th/ZqPmhywmROujUpu7u7pwSjib\nfuh0sfpzTNNebkWn9hNoDkybfuGXj3ZAdWMcrGOFg1fE9Zy72LSa4BKM7DoZ\nKfoP\r\n=Z1AF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"efd02563483f19e36a6183b9e3b3970bc97057d7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.15","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.15","@storybook/router":"6.0.0-alpha.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.15","regenerator-runtime":"^0.13.2","@storybook/components":"6.0.0-alpha.15","@storybook/core-events":"6.0.0-alpha.15","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.15","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.15","@storybook/addon-actions":"6.0.0-alpha.15","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.15_1582171320754_0.7099561096753493","host":"s3://npm-registry-packages"}},"6.0.0-alpha.17":{"name":"@storybook/ui","version":"6.0.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5e7c298ced2e531f91efb51dae0681c1497a0409","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.17.tgz","fileCount":213,"integrity":"sha512-wRgF8hGY4flPKTPTJHS3QYU7pZ0GK3m4/yHtjY46o+JVaaIyf8Q3pmkEFkQ7e6dFTmrfvRg3FegXqOqBe1cGvw==","signatures":[{"sig":"MEUCIA5mKVnx8x+0sY4K6bQQbjLhWwso95xMLh/bJPfQ03osAiEAqhHc1Tgh902JTSOb8C4kqvQByftKmlSvgcTh34VM3ds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT1djCRA9TVsSAnZWagAAADoP/3JBBhAbivm00p+fKW+9\nu8y47velhURHRncEcQr+9FUk73rKZ0WZsC+BakFFfQRM4LQlTl16d1m5HJLx\n2Wz6HehY9Rki6kVHlonzvR6hPHSchsBP6zvL8PxUukAyStqagL/DPCfNdKi9\nF8Bo7e27elv2eDiHF7beqLc4saQ7ZszS3Odle3dDU6HPnPg1islN/bhKLbKn\nIjVFpT6uJZJ0ibxLupJxcu2El5gdEKlKU0e8jSzgQrDBTNn3Xsyn9ivJmF0w\nL6hjGwAK5tQb0RoJPAKZiSgvgVGPiwne52oXI0za0DfWNpXynaZVR15EvvyW\n2W9IaIyN4Nhu/FTHylwLq3HuKFE8zSym9M4RfIQ1qOuhXLDLvvlQ5+NtQ5/r\nMF82Uf2fp8CPhANU19T1Ecp27OA/JiEyTb2KRQ8R1WEEO0VuHp/z6Lbdbekp\n+c4uQeFBDcEMJz1dLYexQg41bN/Eg7oLyJRlttSFLnaCLxOSuEIABx5fZTn/\nbnA48FoRLGg+4tzXB0zr0AVWbbdbpmQWgpD99Awfpxq/beyr4gcOEDK1LHYA\nTJcxR2zHmwHI/P0BjqkIS5muaIgqUDgVrfD7W4GCTATDMuTWjWuTK52XGod4\n8oHautSKu0UvvdLdMBLGpbZ4HaVdFCixXhRel+5g0jKzattv5OR87OSp4+Pe\nefvo\r\n=ve1y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"36327ee08ef36c0baffe420e3b4c61027146fe18","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.17","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.17","@storybook/router":"6.0.0-alpha.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.17","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.17","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.17","@storybook/core-events":"6.0.0-alpha.17","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.17","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.17","@storybook/addon-actions":"6.0.0-alpha.17","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.17_1582258019123_0.9764624503357209","host":"s3://npm-registry-packages"}},"6.0.0-alpha.18":{"name":"@storybook/ui","version":"6.0.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2d6599bd50149f6c6af6ce0a517f6d42e202ec53","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.18.tgz","fileCount":213,"integrity":"sha512-0C0ZdUl+hD0fc81oPtBb6kaKfyddINgy1cq1mO0jMF9Gf/1zpziMMohtYJBtt4ycjSYGQjeIhvN59/kmbOZ/BQ==","signatures":[{"sig":"MEYCIQCrQzBhao3uQVvnS4jEV+iu1gahj2rNY8PuhZpRY5wEpwIhAMQ1Atq2JknmoWC5IhuFhrIMh3eL5+O4AMP51jyP6wJ6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUD/qCRA9TVsSAnZWagAA6moP/A18MOIZ7G/kFr6njd0d\nH43+SdxPuBPjjYcLzFi2vXZ5zmhJ9dCtjstnMXfKmF0UtkJWVA04mJLZOznF\nrZfzAd+SgZWaQT5BhkhAsbbF86l4uHzgxzvdb75Qo539bgESDFegTP9paO6+\nXiv3+hTF0/yhhIWqTx8pcl6wHP7r1IucAgTG4R0eML6/pH6jrGzgoSvU5//R\nchI0nAp/+gRkIPJXwYHgruxcmBlQNyMeod94vSCbOrttwOLrp3NzCbqOP2HC\na826gxgK/mU2yJG+qNLyRa+3AjG6j0N89pVjpyGagr4V4RPCmtNqB9Lh6dq/\n3XgRXis/2xvRadzQOj7mOkRJCMghK5jZg9e68/fmJpYNOAqy8p5b9gc/S9nh\nIeUcpbl3jd/6rYFHxt0eidDy3G131yuICqphoQCpQfeVg0JXKGUNXIEehiju\n2CpevRS5WO5Ryvku2G5otUZkbSVd/EoVsZwTrKQiWrx1AJGYe7sbu+NeJzNr\naxLlUa834u8jkpOksK/QhnMxbhl7rCdULquDCUlqQiP2WyHrZWLyAxJipCl8\nAVBzOLm9GL1WpjzOiSR6buA50/yeW02qq6Htl3tkC9EJEtbEgnwgDdjsIF4J\n9k4neF0Pr2w2S141eMtd6aR48Bcokf3tPVnuszPuJe+VPaLo4Dr/OmXzu+Uu\nfE2V\r\n=FLBp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"480370557a927cab363fa6cdc25a63339f2bb00a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.18","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.18","@storybook/router":"6.0.0-alpha.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.18","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.18","@storybook/core-events":"6.0.0-alpha.18","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.18","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.18","@storybook/addon-actions":"6.0.0-alpha.18","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.18_1582317546485_0.9575360763361704","host":"s3://npm-registry-packages"}},"6.0.0-alpha.19":{"name":"@storybook/ui","version":"6.0.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1b94d8c21ce16325cea2355ae8d65cf6dc7a0fb5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.19.tgz","fileCount":213,"integrity":"sha512-ZT9fPztkibqjjs7Yf9YehARg9MJOIaCKZtDVxP320gQ+taI8J0BR9KqDyPVKAdQWDkJf0rW3A4XfvacRR9p1Xg==","signatures":[{"sig":"MEUCIGFM5AgJKvwBZuYu81NoMzQjcU1kpDiBzNQJsdIydyE8AiEA7qNE1WJvcIosQjDVrby/KI+ehZKFlsI1m9gERDFkPWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU99CCRA9TVsSAnZWagAAyq8P/1bJQ3Tmkrf1liO2j2bz\nFdxjrxmVZQY2Wxh/LyoPKgyqln/bw7oKmFHwjlQOn54EHsntGjgcCAHVYDvl\nTxX6bT/Q0RaaUwJ0A9+dzQ4vuljXPgCDKW4PMJDHC41n/LgTtzLPFfFZ4skH\nu5CoSPrAnzIdg1NYw7FHhvNLdRCx9b1ZSC7yLdvDI4iON8R3Tfw7SuAl8JiR\n4tm1sz04GYUVpoeIDIlxQ7gOm/BXyDVjm4KKBghWgYnMKGYqA0W/Qo+MA6fE\n7MqAlBaopXYfePfh/9+CndVPCsVLZTZy++ihl6Yn63xfD28Lo6Ug1vE3OZfZ\nGh6JnYRA2umX7JuXMDPwkMO04cv6HHCGDBArJVui3OphslrbChcjkmEpmjWV\ncfo8ki8V7UZVo5XC46zi4gPONQLoPC1dhVhTzSUnFba7JPCdgwUQSg7NyJKV\n70oupJEk2d4giAu9rPDkWfrLjec2F1tG7Xk4bu6IC18y+G+KofO0GisDk6bO\nLDcm9seF/ynLJo78/mx45niN/KgpTOMg9lxh5nfwNwYozSW1ns5LerZOSBBR\nSqeAXE/rJWcDGAiWBtdD0m0vyAgEeu07EU6RQQKebJrIPPSv5C+69NQDdS9m\n7V8PVW91c106Lm25RwTVh9I3BVhqnCxWOTr9f9GSNuxRF87XydrKXVCdKPhF\nngnh\r\n=KdN5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b5b1bda641d3b6bd3d82b23d2968502f1e872f7e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.19","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.19","@storybook/router":"6.0.0-alpha.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.19","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.19","@storybook/core-events":"6.0.0-alpha.19","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.19","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.19","@storybook/addon-actions":"6.0.0-alpha.19","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.19_1582554946307_0.8312660382771129","host":"s3://npm-registry-packages"}},"5.3.14":{"name":"@storybook/ui","version":"5.3.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f3c49241d615bb20cb6facef84b4c432a85d814b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.14.tgz","fileCount":104,"integrity":"sha512-4zQOxpcvbKqRevmFw3Er6AWr2MeEMQfnuYh4Vm5G5YpiTyM6PU0VTVRzKnkEbNBcgjClD7nwXSbkUJjW6MJ8SA==","signatures":[{"sig":"MEYCIQC/NuBVSh8d34opHgurU2G5YCF4PfSh6JZckQ96wgQwhwIhAI0eBmrJ0L0rlD+xEEt1FyVDy+2DIEY069qu+0xhJ/JH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVTtJCRA9TVsSAnZWagAA3gAP/2tP+1AD6Q48rR8TL5d8\niARqKJP0OZF8QrKsJMme+matjcVIrD6qNi6y5Hll0xrAU0AURM/zgdT59UqM\nhDEC6cnnH1WVeqYvow92rO95p8wuiiQc52sClrtUK7Ddy+oSQSWWESv4L0ZB\n509pm/zAu/oisBREIRllsrabBaZvzJCeP4f3xh5IFui5FBhPClnvlFfO0A9c\nmH1qMH6WZ72xardZIEkHye7P2H9DtHyBLTbJcdiUtgW5w5FArTEs780By1Go\nFQsoyQ+ey0yQbyqnGnH7D7V/IOgbiP82+AMK4SWk+g8ytC5PwHvA1/WJc171\nkdjbnkaUmhgUUYqacXXlkWQ2P8TOXA9fk41Deft+d9klP17Kf/MAFqRWTQtb\ne1ieO0/umZ9ogJ721TJIT6WqU7igZdOO0xNb3YBws9RV3CxGtKyX3Ecl6/Vu\no3kNtc2rz9vdFt9uQue1G9GQhmIqz4mitSIrF3upN32GcaGgIE4L63HU8iOi\nmACYOCtW2R0bSQL2efXNKE1Pn3qx4zM7K8hc8ZoHZ1LeJ0gsbF1s30bYR4Qo\nX0LiB7WSsSd0v/kN0tZoXZrt+bY/Oa240fmkdcX1e2WuShW7ZCeIRg8HopIy\n7ApLDOc7skPnryD8JLI0Opbw00buD5dwPB9uTmHwA4NI8JoH9wuxdijhNCN8\nrSfW\r\n=1LkO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"91d9c0c4e0afd7e494b23ec8076b21e45b7a8906","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.14","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.14","@storybook/router":"5.3.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.14","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.14","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.14","@storybook/core-events":"5.3.14","@storybook/client-logger":"5.3.14"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.14","@storybook/addon-actions":"5.3.14","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.14_1582644040721_0.5162914164496022","host":"s3://npm-registry-packages"}},"6.0.0-alpha.20":{"name":"@storybook/ui","version":"6.0.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cf27129a5c075e03680c05f2f1ffd45939a9c716","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.20.tgz","fileCount":213,"integrity":"sha512-JR9R+zKxVJfiAu8l4Zcw3sg5vJE9W6+6tiWJSBScdCmjRRleE2Q9ugu+bK+wHLGywnSWWNHU5U7kCY+zkAWsvA==","signatures":[{"sig":"MEQCIFLGjxGNCWNca0ij72ke7atdAJSV/wBLkjXhssCMqtKfAiAHUT+2PbO80IOcugJZ99eeOZQQe+hWP3XbyxxrPZgujg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":637426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVw53CRA9TVsSAnZWagAAdJAP/R3LWKRon1Gjzf//k4bV\nCBkFtrSowsKhJBIJZ6jeZr99SqrujNYzY2uLDlF/Jin57X/QbH0inNvZtTYK\niRR6F3bKvx7MIaNrRDjzpZ6S6uexINcPSeiWT038kSK49C0QyE+hduU/GQyO\n0L/oMGlTISF8QMS59ee9YRsnx4Qq0kTYPEh3hjToCsNT97b8p0RXmQ9lIOg+\nT1br5agKzpfpQx1nWoSvAi+ELxSJim6QrB/bXievPe1T4eQ9t2zXqfY/+OkX\nJVbOhrkzLbmNovnI3eqq/qZpXcMcySYRy53vVxXBbpE6kUqoffGS1eGszeqb\ntaYqOG5DjywaW5g6vhDpavMGoWYL7S3fw1swlX5rpWDkzmVc6dIDRZfwDi+t\n6yItTGsHXQ6dHwGx07gqE0DwT8ufUD+9go6DM7Oyw9c/+GiwCqdXhMwo14nR\n4GkzWyqF5jErG/mUcN91hFHlWX9fqBTnWuHos5ShrF53di4OUldK4g4TNGiY\n41G1UKlSazcRMPWrKD3ulj1Oe0DfGnC8PWRUzh9onWRclZqu4TAqDjMUt0qw\nPWPJxDSuARRJVOFEzTKvKT6yIvzk7XWhJSsMtzHVdn+ffLfo1fEX+06+Nk8m\nxjJbs82PYU5ZVrnTs0XCkBxR+6fkFg66PcuodBTovVXkWnwor043vAVbsFiu\nGx/A\r\n=Gzpt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"dac6752d479e3be806cd57dcbbc40a442f759b35","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.20","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.20","@storybook/router":"6.0.0-alpha.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.20","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.20","@storybook/core-events":"6.0.0-alpha.20","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.20","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.20","@storybook/addon-actions":"6.0.0-alpha.20","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.20_1582763639197_0.26916419345909737","host":"s3://npm-registry-packages"}},"6.0.0-alpha.21":{"name":"@storybook/ui","version":"6.0.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e6e3e7b925bfb03e1accdf76c90676a1ff8d8c6f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.21.tgz","fileCount":216,"integrity":"sha512-tIiiqqh+LAtKxMVck67BNMaFmu0tTUYPzuOzT5qacptQYDsneG2J5iWViQTHYvTYOmA5q8CZYIX+V3ZeFtRnUA==","signatures":[{"sig":"MEYCIQDw/6YPrQW6mwjnGYtkrq+0OGtc1SyNacAiHmRuaKkHqwIhAIpuEBiRvUDsRPodnxTEwnJZ5c44wr7HqNnLgpu5Z38L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":659479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYMdhCRA9TVsSAnZWagAADSUP/jbCcyEv4GZm++OrDLpO\n3r4JWOBiaXazjP16OhxPzL8hmY/jlyj7o+pJuHB510R8UhfTzXF9k8S3pCEt\n0+Q0IGeJLMOOoduQeMlz2JnvJl+PaUHpfmCe11bE0yaiHAJinfSdDSnGcJKn\ngKWTbUZMTCQufuoh3bmnWBk/srSt6eMSURYsDM4w7gRqQYySort/03ZjKP65\nm3tGZo7I/zJl0f5JlVjG0Wfc4Y6ag6lvW4qMF3JqYTiMCbV/sOBq/92EAHZ2\nuh0N659yd+sD4Y8TaRpj6E36kE4ZWH3PxIkOCrBQQn37i08knGv0OJpJxHPE\njswbLg6hbnOD/eswGAiKhmlfJdUi0oa3vh/4heFxMr3jt1L5o4DF/heXrkY2\nbVOsx9wH8Apyftf0vxawKDMsgW33QDDoX52MVV4ExfiGg8/jwTOcmkKayC9j\nPm6i1FX7hULPb5TC/rZeI9Wp3MvwOkoCuhGvfin1ixHXQ35RULNbpdw4zWYs\nsqLJ/1NieW9nG8ekf//xZi3r3mmrHunfHwaKW/AnSck0hpmJoxO/kQaZTfpi\n/oFTO8d3fm3nUEMtWUsWSlTsDPtzhL1AILp+8VxpRcKgqLSkzh44yT4jXnqQ\nZEaGxXVlxVP2F0rJD8sfuEGuyVqdtGhB6rM+SUv19HgUYZwrq0dPaPffe4Lh\nyJSu\r\n=L406\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"797083630938596178bfccad084d8b16113ba6c2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.21","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.21","@storybook/router":"6.0.0-alpha.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.21","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.21","@storybook/core-events":"6.0.0-alpha.21","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.21","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.21","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.21","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.21_1583400800968_0.1694752576761014","host":"s3://npm-registry-packages"}},"6.0.0-alpha.22":{"name":"@storybook/ui","version":"6.0.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4ba94bd001afe89cec836850d0dddf1b5b1e50ac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.22.tgz","fileCount":216,"integrity":"sha512-Z/2GBJxOnMq67Wz4zTn0gwec4gewD6xfID0yyZ0E+waqSZNXq5JJ0PZmCS3ea9M3xK0Ah+lkJBng2sDxnrESHQ==","signatures":[{"sig":"MEUCIQDbS6GE+BEI9+Ndzx7RGC6KdUWmfQA/VwLmbiNJws7cqAIgENteEMknxBTv7MrmwP26Vw5uUV9NoGK57w214Sp34JQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ3FbCRA9TVsSAnZWagAAbvMQAJYO9v2hlJPoDdwHSKOE\ntembPiyn+wy+u78yqJ2/2HKz3EhB3LSXYOlY1z5YwRZg/qYofiM2HcghBEyD\nrZHspDJogYn8Doxh1o1LpYNSf3cCnsOJWzzkZ0ndGNx8fpSjitBzW+jTDx3C\nbSqiUqKpgSWKdhHeE/ZqYRlhsdNGBIXgT0ZG8tAGK8Jf6GjLyszMKsmqxld5\nH9lQ1EcmD/+J+60TvoOrbbrrt38EtrDXgve70jRkEk8P21GmUgfgqvSN6qgo\nvjB4PVFGGBevTROx9V5u+F48H6rpbc7WcWGkLqGMQvN5tGnvgYr3uAl/l7Q6\nDEj6hbHMQEDYHTpLv+BuT47FO8upwQEYizr8okmBWz7hynPVlA3L4potiY+F\nbi08+2xsLhm/bVFDbY8QfyEO/yIJWpk9IEsJggmKrjEW7+ZeDtZDfVGtvZMS\nZmchAlBPAgvmitPcUrB34wo8sx3TC0zhC/Whhvldw4PZaupLe3iSION4z7cL\nS0UWezRpj5dsmIH2okgBG3pladMAzZgc9n34ZGNqbpXJZjmVAsMcWgbTINOv\nEcIAB0jkChYSXmzA7jf7lmzFThxmxPy4iNzcC1u2JAwQGxy/dT0vD4N2qDh6\ny64W8CHaY0Ommxlwz6OP/IldvxJk9RgVfoYYRY4fDOhemqWV1PbB1fvc3QFH\nCj4q\r\n=0p7G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6cb32b3d989f54f5dfc6647ff61cec4b1c8cbe24","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.22","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.22","@storybook/router":"6.0.0-alpha.22","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.22","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.22","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.22","@storybook/core-events":"6.0.0-alpha.22","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.22","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.22","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.22","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.22_1583837531434_0.7476496149254219","host":"s3://npm-registry-packages"}},"6.0.0-alpha.24":{"name":"@storybook/ui","version":"6.0.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2683a7c44fc4aa6ef0962778a31428fe537489e2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.24.tgz","fileCount":216,"integrity":"sha512-Cm4FbIbUA/POQnpMpxC3xCwIidw0bd6ckML4b7zte5FtpR3YX0rr6k2jBll7N+EZ3tbXUGs2+DhWTm7lKvb4yA==","signatures":[{"sig":"MEUCIQDRh6mijH9KRrVOQM+4fRZIaxQfE75P0KzoYCKCc9IGEgIgCraOXWUVfTwwgJjLdoSTifdnFaI/zef9xbivubKczKA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaKmZCRA9TVsSAnZWagAABeEP/RALLOGofR8WBpQBUxTD\niMNAqHsD0VRuJ5O5DclACBLGkcO5OTlgWYmhBZIe8IFtud2LI5j45q2nDTuF\n1lAEw9pzhil41XDvpZ3pXGiMz6sDLAz1WUOBu7ygL0B6WUbbtOF7Vcb/NPCz\n2Lj9Utk+QCobe6o+OdkJI9ixYU/4YxBah1jJYLSVhjlnYK5vwKsUYaWFqMtx\nMXDpgQimiUYv8qk6ptkTLBDXeLYqaIkF8mECRC+7ohSiqQhMuC7LwweGREdr\nFi0J8p5p5HIvbByQa/9fbenJAJQYPK4CcKRVf/ArIqzqgExBx69Zj2z7ECDE\naG/3U/1krDDiN1rx8DtjuBjIyH3jXc7LnsR8MHl4ddTgPULDScn7/L8mmq3x\nEdeMOT/xqFB6UN+qRfs+gdtonUAGj6EfqJeucSU/0PEBwrz656CrgkJsXWW1\nP6Y3kJVIbrsz8DylD8mKLSVVSd6ux01FtWKOTpFb7oVHKgvFpqfx0y2j7Ytf\nYWkeJ7fi+o1xkjVaRC//mOJTpNG8MsC4BruK3DsvomnKIQsKUWRF2kDxkFmf\nsmNQQLDWMqMzv7AJiyq9MiP0SBdaQdr0Fo1RxuYzVPeDxxdpxWXHEOigg20M\nlZqaEZk8ofb1J7lFo24In6/x5IyCln6U8G6RBcGcTl/4SmdyNIU/++pRDoC6\nLMse\r\n=CGSj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7a68f72411c26928931bb4afa5548012592c62e0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.24","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.24","@storybook/router":"6.0.0-alpha.24","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.24","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.24","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.24","@storybook/core-events":"6.0.0-alpha.24","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.24","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.24","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.24","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.24_1583917465527_0.17421883456689136","host":"s3://npm-registry-packages"}},"6.0.0-alpha.25":{"name":"@storybook/ui","version":"6.0.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9a7790aa0313e46bb88788050d883f330f8595d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.25.tgz","fileCount":216,"integrity":"sha512-QQh1JUZ5awICHZ0AcoYWexzJnkiQCqJ2ppS1bVd4r5B4i1plqmgSDnWcPnCpoXdCLa4Zmy8M5W0prqFnu9ooFQ==","signatures":[{"sig":"MEUCIGqCrSBY4E0JC7qReTgiFl3yzkLNJQk837zlUpMGtvN9AiEAqbL3IKtsGNx6VlRGcrTeUdNsQxvxOwRh2uKAUSAwdoQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaMUaCRA9TVsSAnZWagAAYx8P/0qZUvq3q2MwVDp4LBN4\nWFuCnBX1F5koae6y/GN3eLYOsG9mw69ecPGfrr61HlvG1fOFwWG/bz8yoDQG\nNeedhGgcbBiFc2MaWdIVc3Po063XWc+qk/+ZFg4xOsUJCmg73CJxdGscRkCy\nnY+zYhM9UEMPJApRp3lzS7AO2I5oBAEyu1cnR9O9TCNPLBARDmjZe3Pcv2NE\nysoV2x/W4nkP4HqrYDUPWtr1rphBM/tpP8MvDhX2V6Xhowri+kROEi8QQPqF\nq13COrVL/OS+Z5zXqm/R6gpVuvFueFUwOsY6hwhFp/ZqsLCwd/xjNPMNMaTv\n2BLfnhl+eKGAFFVUZ57IK75M8ni3tmN7dTGUwdZh+zYdQPNobYoh/J/Ez5Hl\nnG87I0izWu/2r3UNmfqEx0DZ/o/w/DuAS6xs3rQHKWbMqQOKx6UZPJP2GAyi\nR4VYi6ey/ZBFCn/P0SY8xpacPecWHkL2sYMjNiTJDHpkuZJY473JIWVFmVTn\nm1led5pB3asExPdkJclXvx/bFxjnsbJh97RsgyjPbQb0AgFUgcX8ZmL1D92R\ncFLwdMuSza3KzY0z8IXroSDz/IttTLUQ/wQcOGDX72DU6hWMbDJDjSgsxM4i\nuc0/l4ghyb21IH65IslfiZdKvngaZpGxNam0Q/EFu5lGLcUPfIaA9VYSYQ6i\nhxWK\r\n=3m+D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cbe0da787a5807306b58cc259005642aca131471","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.25","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.25","@storybook/router":"6.0.0-alpha.25","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.25","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.25","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.25","@storybook/core-events":"6.0.0-alpha.25","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.25","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.25","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.25","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.25_1583924505890_0.43601389051776795","host":"s3://npm-registry-packages"}},"6.0.0-alpha.26":{"name":"@storybook/ui","version":"6.0.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"543649894c0df9d358fc49a9c50650b9b3cada70","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.26.tgz","fileCount":216,"integrity":"sha512-ewmHRkezUWkrx3HoV27w4n8wUfj/9GfxpbiccSmxKZyrWUcbtH8f/d5zdk8VKFOYSUUrCcZ1k4vvgkRn12l+TQ==","signatures":[{"sig":"MEQCID2Hde1gVMKX1pyVYbkPH8HJd7SCVO52yzkAdQsTZrxrAiAk/3yIUCycZ+4Np+TUs8U6fx28gV0QHXkfN80ffDV1JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeajKfCRA9TVsSAnZWagAAt3cP/jpsDBSjQVJGuYVhC9Q7\nDLqnBQqYwLnJCrVio6EUYnQ4bcOGk6U/6ZD5mTSlEFNdZ54pOsYHIeNxiY8e\nR/VjBBfrvH/LczSxF5q12dz3sLKfGjDd7NW45QLETDK9gt/iIL+o1vNGXSZE\nSvmQB7DzIIUz2UuFzxxE0N7p6PoLl5KWJQgSoz+n9LHbt++D4FJ2yzCZArbv\nmvBZ/jPdLye0b1Cl009bruMxDkENPW73bVIOLGnlIS6n6GDgIquVLgsOCxaE\n3OdZu4YXvr4oyJMfUMNUa3cBh2s3446bBqfruUL1E/F/ROr2Tsqu/hI5Tufe\nXtbuW7/gYPgew5AgvzX+wJiwb1OWfFYQlV5BnDpGE+AG2uFlTWvatjvB3Hv4\ndrw1Qz7WbxovPNcOyg64AM2tK9bk4k7Ti692zfSHHDcpgo+B6GDYckcMZrnJ\nJh2oFKh6Dmlkjr/mAbcs5qsCKWKy4AQ6g98p+FTknFaGJHDf1Sqi9ivpgjJf\ngulpSZ8BFULG6kOOJ+MqtOf8N/v+AATzGOfRevw/z6IfTYUJDBFlMPhMXoCH\n07Peoyvy/jrd04ltVFoc1K6Xab2bN6mxoKk7n/TEBpUq7CTaCOtSu5Ws+LmA\n71aZYXSkzPRyCPR89gdBPISHksyQBIUcrf7KqmTDC1VtHCjEDco/bTHomUrt\ngHH5\r\n=Ym5c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"870ff062f31a5140b82148dd453326f7ba9f76ad","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.26","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.26","@storybook/router":"6.0.0-alpha.26","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.26","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.26","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.26","@storybook/core-events":"6.0.0-alpha.26","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.26","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.26","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.26","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.26_1584018078737_0.505117727012397","host":"s3://npm-registry-packages"}},"6.0.0-alpha.27":{"name":"@storybook/ui","version":"6.0.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"79b6aaf2801bc6d191f360be7eb76928f4a48c91","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.27.tgz","fileCount":216,"integrity":"sha512-sOVq2xAxUMhNiJuAkQExW8QQUt/hkFo5TMMQYEsG9PtgZyPDRo2xbanNTUgXkNF4Os6anjMc7RX4CRrmNki4wg==","signatures":[{"sig":"MEUCICeUYSFDPCoZEn27S9aimGZVCzz3t9x/wUiDp8RTXDOmAiEAwW5O53PtHGsZkN//YrBZ1BIkkBSSj4OoEaU8qss6xdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea36aCRA9TVsSAnZWagAADOUP/i80Yh32YfFrHkccYS6Z\nPaJd2D6u992b0Ql+eD/lo7OQbvz/Fa8AycupbzHiCjoSo7ynCOYAQh9H1GBf\njeMsU2Dpl49vQJD742y8ZOPZi4vvFJHwAB3o0NAoO6UCiLl8I2jVnpU5EH+W\njRXAO2qRRRbBikloIYkpkE2NBS5jOkNlLIyBhOG2c4K8eFtRPPLV/kRWwCsl\n7rSecKHZOKhC7W91hl2AsB/qlf20vaUF2VUaFvGI1mhd6Gh24c9lsQ3bowWN\nQLpyW1Hgr4Y5sWIwBueI73o1a3k7KqINf+qo3W24qxHxnpATKSDfgyzzZML+\nyqjjItv0VfYMleMiDmm6PBYLT2MWRc7NknigN7+tOM94O8U2o/TjlpuNiLm8\nL9niaDPmEn+weDDfjqW4lW6gusxkWNwQFMKytCeQh4Y2TXMXnl5Ylbg0IOxx\nJeAaCyP5tqIkwWp1trF8UGHucM1JSA18jG1tH4hsDGp5uYyDqrmxen0t63yp\nLqne6FMzoqjnnn0RXNFINm4WC0EyqP7bkXK1PFYo9zO02vWm7NTYYG/YOpBj\nf6RL8F3UBt6gPapL3fFPjcOQv7VTo7BoXmW5TSa3b17QXEMdP7+T56eNe80D\nOLhYJ3jTOIAolCowBJjQcDyCXoyay8N0yxgMQ4XstmFVn+9N/5zpN8li5xDs\nw87V\r\n=0DkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3d1d35534e05ba6623bc18b0b959e5ea38162952","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.27","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.27","@storybook/router":"6.0.0-alpha.27","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.27","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.27","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.27","@storybook/core-events":"6.0.0-alpha.27","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.27"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.27","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.27","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.27","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.27_1584103065801_0.7526181692165042","host":"s3://npm-registry-packages"}},"5.3.15":{"name":"@storybook/ui","version":"5.3.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"12d6cce1a08fe876d4362fdaf1638a3e152e5666","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.15.tgz","fileCount":104,"integrity":"sha512-BxMCrd2m4n0FXpB7OrUCkI1lX+4IqT5REmkbzw67FLAblxGuJtGjUMADXE/kqIxK0aLmr05/8I543KzEqteN6Q==","signatures":[{"sig":"MEUCIFCLn0fz9kzVre53S3inoJ7WHZocLVyr9k5l7iTtofG4AiEA9L5zOrKPGTL/rNTZSPyPks+xm/P401cVkFgP99DmZ+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebFHCCRA9TVsSAnZWagAAY6QP+wUztqw5BcLD386bhUln\ntPyCxrjtNoq/7VqP9ZFAfd/Xm/QuYnZG1yuFS+cw834Ixmp1CnlYxl/EoemI\nTmz6Tky7OT+HXgmQO71+oOsVr860X3pjwEiX1/xoaiYoGkg2kHdDJbU94Rs+\n+MfOrL7KKjmtXNF8xWAgmiGgGF8oagEC2288VeS+BPL8K1M53wD8OJ5LZBN9\nDBH62FmO981doX9kCKqgCHelLn4LuEBf4oLqFo80Zik69OEuIeZiVO3mUIaj\nj/x2R07i2cPuyTrO6/XHUoYLoPEr4fZNe2373QD47atgPcEZtJTvVRnvTQBc\nJfD2RzKgXO+kKMoa+ePQHpFkvrCPgIrf7kVK6F2QgGr2L3qnITmzS1C3O2e/\nJoxBEsMebU1CejAMcvSGWiXeSurR4sFho3kqzFIBn0YyErsWr7F+dXSzbxxQ\nyiany/hUi6kgl5YvRAAaOP8+ueuyDfnHTL41zY5OlBscyOQ1nEfIJ6m2FgsU\nU61WqOhD5VviK2zLnEdnICVANqWMyDF40ICnHjKnN1L9nrGUn/LRBazXUMbx\ntmUbdoUGfc2QYd2l7i0XvmA+Z0sMJy/XXFBZd/AgUBYYsCPuNm58n6A4kapX\nV5t/hdJgW3zyRbbMv2aZQ8rodJ75EdqDOEHGxsT1nBjPxwnSqn/MnH3dpfrW\n+KHy\r\n=Aosm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"db0e79bc999ab68611dc130d0f509ecd88e590c2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.15","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.15","@storybook/router":"5.3.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.15","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.15","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.15","@storybook/core-events":"5.3.15","@storybook/client-logger":"5.3.15"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.15","@storybook/addon-actions":"5.3.15","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.15_1584157121867_0.8982706244246839","host":"s3://npm-registry-packages"}},"5.3.17":{"name":"@storybook/ui","version":"5.3.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2d47617896a2d928fb79dc8a0e709cee9b57cc50","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.17.tgz","fileCount":104,"integrity":"sha512-5S9r70QbtNKu8loa5pfO5lLX9coF/ZqesEKcanfvuSwqCSg/Z51UwFCuO6eNhVlpXzyZXi5d8qKbZlbf+uvDAA==","signatures":[{"sig":"MEUCIECWdTfUahJEw7RwUsKFpF0Xf3vL2xLH+XX/ucCHgYFiAiEAzWPZYNk9yHfQgJxnJ2ikIXU57NRfkd5g4rvjlKjD02k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebIw9CRA9TVsSAnZWagAAJtIQAIl+2YmGuau3O2HK6Rd/\nRIQ4MAq1LZuxbVGeokHIk1wOJODCEKVSvqX5xaxoFcOtYxadc7E2aIqlpXt+\nO6rkNSN/zOol4xeF8JA+WaYIp4hFbMYipvHeUUlJVYti0muvEk5XVFRADkjP\nLZXiZ9I/On2Qe7Q35mV8kUPAHe/IzOJkwuggmZE5RTguxl90BRrgaM7Ln+yy\nGGXqwIBYIjSH71tGWBj8txvTzvietl3lV2X3v2OW/NPDwDHMTBEAojZccd9h\n4922AJwhlsEU3uJb3phmOz2flapt0IFaxf0fQ82Jgf9SkmWGpp2EBupGwyte\nMPttwsV4Z4ori95MChgg2a7cGd5Sk+a10hOkUivJmr3z/Q4zXuXT5uebmK8F\nAgVYTILxgVP0JoSoQVhq2ttQ53vP89f3Kvnw7h/zluixP+JsbqmsICJaS4go\nSOlkzvy0gaGGmIS7LofvltP7fDNQ00AhoNQj5TCu5noKnmO/XoJJLibIZnz9\nyQf90dp4vpE388alo6dYhv265MiyscsiR08FsT7foGU9sjEVu9ckKWqLV+gh\nQc9/sEBdzHVDU2g1te0kXuESuEdOMAGJ1o1dJpP/fZMcbuepypF7p2KuoVvb\n2RZNony6eqTNRouqdagG9fVjEdnlcHko81ji7X4sY4sCpbYubpW/8e1jAkz2\nKz4h\r\n=wfwr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"44e01ff253bb6c7de588d49659392f7bbdf4ad95","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.16.3+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.16.3","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.17","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.17","@storybook/router":"5.3.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.17","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.17","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.17","@storybook/core-events":"5.3.17","@storybook/client-logger":"5.3.17"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.17","@storybook/addon-actions":"5.3.17","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.17_1584172092900_0.7151338680664914","host":"s3://npm-registry-packages"}},"6.0.0-alpha.28":{"name":"@storybook/ui","version":"6.0.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5646404aa7f8a891ac7bda6fea6a750aef646e6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.28.tgz","fileCount":216,"integrity":"sha512-IRRBFrOe3U4GG80RMzda0BEKEzD8WKnHZ7YRw5N1KgABTFBpqTMkkAuicbfCW0bWMW70xA5cx/KhChQjyFsJ6Q==","signatures":[{"sig":"MEYCIQCy6coY1tI/Bglffa+ZpSO62U40LxRRha6ccxNb5V8rLwIhAIHCRoZ+0YuGv7Tyxs5tv+qHY2UfmqY9IiwuZptukrAg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeFD8CRA9TVsSAnZWagAAHyAP/AsV1/Zynl1uayWG3AOJ\n0CYxh51BM2MP+VaquFtg8c2YiAcAtW7+f7wxdV9b6jJcW5+xaorVqjZnWg7j\nfIFTuYfj8b58/ARK2icx46VmSy4488xwAO5IFALHumYRi3Mjc62jpvEnFGru\n1fii/53atOoz4a51bqWEGMOR6fQjxlvIsPPK9Nb5do7C3uqPO+ZJQU+i77Wq\n/bFtojNVk0GBjuzqkDDXBZrbAx0AZ03GeIqIXLjRdMwXTDxnay1vDZX+qW3C\nRZW+oWfaA8HA5jb83f4y1W0NbXCGMjYx/HMNsYG0FYLBBaPjiup1thdQ7Xrk\nDoQbhRnQY6rp9qCBqutyoBhNPn6FkBhoYWS8OTvU+7A567I3+SxQRumA9IlC\nj8pxRvObWHBnlFkli8l3OIdCNIqAtzytcIZc7U4vDO4sPKYcS0WrkEJ5yCMR\nEW4alkpG/zvYi42XLS3x81H1sPoQnMTIQ46Gd03eARCsxs02IJjQ6c9TUJZ2\n64T8Zq60+KKY/FxxtGCekNFhBAiOhOQc5Q+2SlQ80UF0LSUX7/kKRmd7/daj\npvoPrQt04e2rTuF1pvRoox3jyONR/srSSA3OVcFgrDlCjZ0llyT+0Pp2Bl3Q\n60nSePgdRognuYiVzNZBIPW7y+2YHzi8b1aTHIYDVMHejZuI9pBTscqbmvMJ\n5C3n\r\n=pA6m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"482764665bc29242bfd432bb5988d99e3c841277","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.28","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.28","@storybook/router":"6.0.0-alpha.28","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.28","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.28","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.28","@storybook/core-events":"6.0.0-alpha.28","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.28","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.28","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.28","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.28_1584943355883_0.11716233358373729","host":"s3://npm-registry-packages"}},"6.0.0-alpha.29":{"name":"@storybook/ui","version":"6.0.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c283cde6463afd6b6168113e008193c73e15de04","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.29.tgz","fileCount":230,"integrity":"sha512-dffKPLpmynIW5fDvOQmy9esEIunUZomNcEekRS5otL90hOJbZeBJHbII4sbeoYStP6g4zHGLYQWjqWAVbjHFAw==","signatures":[{"sig":"MEQCIB4IDpu/eG6LChjiHoejjFfQ5q5wxMM+LU24CaQkZR54AiB9mW/ajfuT2eXH5T3bCt27eOjREsmqH+cLIgnxfexfOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":757320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefBeXCRA9TVsSAnZWagAA0fwP/3cCWhHAVvTiMI7b7rWB\ntujTh9fYxWuOgIQLeVvyi5UyHi9H/F5rVEoZcKaeeKbp+J6NwPuBxLH2st+w\nsX7+R2ppyX+briWn9UhtIMqIIm9fvFYij6CtfiPvWj9BHdb2gmAac0+J451E\n/C/kkW7P2ZiQNMriPBrkSf5VAtKo34xWxujZFdgufg6UJPR+eIv6nPBXsNM8\nDVqS0hkK/Gd4Wx3zbzfPPcF4EVY4YoB2maqMFGqkMoXlMdbgpU9Vrt9o6aPU\nme2NXPxCJub5SRKYGk6ztls0e4ys6gZSzHoQ4NLgSAjaemRvHBNCc7i0U2m2\nuZHzUX+FEdnQZnAb/cq+T4fa9yvNMxgtUdNy3jb8LYf3Vt7nHOqAndPItrAH\nN/5vxG+vxVrF2E5pK9FPdzyWSZOqm7tUYdfZSuHZZPiPJVJwoMLUMQ+Cbwa7\n2LwICMt3B54VXpxP4pvShDiyXDsAWb1PDv0WGuq6/Z3+RTsZyMeF2hjObgzh\ndDfikPY4pSOb+ijyBZrYpfu780AWQtQZJDI1l8mi2y/BWu++WLkOkhWdaDNX\n005ZygD7jWZ2gRFVEjNO09BS+WzKf5mfBHjQMtWT7qZCQOAM85GHZpL7KwzR\nVyTXQ9yB6cwdNQDys6qb1pS+Dy8EwBRlNwgE2nedmsIYQiOk6PHKZBKmwBE4\nfjUF\r\n=Bmbj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"205c8975797cb36956f537a2a00e3d2b13f73150","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.29","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.29","@storybook/router":"6.0.0-alpha.29","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.29","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.29","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.29","@storybook/core-events":"6.0.0-alpha.29","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.29","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.29","@testing-library/react":"^9.2.0","@storybook/addon-actions":"6.0.0-alpha.29","corejs-upgrade-webpack-plugin":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.29_1585190806932_0.505777003000565","host":"s3://npm-registry-packages"}},"6.0.0-alpha.30":{"name":"@storybook/ui","version":"6.0.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d1644c70fbd67dfcc48232f26c4e2105ed60bc3d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.30.tgz","fileCount":230,"integrity":"sha512-Di/8TIPZsrHtwWaCYQK+wjnSCxQtOvngkt1+FIBRFHbVhAJk6L01ipry2OoNU0gTOtkQd4tZ2qFflYTht1B+Yg==","signatures":[{"sig":"MEUCIQC6fPC+ixpsDRJYsvWpmsf3MXCvhljg4U7WSoG5udOspwIgJm33jwKRbijVwsXED/Rf9hDf5h1B65Y/EssNdSE+MY4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegyY7CRA9TVsSAnZWagAAsVwP/ifbq6dF4x2dt9xkS94s\nFDy3w7rWCyl5R46mqEO2JoHsFC1Q3iDiYLFsj0HMh9kDRlcBHAr3xnGrR/0b\nWvzPi4nVMm4FKpJyXTEOP2Qx/DeZHoi7PDCWXeyqSupr7tSdPY38ns9CYCSu\nxTKxDBx5aTxfCjJ4Sgaw4F1NvvBc6qRKnvfGL/pVw1267gR6f/dSWN7Pouzp\n5zB9A33m9+5ceJg0PY5GOruUpl6f8SwD1KrFluLBnBBPvWQVXXbScWQpv9pz\nSz5fid5ojLQFH1j09oZGRZRI8uEEseWvaatXhY09Ymh0BqiPWgs4J9wpUOOq\nAPAUZGDR8J+a6Djq1R5rWDPqiXNQU7l+K6h8T/ACWq9BhGhZ2953rmhdUcqp\nbKROvTX/7x+ZXvl60z53Sj+IQiIl6rYHIuyIWcc1hyz2euVlxeoTB7++ilRz\nPd7gBmEnWCg6BMWDVBdfnelbMFICHztgK0uwCz3hEFIP40qq4Okx19GPfAhR\n+biVf2h+44ybyrr7GDqtEZWLdy3Bc3ZQjLtcCD2IVFU/Io0UHYCpVZ2zLxuf\nO9gVNa0kHUlGz1ZjFxZKn/PW6i7keh9Ru2vuG7qUg5zRFWwkdhjffti0Z/dZ\nLQlXCBPtL81A+FjGM50zfr4MGEW6q4Dwcgq2Cd0Qx8RH0D/drPSAGPcPuXHg\n7ZFS\r\n=QP6K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"76cf7e263d9620b31f8d8293fa6c85bf015181a4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^5.0.10-beta","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.30","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.30","@storybook/router":"6.0.0-alpha.30","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.30","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.30","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.30","@storybook/core-events":"6.0.0-alpha.30","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.30","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.30","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.30","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.30_1585653307094_0.9874494455489753","host":"s3://npm-registry-packages"}},"5.3.18":{"name":"@storybook/ui","version":"5.3.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c66f6d94a3c50bb706f4d5b1d5592439110f16f0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.18.tgz","fileCount":104,"integrity":"sha512-xyXK53fNe9lkGPmXf3Nk+n0gz9gOgXI+fDxetyDLpX79k3DIN/jCKEnv45vXof7OQ45mTmyBvUNTKrNLqKTt5Q==","signatures":[{"sig":"MEUCIQDa621qdx/llIIfunAoVzVa0AkEdnHvuUXdoouazIiyPQIgQMlliyJ5y1WWNImOp+U9BZ5c0XhelbOC2tmkc5Dez38=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg0hWCRA9TVsSAnZWagAAZTkP/1D7KnE6wN2I6QiDgKaJ\nkcQeggzueNOfYtqStX6vmWbuIeHqMlQe17R+/Xe/jVcckIlbsm+tA+npP34o\nX96WvmwQaSM7H+O6K0bMdamaXnivsnolA5ZE2bkFloG9BBmjwdduehsznv9y\nQ22FJJ9IGOfDLccS+s6xQVqywDNj9VPRfUOylAhbU7rLyC7u0/M5k/MPeAzR\nESwDg21wnxMiciBCdtBkTB0TBLR3dyopKzI1/gv8C8kzpVfPvfPYMpZcx4YA\ncR57XljpOJ27xtMJiHl2nt1i/t9E9PA87dg4NwaeBWPhC3PN5Xa73PE9ALyi\nfwN492wP++eQiMU+s9UDc4a6i9q7S7vflsFrBUzvQ40oOLplolFCQFjUAZuI\nZqRMdk64VZsW3a6JVWjPE4/iYjt4Rsp/DIksFEJniMQaCo6XiQGb8CA5NplQ\nF0yCKVPV8QU/hqCFnfJHPjjOVxGxWKBLAH8QWzWY6zqHlZIkSeYEViF+y7n1\nsZWsr+vaqG3GFqxXj6hFQ3tjUeU6umz3/ZA/9Dcjh+DyhX/GAtefoHM1nJS8\n/otTOTSknh0w62w3L3kUa0B/dsqN+r6AUwg9GK1Jv7SkB/vSmJPwxL5iGZ59\noqaF15ORTLDCb92bBQ7DroGRySuVK90LhlMeATSl21jfsuf6aJwwuRfEMpRU\nIFY9\r\n=cvyx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ff445da08f82a7b0931647754394b4de0a2a34f9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.18","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"5.3.18","@storybook/router":"5.3.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.18","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.18","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.18","@storybook/core-events":"5.3.18","@storybook/client-logger":"5.3.18"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.18","@storybook/addon-actions":"5.3.18","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.18_1585662038068_0.6105040701386772","host":"s3://npm-registry-packages"}},"6.0.0-alpha.31":{"name":"@storybook/ui","version":"6.0.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"25c0f695c3c04b9d31f9eca8c7c8a0c6d70b5573","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.31.tgz","fileCount":230,"integrity":"sha512-rUv0cTsn2+PsXgNYow4Lg8GCVL7C4WAKrl5OIJjwxoYtGpbBElcEx+frcK8MHGNwJZmaeVC/0YxrYjxc4FMC5g==","signatures":[{"sig":"MEYCIQCw6s/s7ONyXRuf9OEuYV65jM4x7BZgALa9NqoO8O0u2QIhAO8HISH8fvEFV8qGFFGGRX452d+zucWKUt1hCdcIhZ1z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejFVjCRA9TVsSAnZWagAAeo4P/1dE6/2DdlTrYv5saauU\n9R6qeDwFYOzR8WpEG/KsyRl0ZJlX5SV/F6Wvu1wB1z8l9OTnlHikXTYcjNU2\n0gK/7DyTk0OB5ZoV6gs97xK0jvqDz3XytsMtSczogQqb/wgdgRACfjmItiv1\nl1FRDH8lFsThvdlf+s+Pm7JirMdPonYCLcTrO5CD0OkdaN8l8Bi+k55IUIbK\nHYOEud7mUPZwBeab6qBAMnewueK/4fpJAggpivGbAl26ttNXR81HfG0PD0iO\njP7V8zNydBvOdSQTlDc+9SasbPJmMxyE3qpJBFe2lqzMfVTSI0P50kPq1tEq\n/T0UC5kI/QHERQ1SiCni74mwjcC1PK17xIUAZEJxCL4vqkLA8MKKsxEMj6Pl\nithMT0HrKQ5bsRGTPuYAoDlIiBALHIgkxqn3Fr96wDYIw0b3lDMzQTWfBjGY\niNvm6NRE2Y2HcbErH5BcjAsF9bwdRs5oM6HzG31hvjquMvsYGuo8gfs4Kf2I\npS0v9mQ14gh6GYKJ8jJCIcDEohEoJk0BG7ZSNx+aROmVggNfVn18/orcr22J\nFL0JS6KAFOQN+ak5aRa9m4lJRKei8oYm15YkFf/F9W89WbEY5M7auFKzMpIC\nYqM56/K1UACfThLLTtwscIH+m2MRiw5hEwvzXHdutrsWWDnoSbdy+y+2LbQP\nQ4bw\r\n=DzJF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ff99e99f39e58efdad406aa6689cd5ed5175ba37","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.31","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.31","@storybook/router":"6.0.0-alpha.31","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.31","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.31","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.31","@storybook/core-events":"6.0.0-alpha.31","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.31","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.31","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.31","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.31_1586255203512_0.1573249522696749","host":"s3://npm-registry-packages"}},"6.0.0-alpha.32":{"name":"@storybook/ui","version":"6.0.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"98c51f0e25d073f113ffd6e8f608c8ce72864206","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.32.tgz","fileCount":230,"integrity":"sha512-B8DJtSWyi5Uea3Myt9BG0ED3QctSOUbt7h89QzySsZRdGbDMFAFl850SRTiLFXNgJZ0ToufI9be+SRhA4vLXEQ==","signatures":[{"sig":"MEUCIQDfRG19QHv4evzeadw9CG9eDaUlRcjCcdpJHSDTGQ4JMwIgHJPsoEiQ3Ge6+hKr1UDGebHloREuNjuhA4QEMcH2MTA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekXySCRA9TVsSAnZWagAANe0QAI48QEv5v7gPr9XlgG9J\nbL7eLhBZiD2luepBI0kpaGxX6bBCXolcDoyi8OSOyrf87wdsmwlGnaOLDoGm\natvdjyIau3U6YxKrkgQhqBN/GEZolbK2YEw/NmtdIzbBL1+e9WSStk5nyJqY\npYYTcX2If2k4BQYFWuGCjzq2eLjexJm0W6ufbgplHA+biI9c1ow9fgmtGleo\nW6msdTT1ZAUwDtC4rbL+p17iUM1SrLKipaewrAV6GY8H5KfDFp7reto4rqVJ\nlT9tMt6OBHUZzGkiI/ORA2Xz+mgK3kV51Eo6l00AwNQtoiAMV+FwBvw039u7\nAMyPVy4YF14htMU5O2FFzF4r/97KmQe7F0DLDOeDvhYXqRM82qt7MMspv0VF\n3XckWEJRfKQZtvMMSwTYoer/bOrf/nJBGKec4zuLj3+fixeq2EwGAzkrg1Em\ngIbL/NCJJdJ9nDvLjTEkLpVWWDAQjnOe8wrOq42GnUljJ6NZ80LJGaf2nexw\nx9J29A6XkRGv2TXt/QVFC26j2QWo229SCCQhfpx+ftEpAfsAVTwjUTGw1eZt\no9S6OQR+wmbC4ASZMS6/KT3T3R1hdSIiJite6LC2t0brDCCnukcH6VIBvLlr\nJw9E6gC63GewaTJ8/sp+bh3cwTZo07tObLb/WAIjjD+b2hut68xyvo485yKc\nBc+h\r\n=d+US\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e517a6322a5945e02adfe0deb1ec99c25edee6a2","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.32","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.32","@storybook/router":"6.0.0-alpha.32","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.32","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.32","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.32","@storybook/core-events":"6.0.0-alpha.32","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.32"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.32","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.32","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.32","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.32_1586592914213_0.3155651861729025","host":"s3://npm-registry-packages"}},"6.0.0-alpha.33":{"name":"@storybook/ui","version":"6.0.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2c1bc52a1e1cb0638cdce4d8518d5578c3b6fd4f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.33.tgz","fileCount":230,"integrity":"sha512-CNZ6f8tUS2IiyopCUpG5V+rLVSEhealGazZ1/L4/8+q1m2CJ75IogCXKzLY8MgX6X3LxKzeb5wRbvN4Igk62lw==","signatures":[{"sig":"MEYCIQC3hQofxq8mIjRc3UDeZZgz2FF+7VHnGX7UtZsiahPRWwIhALnwgOhS+Ry8iPmY9DZdHiK4x+tg2Z3R1ledVbHAyOHj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelPzDCRA9TVsSAnZWagAAEoYP/3cpjTwKi1jbq96W2tO4\nqD8HGxSbvwz7ALkhS9veHcgN1FLYM23ZY41TADw22ePirVe5qoZn+MsRmzVM\nhY9Yk15XV1HCN59ej0u8gTXDQTXd+0ho1VXT/XRuQrXDtlta4S2ZPebs3XqN\nfUtOtqTI+xpJFSRv+0tn4d4VZeEHXDwHfICB+3Z6keURvtB6J+9QwucxqaQN\n3B3UQrO2ABsoxshORTkuIY9NtHvnF7zXNOBYQxMVjV7OwwX2WGVtJ/1wCdX5\nFEpLW4Isq4P+cIQ+HKivvIMWngh4xlDyIqfyQubTDC8X2XL8p5nDLQCI/DtQ\neOIGQBWJjkyhKsQBIdD6uXQGl1MeKpasKZA6hOJZbEtk9aHBIfSLIpdJaMXe\n+hKV8mSgyno6Fl6a8rIrsLHv4uGrKcPq6Xy3cL3bnLY5y4BAYmtyV2z73+uH\nwh0Zi8HrtALGKBFXim+3YJrblhbHdrItFBEWSiQ4ng8u9szkk019rUdyic/a\nV+uzxvd1YMiVlIw3zBtF7DmgHDHxAlmYevNtw0MKnR0VKcIkc1cjcd7uST4i\nx4/6mXk0rpTIJl6JtiB43csYaFm1rCFCMjcBe6usDoQPQGqJwRng4r0S0Q+b\n79G5tbeDrDDTwLmblqnH59NdRiOYFfLNefyK0NKw7w7+SPmM70JHV18eT8Kf\nILA+\r\n=SZ1n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5b90cb7bf2e63b26b746c9194eb9128bd815b8e5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.33","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.33","@storybook/router":"6.0.0-alpha.33","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.33","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.33","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.33","@storybook/core-events":"6.0.0-alpha.33","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.33","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.33","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.33","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.33_1586822339412_0.5601558976265226","host":"s3://npm-registry-packages"}},"6.0.0-alpha.34":{"name":"@storybook/ui","version":"6.0.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.34","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cd1b8c3090096e523e75dede51a47c7d2b7bd233","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.34.tgz","fileCount":230,"integrity":"sha512-Ot8HIY4qwoD+HHhDZMugadnAlfweLtvbIZf2MLLRc3orJF8Ki3rhQVC66gbblozpSzZvOhz18OegvNRkA6m7RA==","signatures":[{"sig":"MEYCIQDitP87GRbkb4YUPVuDucA0Smzp8s7NpuIA+lLNAXjSvQIhALR8lfkqM5OcBmFhmZa3xaAf2jw5wOrACRisHutJb/S0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJels6RCRA9TVsSAnZWagAAA5kP/j6k7+fz8v3C8xBmM9jw\naTYizQQj6zHjk2/TgvP8u1MvrNPBxkCfH7DFQpazOtnLXFoSfF34GWgXww07\nk2gEzoRHM2ZVv/uB1JjdBK988/hkp7KZTjaYQl6xMHnQo05Qu8Gi+hlQHlwT\njhfksrVMEksRp7sI+Xg/b8dVV21/R+wjwK4PqSP2II0J6bj6Vak9+AVHoPFI\nW/x31qGmXx+L6iGfvPQ6THeVZAc97fSvuG/yBH4MRuJpCyg/D8NozTLV5PEz\nvOWgaZHXCLjNWoCmbI5J8MINvOm52hhp5Y5wabNzEO/3UAB0Ux/AVfkRofcv\nK+31UHBNMEm0pGT9U2wQVgs0IBvwOJgDH5OriS2JRXv1ZJUzuB7h7DiUqCPk\noHTVjquIx9dxycQpcx6IOUIPzXx7wa9WS1o6WWLf+Z4ZZ/zVnghaGa0kSl2/\nCXy4kIrf2H0PDsn9pzSDOc53QQ9JRJksT2ePtEwopmiC6aWrzxyPYWYavmle\njWXHfplSOpkPE/811wMJiUUQNBwfGH2ZfPTQcv8nQDi7aBoEzVJYc+cN8IGo\nBEfl3fuK4SuTfamejq6o8FedDtHRn8iCg2NCEsqzGzh+lZa+qu0sLT9Dn7qK\nEk1aghrLB0OXSjLo2V/vyL5FeYfvnm1gnfPjOnBDuyYGf/NUIy9dJlgZxwby\nYYnW\r\n=cCas\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c4da5401d2fe5153472779673cfc2d6ad7b57f1a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.34","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.34","@storybook/router":"6.0.0-alpha.34","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.34","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.34","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.34","@storybook/core-events":"6.0.0-alpha.34","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.34","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.34","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.34","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.34_1586941584589_0.49856737760736136","host":"s3://npm-registry-packages"}},"6.0.0-alpha.35":{"name":"@storybook/ui","version":"6.0.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.35","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1eb5d22f6bc95609d15b2a7b969f157c3a08c673","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.35.tgz","fileCount":230,"integrity":"sha512-77tBL4JODpZ4y+a2bz7L6+0R9FBTsIG0BbvI/p30UVdfv0GDUHdJVEw2QkmzUPhnCECJFfr2VNfETMvg+OgBsA==","signatures":[{"sig":"MEQCIAUGKjeTTkV6SX5kuI5ug1eBvz1HzNBSS898DOmfKvCwAiAOk8JEg5MGDh6427IQmfpPRiRctTUvNhoStrLul8UR5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelzMACRA9TVsSAnZWagAA4AYP/2pHod967Z9KVEhfpI3j\n1pMqUTiSq0LNlbTKjYBzviSp0yeO/bopmfzbjCE8n8QCKVGvKKKCc0CGFU+u\nlgNKW21J2dkrblIQB308rsYIE1Wt4uuLUU2bxa2GVA80WvUYDNZ+cwiY31hp\nbLSl1AYS+zuFpuwBLSd1gaOKB4ZYSxMJlppVGCUQPQunJey3vUEtO0uRKUYZ\nF1MIhbPsAy7dHdiF5Tv17yheWYf122XqwcqeeqXMWtvAHQcuOn5nkpoP8f+I\nLcQhTmimdcbi6LeCFCR4QUoc8gLsKlRxNatcQdz0id1PxT+jNzHUxsaNOfcC\nUj/Er+TDuH9ygyt8AcVU+MXmsfBpbSQOnAvCFvGE4V3FXX7wgzmCKMK8xC2n\nUpAo3DoDfS6Gz4Yi0m1Tu5bFaFarWLtAxq9DwtHLGVvAC9W5YpifNQ03Spr3\nuJ7QoaNvXNPnSEwMQKZ76fmo/FaXHGzfTCvpN0VUEPcL8dynL5FoCG7ZMIR0\nsoY8lw5neVFIws+FX7v8/4NMQz5We9Pp0zZ0V/UEJUn4jO8Ay7ruSHsIV5MM\nXRa/H5RU/hWfZKsyVF4mSvfYPYHuyZD6vmhofqxWUk2vYqAAcgpc23KH/7a1\noeOoyni4vIHlRZVsLxFPErN1ArKVOJIMoxuWtUxSGZf9TofeQAU3cKJrm72P\nDjpS\r\n=U6bC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"86f8c330232a780330ce850eb7d08138b6f4eb4b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.35","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.35","@storybook/router":"6.0.0-alpha.35","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.35","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.35","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.35","@storybook/core-events":"6.0.0-alpha.35","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.35","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.35","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.35","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.35_1586967296288_0.10028747403720795","host":"s3://npm-registry-packages"}},"6.0.0-alpha.36":{"name":"@storybook/ui","version":"6.0.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6c801f8251d506acd48e844a825a310316a90228","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.36.tgz","fileCount":230,"integrity":"sha512-a0+eNFjCvWoxFj97nV5DHvBo/1XCKDe4j8ALRuqVcCgiCgE7EokfX1LAq7gyJ8p62kh8Qr7j0fDytr3/A5m94Q==","signatures":[{"sig":"MEUCIHdMSby6Cou7OqyoIN65B3tLDjzGhkLtjQOSI0bFUBIOAiEApKhvutOJUa8QrYieFV6/BGQjxHtBeQPYwJg3lmgcp2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel6kgCRA9TVsSAnZWagAA12EP/1WHJqzXw7FEuwgdT7/D\nz+4EO4JJW6QmU+Q2uUIRGmuyJ/iry5vUeJm2beNDqM2ydh4H79pHVDeOjebB\nvriSuIXjh/+gUyDRxR4gfBhYU6LptOn0q+4BC73ZCEX5Gbvw816lCwhm2jGS\nL4HzA0qnyMziBLRCiCxEabLS/c/Qa4z5dtOgroK8MtgGp2aS4IcQcU44qsDQ\nIuyQX8i2PrvETOk5/0OpqUT7+uzX4PgBkker16kWO0+7hXr/D6cxadYLshim\nOM3OVptGkvFE7Wp+zHx4R8JbPYh1lSWEcQHPzRjDE7OYPN0QZQzLTdmi/F4r\n7TL20sMzi7SSuBdIcWCaw+DRiQ+x6kaCXCvqZPd/dxvQ25A+sjJO/lC39ekk\nUddjQ4sThdL/+8i4TufGrG51UXcwUGwduYH9SrHAiyXfCOzeVsfYWvHgqBLm\niWIBSanEPYZax2AUSnZ8Ucav9tmIeefGamLTWXEPGIVt0H3uDTTzZcqPm8i0\nMGMm1pGur67CClFBqYkQID6jyi8CfZbYQ2rxpteLpbHW/1BNYcfctYyPVuqA\n9ZHLNykTldQoN/PDYQawscn0YqeGnQlz8UeC/JLv0r0/jUxZMiNbX5TWI/KH\nJToZrNNmil/bP/qvgFn12KeJNeDP4zxEH6py/mLkZhxzKI4eVj/cYWGt3CJ9\nI/Vh\r\n=gT0c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"bd058f88d4fd8fe3922bf7cdccc4e94c77e109c3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.36","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.36","@storybook/router":"6.0.0-alpha.36","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.36","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.36","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.36","@storybook/core-events":"6.0.0-alpha.36","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.36"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.36","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.36","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.36","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.36_1586997536112_0.23320336143482767","host":"s3://npm-registry-packages"}},"6.0.0-alpha.37":{"name":"@storybook/ui","version":"6.0.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"04dfe146af9e1ab2d398ee3c84b0d24c8c695430","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.37.tgz","fileCount":230,"integrity":"sha512-SU47bA3O67G5RnIJ+3E6/qLwC+eyRiLprNyDGpy+G0imYNkLkXd7r2Hd/g6Vzj4pyvinYwpLA8D2OBdJRryzCg==","signatures":[{"sig":"MEUCIFiRr7LCmlbuxusNlg6oeWsy7Mn+HdXKbAIzgSMeyYimAiEA/qWbjQmEtmXUQhOJUCUjzVLBw7QTL4/2O5O1gURIDGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":788924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemKj+CRA9TVsSAnZWagAAragP/1Nha62O1To5NQab2o1x\nJ8yDcVbPp56M77UqqnJGc+Iu5iyqw1sea8gNsyX9KCsvRSdfegIoCSfSnPtH\nxTvrbuBn38/ZzDvFKoGVc1YOBp8gA9wON1eSbaGf41mLM0pGFP4CL3TXBiwh\n4Uy0v2zk92AL0V9WBfUUJpCzJDweu5V3648xnKjIH/9dAj3x7VylcKvmFvso\n5lgfUm6pTKs34q5T+x2lcRSkmroKvquL6E/JFLrOUCMBVQTzUTwM6XEHLibw\n3ng/FKtZACNl9uBpPw/0r3MlorROhjsw6Tq0rW4A7jTswCBD7kAIctrWN/mw\nniFNKQ5wQvQGD/yt8SJD8zsTkIloMrkF6EsVWW8pv7dlz+APs0z1cjILgNPV\nT3RukpUF9WLSGP6ywtcRvkEIFBwKHKm23elDXlMiQHfxN5R0ysR7dgSKUK5r\n6HhpXpgCvVHMYhHc7BC9b8GwbF/yOWnRQCUq05Zn5ov21WBez6bpulh27su6\nP7jWBsww2pzU+DPj82tQJZQvy8zy7AFjigIYfP3c20Cu3b63fePdhul6w3KQ\nrfiS79g2XmQosB1PdhsDB/gWyiW+o/Fk28InXV9Az0Tof/zwbn4wa4go2gK0\nk0mTdUOzKoySS5Ls/j+5BIv61dmHehd95IEAM4bSfcNQjbM0hTA9bxw1EB4Q\ngHAj\r\n=8Mp1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6f5a305daeb6ca6427bd7ecfcd1d753cc0a82652","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.37","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.37","@storybook/router":"6.0.0-alpha.37","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.37","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.37","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.37","@storybook/core-events":"6.0.0-alpha.37","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.37"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.37","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.37","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.37","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.37_1587063038118_0.7694158968533782","host":"s3://npm-registry-packages"}},"6.0.0-alpha.39":{"name":"@storybook/ui","version":"6.0.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2e41daeb1a9f6ee570b837c36ab663e786d26bcc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.39.tgz","fileCount":230,"integrity":"sha512-DsERxjJcHbr9E8+Zc929XjCnNWv/gb5mDPxtNro2M5Mt6WsmuAujjXuC1QVjopVISTG4m0WHnD+vwaSZ60iZSw==","signatures":[{"sig":"MEYCIQD6a6+SnAt+fvScviivtkWNGAr4GGnIJxV4XL38+34UrgIhAJN+R7uP93lvqp8++I3h09NmNgbUWZ/JSdwQBkiIAgL+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":789083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemuiMCRA9TVsSAnZWagAAQK8QAIfbYP/EC8SqcsJ1xddP\nCkU4BdKYhLVvk81J3aRCOsETJDZy9J55MPZM6+mcFUHPJPLGInZhUzkjeGyz\njkj9pV2BN41n5PrmRfvydlAz6OsrlU+u0O5Y69FcCgJtbLrK4w2jPkMggV2e\ndn3dNbgGhHYuT27F+s4aR/T7m74NXoDmwdShpcXOjQeEM9qZUScwgmjxaGuw\nJ/7v1LBN9ik7/Ne2SKv1nMwdthefe/VCr4+9o2Hpdtq2kdPHcwUC3l8Bx/fJ\nxVoJ+hO27zl0+b8IGpOOk66OF+efRki2DozjPIszgPtnQrPtxQYhMuRGzgjk\ngiWq5As+2rHZHrn0W4zXz/xaxeO170qvUAcjs/eGtGIiddt0RdX5ObbN+Jc+\nCg7N8xmR42I5kPDmfYaqLP2psBcFKqw1h8GJlH49ZTiknpVUWdWDkZzeMxkT\nRb3JeNmma6P4tD1c6sEEkLouo8kmT3M7vqVwg3v6xoq2saoQ1hXajEy3DMZZ\npN2OgX5QGGLNWxRkBm1KrIPMdf72wN++6iRgHDZHeuXxc9GhbrwrwyWmolkD\naDSrlAITMjGPlJz7cuRXD6Dm2C8zsO9/kKFssF5jgOPApT9ZPwppzG6PLRT6\n61LP0pgdArWZoIS/rAa+zMlQA4jNNuq4u5Yi0JjWcE4xakJWrn6zD+9YBNcX\n5CFB\r\n=4muP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fcc28a248565a08fbfaebd2b7468aa2f081993d0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.39","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.39","@storybook/router":"6.0.0-alpha.39","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.39","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.39","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.39","@storybook/core-events":"6.0.0-alpha.39","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.39"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.39","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.39","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.39","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.39_1587210379522_0.3464945679330187","host":"s3://npm-registry-packages"}},"6.0.0-alpha.40":{"name":"@storybook/ui","version":"6.0.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"846a42daddb776a81d9d67e1e0ad7f74871a1edc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.40.tgz","fileCount":230,"integrity":"sha512-ic7WCimI4OP6z5IfgWGWHL9D8Rd7AzXu2ttAyfcGu6IFf4wcwRzMUIP5v1rBo4HZ4nrT2dQNqVtobtDDbWqMhQ==","signatures":[{"sig":"MEYCIQC/RW1+sMGlixxrNz+fkRuXzvCc17iYCgta1f2FT2H8DwIhAKw6uFTZ/khDFCndFxhZfydvMW8GgPlCGVTdlCh5xjXw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":789083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenVr8CRA9TVsSAnZWagAAJyQP/1sn24dk3GpObCrOK8XZ\nTWUqH7oxjMOZjKdsSKMpnVONklZjDCLrkRFf1P4p1rXi6LuYsw4CAcIu4tbX\nb+xDj4I0dPYNsu5eHV1AoJ654aq9QLPoP7gP0JHUNFtoKLxCP4330ue3zcuz\n4hrk2go/wMN93Za6Vrw6rQdwbkik22/HWNf73pvzh2+mpgLNPWkQ3X740m82\naGuyeJC2RYDY8vgTifLVTS998ick5UUB6KbmU/XDcr5OZh/Nfneilf0kui4I\nvwjfgG1Jk43jB4aNTiaHzAF7O44meOIGu+O+VAJhhwtcTLx2ZU/2xDntVmnz\ntDTknrQj/YxTAKUMKlKetR3TIJPIxqovTC2Ikpn/F+ZjuKEP3Z2lZsj9sRfF\ny1xi61OmP4/onUvAmBpHVRaNyOamzyxafkRqkJzOpNlRHD18JCOsvj+V+gQT\nMkq+Gt4Zfr5xePO3V02ct1/1n0fBPXvtnsMrXOOyr5MEjKwLDM8w6yMuv7X9\ns4a/RDbeHyPN3xbPANFdcJVb3PJDh0w8+mktYAB2ZLMPeC5w0pwV+Dvrz1+B\nmqdt9cFf27TsW7UZdBg5fcRVjUwOxYlwwXJeSCFAvkIUYmRaLCgDL3balTgl\na5aj+10WsXbOoiK7VEh0PzWuEdMaBbWRfvVLcMUyFIMVDm+J4I3l/iq6XYbE\n2KqW\r\n=in7/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"75c02952b4efa341d3b194872d333e46e6501df6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.40","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.40","@storybook/router":"6.0.0-alpha.40","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.40","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.40","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.40","@storybook/core-events":"6.0.0-alpha.40","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.40"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.40","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.40","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.40","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.40_1587370748129_0.9727436473331568","host":"s3://npm-registry-packages"}},"6.0.0-alpha.41":{"name":"@storybook/ui","version":"6.0.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.41","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"214cf02668cbfea9ca3164ff4ae3fb751b632046","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.41.tgz","fileCount":230,"integrity":"sha512-Lt0S7PwlUaQ4/wpjz8DQydElbNqyQ4X0Kv4wAMzddzvlfbn1YVu46vezCdw2866oIfk+i9fukQuKN/PH5kiy+Q==","signatures":[{"sig":"MEUCIE0VXN0h7Vq8mnYwFAPUalZlUFlgvv+l3cd0uYwuznETAiEAyhS6j6pPn8jkwM6u2iDLdS6TKOv1nXy+5jjHm5zZQEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":789083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeni32CRA9TVsSAnZWagAAvigP/3L1r2S1G/IYxcl5uAM5\nsVlFNRq46rZMMUbjEpP4ZKJwi97lu2o5Es2p/CQWsEbSnN3al0cxjHqB5gq9\nqiRxNiSFpvPGLG1fBwE60N6mGenSiDx7byjeBFRHpi/v1nVtygt1hKgIZkcv\nOl/+SEg9J2WM2b4FrIUS/WanxtuTTYBWMcw7ewThYyFup+WKl+/M6Fke0/Qe\nUhkfPFCI82//66ru8gDtVTvgRSnWpCRCXz/jFlmfdTnPv8zp7wvYLr7J9p5R\nILk56kwpT4m7454syDAkuTktoa4/PQjEw3tgneQ1qgsQpjTwzdUCuzjSJVnH\nkwMZ4NwmNGtLFAPrNFy9hjvsmvwpxHmF7kh+z8ldOMWGZrskYCFvF4Quukcn\n96bLMB+zRxtDCoUDlnwVdv/hc0bWG2YDh8Xj9+IxmL3OKfpyxL0kagZZbFII\nUeOSMWpmSYANzwUolCa55DwgOhN4YLrMPy6Ddp+Y/6p3WmQM89rww0Fw+N5T\nvoQNRIS16uDOCUsObYqEsbAaxhR4wnOzPlIXYevFiR24C2cYOA2UaIkFL1dO\nqx+aO0hVmz//yW0ROV551aIrkY1LtLHbNtD1TXSIPOkvB6gBhHwwRapg818X\nV2B5sCrQtgz/XkmAFBWLqJnTMZCKvNsjpOXXB57I9LqNJGZGaQ8SLuUwBo9k\nHGUU\r\n=ocp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"869f451558ae18e045779d7a8d88caff25f1e659","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.41","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.41","@storybook/router":"6.0.0-alpha.41","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.41","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.41","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.41","@storybook/core-events":"6.0.0-alpha.41","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.41"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.41","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.41","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.41","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.41_1587424758077_0.9013140480002895","host":"s3://npm-registry-packages"}},"6.0.0-alpha.42":{"name":"@storybook/ui","version":"6.0.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.42","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7d8dca7ba8f0a044e49b86e67e9b3c78c173ac55","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.42.tgz","fileCount":230,"integrity":"sha512-y825LtdunG3LuUVVjiodaWcjaCZdN2UbunP/Ee40aytXypL6V7rPbVFE5ZuJM5jolUZvl6XjB7fM3SWhYHGjRA==","signatures":[{"sig":"MEQCIQDnTDm3uuieabKxnBCJSpS9DTd5AJmzPDW2Gxfd2LlACAIfJEK4TGMWS5yeZHjJfjicvaQ+ul7WJnyr9UMKz6TH+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoN9ACRA9TVsSAnZWagAANR0P/0/nhwDCRhrVNTdoO7D4\nr8Z51SxdK5ygZRuhnIMn8crmDTloJB8OBiPW2lhRyOaajhiZljOrLL7ieInW\n2cR2Rj3eN46z96DcLUZ5vC1lCx4OWAq7KShPhDX2aXd56UvdaqC8heKssIrI\nr8ELn7pi8VPhErTLamR8E3Wq/w6Fhuz5UKmhBzw944FKvTCto5oW5A/GYuBA\ncpAKrZadhlX/C94wn/ylK2rN7vFDpi5juxYVl6pfCRKRBeRcs4K0F4HWnsfz\np/AakMqy3286jivaGiqqjCEkJ7PhnIkp3lM29j8HmOiJ9tSlU7jjiBxbchuZ\n1SS48dC/Y7fJi7Jxw/Mhae0EGIiWXILxbYZZD5F5L0sRklTOIyWI8NE5RLuC\ntoauzIxI3ty1hYntd1AexaBlx1yIUJqcE0xNStV0v41TPnSn+DXI46j+xotY\n2ELnB/k08OlqH7gNECK7tk1RYNaj/Kzo7bUVV0rR6NCDWWdkWvAjXTL+2agZ\nN8TOIMZE1AKH7mMqQyn2ZOebejrhA0QS/Xyh7lQQdCCzmcDwsGArrf+Vv541\n577Ni4tTJiHatHr8VfmCNZfhfPnnAAZZnpBUuyX8bo9KQAys6u3dc2oMWdL1\nS6246roxnUcNbnfMfVYNCTHcw6ynjy58V5vq6kMi6LJYSFhhR7YfEyr9yiLW\n3/Ye\r\n=PJHd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"aa2ceda3380633b57977c970d264a6199000de80","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.1.3","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.42","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.42","@storybook/router":"6.0.0-alpha.42","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.42","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.42","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.42","@storybook/core-events":"6.0.0-alpha.42","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.42"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.42","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.42","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.42","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.42_1587601216354_0.4216032174437976","host":"s3://npm-registry-packages"}},"6.0.0-alpha.43":{"name":"@storybook/ui","version":"6.0.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.43","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dc88c1c27cde42350b119cfb9632bf7a1dfabfed","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.43.tgz","fileCount":230,"integrity":"sha512-fcUiyqFnGY16FwmE/mLfkzO1z3YgtFcpQoyNoxVxt2ARG0//CgZyJBPUAEluQC8xS23y8SyA/n++XX5rxhaxKw==","signatures":[{"sig":"MEUCIHbvL8jCA6rfH7xv50HyIQ8829pBZGdYAAaN4mp32LOBAiEAkgnOwujswxNOoY3RDhu2CQXA1JswJhDpyrtTh4uzGS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeohd0CRA9TVsSAnZWagAAIVIP/jkNkm6K/quFVMMSwCQl\nD5KY4RcqPpKS7zPWRAixXfOlzTc2Hjr5RDIMgd/mW54aC4Qdn9zWAeqaSESe\nlKBa4T8Ic7nVLoOMBWRGdJks4jY1Zz5B+enfeaP0kFKeg+7P4FWD/GJyPI/A\nrcBAEeLcIL6qISldScOSAq0OfrckBcWMhMfjLC0txv2drZk8qKhYs3el+JzA\ncRuq5/4l/IvvisIm2dxd/olU5M0Sx1O+CRnmuwbO1RfHKFIcKoC01h5Xy0xA\n2oVrsejAK2WTKNYizhK9dFmgmjWf+bBx7sUWLXyDRPA2d9krj3GdsFAw5COS\nz3J9xsh+ZtWdDXSTcRz0jTqUrOrGKnsYjpKcBexXD4hyXMdnxyOD6SAXm01R\nj99S9B+laRfccFwPmpRcBU1oIdXXGCFlmFwSHQ6txhxq/V+z8JvSiDF/NxZR\nOXN3hDQzy5T1ClEiAAsBJDtL2pWFUCTkOoAVYaEuBP0v7hC0ByB8wyL1tKlA\n4juxmOBFmnMuP57/QYyvP2u/B66D1B0JZ3mxKw+8C2vD9bV+sp35rCR18T0w\nvkAZivMC7vEg8yvPe3d/FeL5gZP+sMxePcqwm5Ca8x154TuQt4FCIbp22ODB\nDfkneh4qJxceloYU1NePNbwy+jVdc06PU5RCOIP85Pt5Ez4TiW8mmXgqCXiH\nFDU3\r\n=jcek\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c32b263d0307ad2092c0751740100fd834f07a3d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"10.19.0","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.43","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.43","@storybook/router":"6.0.0-alpha.43","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.43","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.43","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.43","@storybook/core-events":"6.0.0-alpha.43","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.43"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.43","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.43","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.43","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.43_1587681139545_0.6381580668441764","host":"s3://npm-registry-packages"}},"6.0.0-alpha.44":{"name":"@storybook/ui","version":"6.0.0-alpha.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.44","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b5f8c2359d17de17a826facf84e15e12327cc55d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.44.tgz","fileCount":230,"integrity":"sha512-cfNJ50v/eLJEUV1ibfECL7PI+Tc/RUET1Tt4cQn/ZhXS8DVwINAHJIXRG+C+6oHQ2MxVMijurkPKW3t0495jrw==","signatures":[{"sig":"MEYCIQCIkZ3zpzgeiY75ZYCm2PoC8fmI8QtaNceKiD3ZftKU3wIhANACy1Rq6FxOsLlpzoOY9TofDBo/vG6rfE0IdwA9abIl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeplw3CRA9TVsSAnZWagAAnsoP/11JZ+uTgyd4smNFTwgM\nvq0Lbac+h4KywmucL6Bk3XHZ6KSuvnsC9v9WHZnLAUbN6aOitzTqGQN733uE\nFcEtF1X+I6JQul5yXSh3FlV3S4iVzjvNy5mztf2c5lYpodualN7gaE8WvFGf\n7FIrPjEJYt7NByidze17pxosw7AZUoi5BpVvvmTh95XgHh9OITlh1+jYZh8f\no7vZB/TBlzCTqVBxEdHM87rmcTCnxlc1qcv+sfas1wDMDrxwaqADl91TP8If\nk/N62AQC47RXepgVWYwdSc5B+DKaKbTXO3YWEqe5QK8Lnn6uqdtqPuRxbUyP\n0UjI2f5op4UpSMx+rT6vYfzAPjtnZhLaQ6grYvKeSxq4PljjOK5m0TckEv1+\ng0vNK8YSDOLfTLtc7gguTd0h2/IPW0ZDR4SRJX13Hcubw3bDyEOBFB2y66Q9\ns3ue36wacglEOA20z58lCFvgNw6qJ8TxtcKCyANyyh2uAa9LnczHPaZTBehM\nkDZ+LkavjM5L7fBxeUcPvWQbMN0MZHVx2nMJ/tXn1IB+qZ5aHdGaclkjp64h\nmAUSwSFH8ibYcd6tAoYAlO0tpee3mscNMKey/LwAaErXlSjucJpV5AvkXszu\n+83jdoX+xCbedhXD+fUr87h9/Gg2vV3vGp/kVGjDuglvuFs7KO8M4Uu/fLx7\n3NZF\r\n=Ov8S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"af271cf5e328ae7ef3953e5b0b2378c6a829ec43","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.44","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.44","@storybook/router":"6.0.0-alpha.44","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.44","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.44","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.44","@storybook/core-events":"6.0.0-alpha.44","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.44"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.44","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.44","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.44","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.44_1587960886701_0.9813812268882445","host":"s3://npm-registry-packages"}},"6.0.0-alpha.45":{"name":"@storybook/ui","version":"6.0.0-alpha.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.45","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"12067d702b9df746776c26b76d7f4a79cf76429b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.45.tgz","fileCount":230,"integrity":"sha512-1XQecSXouG2XZg/O3QAt5ant815jArmt/KraVvbP3rL0W2IAuYHM80J4JsrFVPQVKjMKGm1ybUEhRJ3PsHWnsg==","signatures":[{"sig":"MEUCIQDoW8j7O6Cdf0g2f/qPIj1OzhpADkFV3k0injg6YCR8BAIgCtkMsHl/v0o8HliumZeWmHuq2Iu493mEQkZ8xhsaM3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep6PuCRA9TVsSAnZWagAA8tkQAJeaV5Q664uvgvw8RhQc\ns2fjutCJ6ZxPBxa2XoiWZ+k9WuXrcz9K63efWNw/O+SacbGyhnKYB9uGAYRs\nlLAAPd85YsqeFXxt18jD+Td01F6qqVUBIF0cMAnk394tX/1m7GFVKeNun531\nF61PV7jmfoyvnNP0MccyF0UICQgVaQlu+yhLgu+K1mysvtgcjEgDWdKEpOt3\nG4zNaN4JaEcwfIoNjTl0KooyCl44lQLcKBwgOaCQ9v5DUAb1/i4fJ/EdCdCG\nvQekhUkXV0rwjPydM8eaAeAYWCHHM7KmpP4tSuCWC4kXeBEn2wE1ZXqjeAWM\nRI39IiaBVcLekZ59SUhnfh1105tJ4ek2PzxzYGZvJAYrmnBRhPiFQ5BXZalw\nl7gpbKlBjQavfI6VT0tIWYr/C2Rcum7TYsnr1U0w5pk1xawWeMAv279z5uAS\nkmCopzizZTqqtvMw4/Y9dpu5S/vFzmdHmkA/ZNJi5AXFrJheXVRCnN42aoRW\nqPVkJCwme9p83sScddxP9C0uR+VniA1M3lKg4bZNwDYqKMcxBemZ5cHunWPq\ng82GCRShhfmrxcMID83GaGAhZhQJpqK6iarTCIpWfv2Nfl9o9jMbKglfzWbG\n9E/pw77ZL5641UrlHXsAGar/46nf7SWKyf9Ooi8XGQePaKMJMR2hdUOGngJu\nVzFe\r\n=4Xja\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5b26d301f3521cb41a63ba1d4ff1ae7680b7a104","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.45","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.45","@storybook/router":"6.0.0-alpha.45","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.45","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.45","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.45","@storybook/core-events":"6.0.0-alpha.45","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.45"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.45","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.45","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.45","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.45_1588044782135_0.37412026500664575","host":"s3://npm-registry-packages"}},"6.0.0-alpha.46":{"name":"@storybook/ui","version":"6.0.0-alpha.46","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-alpha.46","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"97e0c5441664ef2ee3b1591372d968c818bb7243","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-alpha.46.tgz","fileCount":230,"integrity":"sha512-tcmAdR45HMr+rSxKnhCtqvaqALe60g33JdeItPTLv00i1AJ/a0FPNeQGld6ErrQnqsWJB5D2Im1ag/m3YecYRA==","signatures":[{"sig":"MEUCIDar+N8gej2mmM05smi9Q1TFYxaYTUWpeEp9uIdcf7zrAiEAhKtL6F9BXmod1y8bySxCIcH9wN/sr3Okc5VGIonRFuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqUN1CRA9TVsSAnZWagAAXYwP/RNbS3awWm0h/CfHlsxC\nMSCFCuFUTv1x7T29T0Swrgiod8e7zFmMzSPSMNVIb08kfeSdkQ8Ljm0qBlAO\n1mAJGPPeS97Nu3KySc71BNc5hxofqrZrxTfQK0pHubtsK2cEXHA/+ZFg4WnI\nW2sYT6RHZvOS+f8x9SXcLE48ClIAoa/KQw9WgMj9NdCq5e/+h0pjZbNpupof\ns4TrzK2xNqhYaL+6Tggd/AMocI/MOU9bAjt/7gZLKkVNNkbDF4OqH/lUFFJM\njOPcaO9R1lNEY96pHCYwoEiuwnt7mdCDog6t8/WGTA6R80Tp+z19/h2HP1U6\np/R4xcr/dFItGSAstLGcmA7TifvIL8lX2NrDR3CBKg7bCmgPCs3Mw1yP5KIa\nLG+IGx+wpkb7ZVYSQ0zie+U6BInp3S3nM6MhOZYv3EVmAUwpN/nSBaYMf8AM\nTL3aapjcyz7EJ9girA0P7m9au+6C+SNxWtWk9WGeKOXp+RhSQEztxCS2twwK\n+poh/ZkhcK1PEbwA9KG2KO3k4fFa+b5OxJwD7Hn94EwNuRynez7U9MHjt1cd\nUG4CwQFZwfx7Owhnj4HMmvQDmjPpOoZefmv9HM+qPoTAjKR+N11QsZ8Tw1ib\n1ydQt+IE9yRqZ199bEM3CXZIO1MKNesb9CoiwrLHKv6VTWJ264FPHjrjsmVU\n4ziZ\r\n=4Kcz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"bd4b167dcadf1670b3be24d06924d27afb4fb3fe","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-alpha.46","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-alpha.46","@storybook/router":"6.0.0-alpha.46","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-alpha.46","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-alpha.46","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-alpha.46","@storybook/core-events":"6.0.0-alpha.46","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-alpha.46"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-alpha.46","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-alpha.46","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-alpha.46","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-alpha.46_1588151157158_0.4326823327984677","host":"s3://npm-registry-packages"}},"6.0.0-beta.0":{"name":"@storybook/ui","version":"6.0.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e210f290c030e75f529a1edab92b835a5c41b3b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.0.tgz","fileCount":230,"integrity":"sha512-gWIpUnmPCmC0MAHtJEjmj0f04hqfxenbkphMeQ+szM3lQjr7rs5GX8ax6QZt0rcqWPSUCpfGYtIU46V2eplLUw==","signatures":[{"sig":"MEUCIDqBPg4fnZ1OfKQvK3KQ1ZS7qO7EmTBKQwpWmphx3gcGAiEAxYBJMMKrR8ouLhbaeR+anZypvzW4pzXMRgahlvKia7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqYKGCRA9TVsSAnZWagAA0z8QAIFS9z2FSCPH0VPtccNZ\n0n/Qb96mKRpQMnAwBO4jUWNiaXxlzczBiWoAxnTsWAF17UGHcyMfMjECC9Le\n1Zoq8GQKG3eX5EmFdtcpgN5Kj/2qqQEUuNOVMqcKiJaWKsXNXzM0y3plQpqn\nkw8jNRIpMZsUESSUD+wfR9ylcIO8g8ApzBYwyftNmCIlI5Z9YJjj3vPY9eIo\nKwp9Xu7LFWinFEtsZPk8v1zFttIjpZ8NuB72/qW2BIumuvL1YijZmhLBf1y3\nvFfsjgRtwYZ7oFdX3bX0e2S5stvgM52R32rT5pFyE2FvGFDNJ2C7d8Bx/SkE\npdrhGykCs0fm6/YHGmBIPKdiXu9DjvlLAYWFveWKXMrrUZvRbVpfZ5GlWrkN\ndMDqv7J9dkD6UlGbUpWkjsm4Hv2EbLclbJ2/gDixMwpGtzucfflZEODZ8ldn\nQH0dj1hP2GKoWChwUaloGqVxy4supsmXNiWxZ2eS0YezNJGV/lQfVbccldhK\nYQ6kXIJacHVCazAxgLEKxPD/S7BCxCigVmPsw6ulqcJS9LDFrkVNvauQzcv4\nCbrbGQY8XU6ILRoPiyDVEn1O1EdMzThi+rcP7uDJn+zhAcM4bmBIMwRyjlCe\nCzLmvkZwuCJk3HIgihOb9CoGpfHdoM30rYdAUsAdWZ3srxAqEsCrt8y0ee5j\nfVHG\r\n=A0OW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"93ccaba6071b0b9aa5988b97cac57096d7298181","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^3.2.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.0","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.0","@storybook/router":"6.0.0-beta.0","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.0","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.0","@storybook/core-events":"6.0.0-beta.0","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","@babel/core":"^7.8.4","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.0","storybook-chromatic":"^3.5.0","terser-webpack-plugin":"^2.3.4","@storybook/addon-knobs":"6.0.0-beta.0","@testing-library/react":"^10.0.1","@storybook/addon-actions":"6.0.0-beta.0","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.0_1588167301389_0.29374853934947076","host":"s3://npm-registry-packages"}},"6.0.0-beta.1":{"name":"@storybook/ui","version":"6.0.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"30aa7aa8928168df04a63d04b0b5a339213873f2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.1.tgz","fileCount":230,"integrity":"sha512-0xefQb56Y0ilfuA+rqL6JCfY1BHfo4NztSTkSk94foESfqvKXUmCJlo3IfeWjqVtnFRxQmJMXolfY4/nfndHbQ==","signatures":[{"sig":"MEYCIQCgARIdet/QyI1862dtko0zxiv5KEKkFTlaC/p6we/YagIhAMsy4HshxtAUSHxSuqvWgjT/ZIjQx+q6ePHx9ZcypEh6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerX5rCRA9TVsSAnZWagAARXMQAJfX1rAQcFzEBy92ehzZ\nYzFaBy2hdmUjU5wliVekp+Xu5bf9D45y32xlrOzoHZHPL3BRuXPWEdT+MA/m\nZuXpMym6Y161MQDU2BwFcPDX/84ypiDE5iFwy0rFQAZvkusQ22pDEbHxX+KN\nBmPFoU4XwaQsJ8C9oE4zgWAwQ/TiqlSbyuZ7KwDVs8i/wlHncniF/xXkzxIS\niOl9s3hIa21eSl6E7KbjJ7RI+lCLubezYYDZasy6sRcMD0pHxN4OxwIgtqhj\nhA4IWFsdAhNigxH5Ief5QIl1OcWIqGH9sJ8X5UOqVGA6CgMBRDAJLea1ixhI\nLttTqMP/UCIb0eHUJpDytL36vby5WUaDl6/scqux0BsFp+QXHtOdEt5yVHUz\njCrn4/9zLk9/ZUtzDjtwR7NntXNPj4ycdJezvcpdF4cP10wUsqmebmWPoVS3\n/W9y+zuam1gU5ZP0+vdGkuAqAPCQoqL6q55jBIqLPWMt51SexO2dBbYvaQMa\nSxB9dWQI99egE8jcpD/r+o5tLpjU6jElucUZosqA6T50/nOHJzqpBJHGnxZi\n3X0nTeR6D9G0sFPHWltpu3W8cJIjL7f+xsEDEeu3P860RYAj+roXyOt40wvH\nUlvpB4hYp3OniwVqqzekesVT0juvNqo5kDThCW/U20nleosYeCe5C0LQamps\ncenO\r\n=IIYW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e2bfc168c0d952b292d4a825ff392144e253622b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.1","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.1","@storybook/router":"6.0.0-beta.1","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.1","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.1","@storybook/core-events":"6.0.0-beta.1","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.1","terser-webpack-plugin":"^2.3.6","@storybook/addon-knobs":"6.0.0-beta.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.1","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.1_1588428395204_0.871030526797969","host":"s3://npm-registry-packages"}},"6.0.0-beta.2":{"name":"@storybook/ui","version":"6.0.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"64f37f220de504ed26fd1945237164b9277b05a3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.2.tgz","fileCount":230,"integrity":"sha512-MWqfqVd8LgCjjV+zomYmMeayMZ/w912f3b3bLLrOppa+Qs5GXimY2bpnVk3t2O29cvA1mN7bay7Oj4w7zvxpdw==","signatures":[{"sig":"MEYCIQCxw555V4HyO3QBCaKs8Cc1xf3ZRjoiPDLqUzEfCcZiWgIhAPg214InKEhIXQHBP85qjJdYTuD/54jSM8C/hSeiGgUt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesAdHCRA9TVsSAnZWagAA4EoP/RQJkk9kq2seOuRt+Lnz\nEvqyH+ekP7Rqc/x3kM4JD98ENo1v7uUpgNcgr5IZ1gBDhHvlbQ6ND8v78aHa\n5EE2/GqUNldkdJXmu+HN6nV2TpyNr9HjRyIXpj0d4yBabxQHVdGjthJXzbrd\nZAFtqwHUQ07bg5MV/gt0nHslj2XQ3KSp/BrDgw8pXiEc1ijXOusgCY+lIlmF\nOXX2F2+JCrR/IWGYaA01r03QME0ezcXrqqA37zqe09v/VuNB1SSLggl0AVvj\nf/aILFewMbRpPPxjOagzJ1fLpyzP0O+UXogLmGytOx4kNywoa7CfP3ptKb5u\n2Rkh55PkywMd2A9rwto0SqYB4kDysLVRVNKncsptZBcgD3lLCORADppIqcuE\nKtbZTMkSY0/Tpt6MmUt+6AGgLr6xxKsgGHPPcTvOIhTt0cZqlbA7bzpyyYPo\nosOmAwFV1S7x178HdiehR9V15a5xaYvb3mYNtrnVl/SsroqJKK+gxKaDeo6v\nRFvVcwD9ThMwESviZlSZr1pfIbcgepevbVm92EhGh/nMRGDkK964In6zELYR\njc4sZBhKTfDgMvZnYCmb/RjFjhA0AkQM+Zi0MABDTpDBR0KLWtN1CifnD4oJ\nAfbhaizebNbY81kvR1ddcsyPHsKdXZUZqZE6XWrpGza5NBqONuF5ARhpjg0q\nn8mE\r\n=lRGb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d77aad201848acfd9525b0bb5d5016cf45e74754","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.2","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.2","@storybook/router":"6.0.0-beta.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.2","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.2","@storybook/core-events":"6.0.0-beta.2","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.2","terser-webpack-plugin":"^2.3.6","@storybook/addon-knobs":"6.0.0-beta.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.2","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.2_1588594503218_0.6988683054875433","host":"s3://npm-registry-packages"}},"6.0.0-beta.3":{"name":"@storybook/ui","version":"6.0.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b1ae897200e7ba76a55ea5c5589ed7d9f0c1eb57","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.3.tgz","fileCount":230,"integrity":"sha512-MTCqZZaH2qRpC4y14D/Sa/g2hX+4EOrY8Afs0BOMnPEGAxgLElmV6o13h6pbOi5DkXGdNOeRbyXEujNjtEE02Q==","signatures":[{"sig":"MEUCIQCvE5Y5uiazThW8LK67x699aegZ29tLOr0UldMFuettOAIgD2FngN6n/GD0hGPDzBplCzGFtBzOrwt2tgv0ZNP6rG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes5VQCRA9TVsSAnZWagAAaw0P/3lQRFpBaQuASPGrYwNh\n0L+qnq/aYp4o0jOi0S8OR9Yt2mTDKgtGHhQza+ps3CLCFJ3DUwypXdOPFaK/\nGhNS3rKyi753lBkEkfQqpfzehqUnRbGy21MI9K8Xg2qaIvtEpzZskVPtOUxK\nI+OoZ/Iz01yJzdL+/KKIzN4k9LkmQbErTmmajPIAizaZKMeToiPQsUulmJlm\nrDrOLxrMQbDE+/ZKUjHHDxE+0y4NSCbSD1472O/3DLA3ox7scHo3Ihjfw/Ib\nEb2f6f0Cc2BCXsP+EsRfGfnstlhDY6vf3qKG5QzLzPMNAW5G21DmjX67C/L5\n99VRohu6OV8DtgIvHCeKGWYPgomEHjQFCavOIJ0icLNhW1GoGLoLwPddMDbr\n4nueR1BZcq+rgm1iSx0/yicC2ipdYCEUjQTVfAlnwNnqO7MKEXGHd5Dme84F\nBoMIEaXTvTTjkhJ1q35waDoGWy7QIpumKgshvJNBL3n3kWOc6tF57CoXcvHQ\nOORrLaUgLOBp89nHziSAL4dfo1Nz6Omhg96lv7BUZSkPiIgZSmYnlpy1HawA\nfNR3VkUt9zPMlTOChQcNoRxsWIhZkCRVvWZWlqnZXXyxbdEsBYbCnZX+Hrbw\nTUNf1JztHHI/JwFEYG9KV9WBOcWnM64okrdX7qAi+S5iorpzP+bYzvyA6NJt\nZIdv\r\n=g279\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9881185a4ade28a9a2d79f7a39561d10a53a01af","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.3","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.3","@storybook/router":"6.0.0-beta.3","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.3","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.3","@storybook/core-events":"6.0.0-beta.3","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.3"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.3","corejs-upgrade-webpack-plugin":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.3_1588827472429_0.5139797335729215","host":"s3://npm-registry-packages"}},"6.0.0-beta.4":{"name":"@storybook/ui","version":"6.0.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4483fc5e5f7757c8108b998da80398f6b6ab58f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.4.tgz","fileCount":230,"integrity":"sha512-mtkMjRfadyFXUiMdbx13KW93+JShsdyuRgdq5P6jPaj8TzJCFADm6d+pY2qA6EvW002XWki/Uaj5dD4rk9n9Pw==","signatures":[{"sig":"MEQCIDA1G1Rhy3HWiIFSkcMXczuL1111oe19Ydy16ojB7iPpAiAPubjwnjkN2yG6d5GSDDpH07JjJZF1OuHhtd1Rprr2Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetVldCRA9TVsSAnZWagAAM+UP/16amctm30ZDB8DIti6U\nhZB8DZXf/JLPs2lnpH9BfmaWuqs1D1+G7yjt/xf3iBWXZU4WyXF7HL9unTaA\nz++XFr+VJnHB03WOLpLeER7R5uf7t3BcGYGY6WQFlyysOeCvyZwdav2xkxIh\n+Mlae9a4WNREX2K3rsnn8hsxwzD9h+eAPEOucaaIxkxV+MaVaXuyF1VruYmO\niHmSmOU8BVkg4YYWaMP25IbDzcjBFexAYw33Ggy0H01bpycL04D4/w4KpzIR\nD5SfohzGFKR+dQtaFsjUCZ1mdCypdVvOqdDVunCcUjyeAYsgAqbUatCQbDg/\nRGLHwmoSMkPMrai6graTPwJ22tZl/FC2LqOyS4wHf8O7ir99wOpXplJpKaqM\npJmW58JIPWsGgIinxePJ7ZHiWxEJE3Qw4OGsukeCL2pR1aVa9yKry7AM39kr\nJqApS3V4+iVoW62lzNNALWtkA0t3U8c5G/s5qhLdzasRNE5dCJXi3EgHy9i3\nz0Ia4+2OaXt5VBjn7JFHVkjLqLOui5O71jgRKvtKyT4qhtXJ7j3LBK4Rp/4N\n0/KV4Oumn60UV0tigso3oYUY/xFRaSLRYCFgUDk3qUHUldnJN0+XftYLQdAJ\nQn7lCBasgYBF05UpO0yPxf/kdXVW5YXRcpxjqNvQU/8ADqpQqEHopU8tee6X\n1Z7Z\r\n=ox8+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0e4076e643e32f690bf9228a0430faa0603e75c8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.4","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.4","@storybook/router":"6.0.0-beta.4","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.4","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.4","@storybook/core-events":"6.0.0-beta.4","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.4_1588943196425_0.3445992215564717","host":"s3://npm-registry-packages"}},"6.0.0-beta.5":{"name":"@storybook/ui","version":"6.0.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"768193757efc871c09d841311d5d1729d20753c2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.5.tgz","fileCount":230,"integrity":"sha512-M6Y9lv04SECKcR+xrkXhl/R/cGwP0S33Jz8S0y6w4KPT9KuqwbVDquViCCLb7ESe6+16TADZqyvrmn8UXQkAHg==","signatures":[{"sig":"MEUCIBm+GTMy5G5vvn04AUqc9IFmAmfVKat+82d1aJFu3Pa7AiEA5bG6x6w8LF2ALzO2WODYH2SzsERspQIwVd/rT5v/asg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":808189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuROVCRA9TVsSAnZWagAACDQP/08+NlkdtDIp3057UEOQ\n+KgkfeN4TnGhpiScYKSnCcxTGEG7nBn9QTzt4QmTwTwW+mhpgLLpgWmBSThu\nQKfPUShihW2WagXbihxiaW95jyH8GY/NW/ohecOcKI1Y+wgqAo16BQKZyCiB\nLUnxNLTAvraDiznhKIodsE0uhuZ10xAlUF9q3AUBid++8Sjlm2PbLYCo/tYF\nWewQA9nUSAOVYjioX+XT8oCnPu9Fgs5+EYytPIfsYyC8EomXfr4lj03RIGKc\n+Uift6fR4pFFt9Zphm7Ks97UHvuax4dQmWZ1GxI2twU1iQeMx1DVNgh0kJXM\n8b0EtkuUk8DVh8CgsX6UUtzWN+dMziTewhaKI3K2NqIp8ZbVCknnzRv1l1Gq\nCUZr6MTyfWINCKduQhxMMx0zQpZMWOUx0DhpBQYl/Q9OPmW3bHff6me57NN2\nHktYhVgZREn9sII0a/5VI9x1mtxe245mwx3dhyAgbkq48OZLPbaVACcI/ddH\n/CAOwI1+Nwyg/GvX/jg3z2g5I/uDpHqz0W4ZMshR78fVGPkpNorJak9h3fHq\np8mE/hVXr52YR/d7PH9ER2UEdp43dMnFGvfis98PjqUqgk9zbUIeGQD5mSJu\nEObKdwP3ynY1CWnTrv09Umg9AHyCx2Fh562XLLMmKMSQ6uz+wUWvjfvVDduK\nu1i3\r\n=m9Ci\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5827cff7eb9d91938ac945d2cc33c46c070f8e51","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.5","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.5","@storybook/router":"6.0.0-beta.5","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.5","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.5","@storybook/core-events":"6.0.0-beta.5","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.5"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.5_1589187476720_0.6474682711602857","host":"s3://npm-registry-packages"}},"6.0.0-beta.6":{"name":"@storybook/ui","version":"6.0.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1f01f240854ea1959eb9f28d4494e4542533b590","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.6.tgz","fileCount":230,"integrity":"sha512-paoZ0HXUZwdWNAGiLAZYt7N2YM1xplOk4HE/VslZMz1f+pPrwQw0iFpfszIegma7kyF9n6Hg244l1DMyVoRtnQ==","signatures":[{"sig":"MEUCICVp1x++Scf7EAtzcYIOQ5UU9lW+rIvR0HDC9tXHyolNAiEAxCzT7sp+28dAHHwuPYyZ0Vr2JujJRw7Wp4XU9C3fHD8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":808189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuqRQCRA9TVsSAnZWagAAqfEP/R4hZsJvvdiqXLqg7Y7O\n9QGB1b8bR2RaGxr4Nfb6ASmrNqgK2c96ZNg2lZ7P6NBj00ffOpNzFXUTK0tl\nmnD7So/eTSLvlhs6DBDkWT15ibLET1mVa3rRw9Swc50vdNcSxchp9wNQc4oc\nlMT7wBPQQ/ttxVQb/Dd4tv+qbYJ0Kzl+I+CJOvvG+KIUahr24j4cHbIOvlC4\nKylVCaAgd23E55/EFT13rcqf2s6hD2w+HAZX1cdIrQnFq3NrC8nIIKdOLu3S\nwJnjzu4dgUlGTzl0AcFKskTur+y0A1Sn7ccHKo2RWwIgY6lvssINldD2P4DA\ng+ZEWsMIl7eJIeCdzgsAIwDIh5J7AEPHHFlmAaaFLhQQzMBZbEDfSPFxyPwk\njhG42U4EmFTE8w8tekyVCwoScUgdjOLRPcJ70/FwbmtR9nhxOhRAdXuLUW6R\nmR/LhZOKjb0zxXHH2yA7NIcAMfRpm1vjAoXS1fYjpp1w2RkT7WGNpc87X4Yl\nubb+vo0L4JkAuyGEw+5bFuz3aU2cIuJ7mv/rzWO1PLGo4Gq0j5eLLQEdpnpC\nMqhgvIToCMGV6FfIvbW/5w0y6ty1WHwFxtbHj0PQ4wTWCAe5hmeWwUynJYx/\n1PP6MCy9IDZ9yiJ4Ea4taZcKaRgFH39hHJgEqUaxEvnmrqnSgXvBSVXm+IFi\nziW9\r\n=1b00\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6f10ef5c93ee73047495a9e113fd013b82814f5a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.6","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.6","@storybook/router":"6.0.0-beta.6","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.6","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.6","@storybook/core-events":"6.0.0-beta.6","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.6"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.6_1589290064195_0.2688321399491367","host":"s3://npm-registry-packages"}},"6.0.0-beta.7":{"name":"@storybook/ui","version":"6.0.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f0cea35c5e9212aaba0392c0cd131f8d41d1cea0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.7.tgz","fileCount":230,"integrity":"sha512-8stcSIiPgBWL5aVg/Y7SCRldlUVZnLmHA/Yzhsg/ACE4zS487eFfERS7txmOyAT7qatcPZ3blnIp63HNoRs+zQ==","signatures":[{"sig":"MEYCIQCs/4nnML3pgVtcdQXaHsT1s8+/fjzdgolnjl/XdJaMMwIhANG8Hxk33juOcEAQnpTdrya6xG3+xtXw756yWEnszUgh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevheaCRA9TVsSAnZWagAA3BcP/0VaIZndEL4EJGoWxEf5\nEIh1jZY3OH5xwTC6bGgAeB1na9EbZ27NbH8KTMt+llIhVqEjqCzWOaE6tYFI\nuFe0+vyJJ/fM71d52PswiX4eWRSxkIgDvRlgu2Rr4lJXSswmf1OvinMD7mut\nkoqEFC25aslu4uN37F6KKpxeYWdOG8fQiSSdTcXlJSFs2odxmDcWOR3N/CzH\nBaL0igRobIWFHspcuHDVhYe2ALMcNcftAdRDisPMQQxxy5+0jCGjUx6FRmQ4\nLfaKdvnryizsZiAXRQyOp5LBDskI15eLYChvxXp/xqyZoiGxeRT/K+Hu0NFu\nbu8cpE5fjbFB7BiQnUCndTJbuZdmh/2aSvOmN3akfcfjm27KUPdqRWp7XkKE\nQGEWJZN4OgBF5MFxfMQ+fbSIf2Oh4s0UHpGqEflUrJEne61ghXytcpQ+WWVM\nhqi7iIgHkOq4ylS9lPc5OqnvLZcR11iIabMcpD19kk+5M1j11VwR+SD0iiJb\n5LfMbLnlwPYbEEC5dG2yWWz7jwyVHkxSXx1YIUb+LW215SsWxiU7PSDpmICV\ndfyDIxmDECeTQgikCyChD+IviUmnqXWBoe29ZWYgerE4X9KWp7Nk54FDTBO/\n5SsGT/WzpIlCyyk3UafY0NHPwJyXZFghmOsMg7cHspPzFTJjMVBsf9vo7FJj\ndcQB\r\n=X5a+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3cea5335d2fb34f0df39301344b934e8507a40a8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.7","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.7","@storybook/router":"6.0.0-beta.7","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.7","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.7","@storybook/core-events":"6.0.0-beta.7","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.7"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.7"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.7_1589516186314_0.580397873193117","host":"s3://npm-registry-packages"}},"6.0.0-beta.8":{"name":"@storybook/ui","version":"6.0.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7c10fa3d6c203ed2798cec902766434482675402","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.8.tgz","fileCount":230,"integrity":"sha512-2aW4jQF3s51hLZxFgqxx/P6yfsMlleEhyjII2RyoQm6+CyTEhn/BRGIwh/DsMDEPlmGSt5a5puYtle5POVZrsQ==","signatures":[{"sig":"MEUCIC3X242wlTwVkAqUoCnKtA3BpQQ8RdVxdaD7d3qd15puAiEAhyMweAXtWgSNKjRjmvvF/URO4wJ3Cjjbev0FYA68Hoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewRuCCRA9TVsSAnZWagAATlEP/isfZM1hwkYKNw+jUBLz\nlrDY3nQ/1nHmonrK60lVoPdBTvNX+hV4DTra4Z9hAs4xtSYDIfAhbsDHyyty\nfOmznHAabOjj+tX4ACGjN41mOu/TttGRHzAY4aMgroZM+Q65tQqEGgJ0TwsX\niWhmllsC15B5Vz0s4Mq2KOXG93cTHBvdAdm55pR1jcDeHNbrKXqCrqp7uMth\nY+4+VjiIr/A2wSD7C86URhgtzioi5LXf+gdG+wULiX4lZu760SfLdWmf3+eY\noBkw3264N/zN5GquEdNeuMQopSZZO4hCqShspgAmOqEk60yot5nHhDWboOSd\nMgrT656t4koczg0IwqIm+KHDXXgWW7tawb7OrCCf1x2rEkkgRAUT2Rve2Hoj\n4fxcl8hBSNaDl+sydhph75dIA1kd/NN4mFT/Ze24gKWBu1fTErIcaArWWBi/\nQc8iwWMljiroTCfsVwgCWPtGalDA+MXEz0iTmfYVvyuoKWVJe4P5nn14PLTq\nnpHrvb9MowJwfx5Vu+uLV0hXXGpp5POPgW1FLFqTqrn+BX2YfCMR7uvjr5fP\nwyO2XUl2JuJbvChVz5+dPvl1CdAByZuQGwNBbR69GKjYTjNMjmHI8vfcMSU2\nQtfym2o8oe/NCOu/ZS8awo4r/owlArwwkGO+d/BbMzNwZHi+lrJk1QYstFYI\nYvMe\r\n=eQ9z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"73d9b6fb3aa71e80d5844ccc75a122d23be70d4f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.8","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.8","@storybook/router":"6.0.0-beta.8","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.8","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.8","@storybook/core-events":"6.0.0-beta.8","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.8"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.8","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.8","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.8"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.8_1589713793655_0.6047401436212645","host":"s3://npm-registry-packages"}},"6.0.0-beta.9":{"name":"@storybook/ui","version":"6.0.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"caf01667fcf1e5023b0244689969b797434394fe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.9.tgz","fileCount":230,"integrity":"sha512-4TbOr7QGJEhzGct6nMRw6RdAg9hhD43Gh57KWAM47dY/4Rh3v9sfDk3Yq953Qp/rBLNTKPP6NOwTiKmF3/aAeA==","signatures":[{"sig":"MEQCIGWmFKR97unZRD3aIVPqft/nt9lMmUqedTjDGXOYcFtwAiAYe1TQj1RUUK6nZQo4ZTW9bFTkVcBrC5oDPI9LhOu3Jg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexbwoCRA9TVsSAnZWagAALicQAJLN/pKv6sv+nzS31Ibm\nza71mkxJzJdGWfCBE+uE8gF/C5QHMdYr8za7gj3hQ74uu92knIQX4oTu/rOC\nLiuqbQe/lvUqkdzHTl3WMLBDtIBuX+4syAKJjDQNkO8S+4RdMicYz7KVsQxN\nC54PxT2eAdjUfV/i6EMP4Sei0dMC0kndRFIZ11BCmpQ2HXQITlZp/hM2huNQ\nt2tNzrRrilLfN4KbVz/fO7iF6+TJghyyo0lnqd06IAwS809zmbZlcsKAT4+F\nh79t0VfyNEhaYOGLK0zEdxPQyl8p3cRtnhpdYIDIjmitcrXsAQ2CrDiqmanC\nBGLQmI/oywA2DH8XFEV6DXiW59RSUtgJhPZaINjKMD1pEf8y8o4W0N5qRH0c\n+9/n7Iqmmif5yk62JYvI2b31Ztv54Hm5F50ggcrRLjckjIxEFKrUzK3G1Q4W\nqekjZQ4RhvXgheFr8pE2ShjmSjVwse4PQoZaZXgvMj7b4q/LOJGlG2kEK3SF\nGJgfK6Pzjo9fqxbDjPAZBXJ4nfSFu9Qiy2F1BlD/LSP//Cm40AiTokrAqZsY\nPKIrva3Df8fsQHggU9qsPzEqT1tbuwLUacyaDy21gBLyjv3UT03R+dg405mQ\noAM3iLzlQYj3VS+sZpoQfkrMKIDxZfah5kyVOpLgUvelwFBuuu4WGTGglR92\njQof\r\n=QKw8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a6d81914c259d8e3ca4d3cf598ae4866876dc761","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.9","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.9","@storybook/router":"6.0.0-beta.9","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.9","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.9","@storybook/core-events":"6.0.0-beta.9","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.9"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.9"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.9_1590017063537_0.7171132036762544","host":"s3://npm-registry-packages"}},"6.0.0-beta.11":{"name":"@storybook/ui","version":"6.0.0-beta.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2d6e4e39f8cfce95d82fec68c0207714e2630376","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.11.tgz","fileCount":230,"integrity":"sha512-hzkUGAyWsJjdNkLV7cZAbQG03uPuXcPtTWJnFvRewt4F1y3rF0BheZ5nsPl9d+TlBOT+3jkoLo6MEq3dkwM0BA==","signatures":[{"sig":"MEUCIQC+Jf9x3ngHxW3quJlcs8SCtSfUHPbOT2RkUzlDh8+gmAIgKFusCRew7+eBaacVAwBXRgoQZq6uLYap1qTxA6Xeu+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexgR5CRA9TVsSAnZWagAAqdkP/1qRjQo1snYiHIzCr3UY\nCyp1cLCMWDeEGoLdjf1m6LB2lLZS+EyDC+pay7qQ1c6sVpqGj7iLgWpjLu/H\n4kZST1ln875y2Y3BBvPbhpMNlARQjb8qzhUsMsPj4FnnEGqrVXKKGLwSzRCA\nJr6+ykLakGdMEGZqDxbIVY7kO4CXgL5+TgTLGd01l4MaknKWIjNzKwTV0cLV\nNY63KOwl57EihlWlw28T1+Bl+o7mlprWjclhBe8MRceHoxRDTzTxixOyShOI\nPQyCCVrDuKk3TUsa9pyhldUzIizfMzsaF3zrogqC7CQPOtpnkN5PaKPkv1Y9\nvHi8LEctp5B64/V4MyXB0MPzbzDl0oL28j2luqmhnDKf86ZjWY9O6tO5vCHP\nleJ3xQKSZ+af2kwK+1j0A2Ss1xd5edadPpRMTAW+RA4xS2/yHbcyBui98CAK\nziXMZYs/21Bl18ElpKjso5mmfflRn94NGr/qhwNz5Cmy1NpuslQwhSCj8Uht\nIldL2fAcFgsvkrm55FMY2wu72aIyBpagLzZB870Va7Tp5SJ6v0HbiBenHaRJ\nXJT3LLEfmsxxZ/YpmqxHh8Shwc0SBVnzKagom4cYps0s+9ba7kh5MGjOQfdW\nWmKCgBYdljpdXTrEXxyS5I04Z8h5U9ZiNY2Bcg9OjcZp3niEUcay5Rv5P+jv\n5lNf\r\n=sd5Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1e1ea949c7ff685e9fb52f025a59e4980bfcd0d9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.11","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.11","@storybook/router":"6.0.0-beta.11","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.11","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.11","@storybook/core-events":"6.0.0-beta.11","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.11"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.11"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.11_1590035577452_0.7604829331467133","host":"s3://npm-registry-packages"}},"6.0.0-beta.12":{"name":"@storybook/ui","version":"6.0.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"70710c33d2ced80d1be0425f627abd87ee9c292f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.12.tgz","fileCount":230,"integrity":"sha512-e9fT0fu80YFLAcXAqsRtHJ4JHNiP2fiV7rCOlbswj74REdOe8H2Ar1yfk2Rhw1W3Axp0qEBbTc1zW8QqvQ+5Nw==","signatures":[{"sig":"MEYCIQCIqYJGu+vxd+uaLWrc26tVvvkUiAjSJ3al7e8ZMeIViAIhAJLszinR9EsdW8VKzwkS0gOHonUsfwc3GSBIMUqRVzIQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexholCRA9TVsSAnZWagAA/MMP/jNscpvOw9yHSjMPcfLv\nJn/IBnL72e3Xl3ucMzTpKW67d0pfwzhxkIN1+rG7gm/zAG88Xg7a9tduDtb7\nTCh8SwW++jjGKQL2iTSMER+hTPa9hKYb8WJ2Jr7mw8Tayaj0f3hO0Sc4ER7D\nFk/CRnJaekpOnrarv3SUEQaLkOP1Bof1uVoQ8qNGB8HoGkKyYK7KtLhtbuYb\npQbSRihG6ppiX/loPExIqHERgZhVhy2muHktmgs/Ik/e2QpTFciGEV4BG8yu\n40+xTzICu8XCih0lR7nty1fozj40n2pNGF7Qa5UaVQbqwhN8YL8A0Ll9Itt8\nqON821kD2UVbdE7rNpxQeiLBJscIJPtEdQUV/MQW/VjrEmeAuerNS5Yr/nEs\n3R1lGEjNP6A8Kcas1SLbn1kRtnookocrh8kzN5NbVuXyupvCQ1NVHSdu9XSN\n2/+Lov/P476TdarwdobgpEerBo1mjRbZevkUcZy/IKuSUZlPL+Pj4cfzA2CZ\nxbNhuruM7NPR85SD9oF5EjQAKhD4wLdSTh3IxU4oFp+CMto3zOafsvyoGxgN\n2tFLSxcMm6ZUP/XCvIXP/FxtVbp4zKYFgOgQ3glg5emn8ggQ9nD66aa412UV\nbTU4RYP8HplmWb8+nVHbA9khybmscm3gk8RkexA/mSXR0EwftEQMjVx1L7zP\nHgWp\r\n=TYyV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"08aa7697738c32aff4dfadd76ae767559f0e974d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.12","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.9.3","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.12","@storybook/router":"6.0.0-beta.12","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.12","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.12","@storybook/core-events":"6.0.0-beta.12","@types/markdown-to-jsx":"^6.9.1","@storybook/client-logger":"6.0.0-beta.12"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.12"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.12_1590041125182_0.9772178272719714","host":"s3://npm-registry-packages"}},"6.0.0-beta.13":{"name":"@storybook/ui","version":"6.0.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b1ea27cec246f706e61d1fbbbfaeb80485047705","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.13.tgz","fileCount":230,"integrity":"sha512-e2dWbm5h1VldIf4SuFNuJJX6XvZPhRMhQ8bptEqb6aynXe+ydMmRMD2I3nx6sFOtHnu9LZraNPgmjaJ7z+EBNQ==","signatures":[{"sig":"MEUCIEvDlsXHv+kEDsnd/ZVR9/kZJMpI0hr80b5/g58kHHhHAiEA64wyzum9+O1Jjq6ZESyw7A87QzRdbgk5ZGEAdgGinco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyBZHCRA9TVsSAnZWagAAiZgP/04ihItJQLJlCIH1Ss+h\niADM5lGEhyBQkQNSIECJJz8AfJ3Kif8vf0/lz03aincbTCGKss1FL5AiwXHJ\nqezELQf3u9AM82I0Rt6tl9cdmzcCzU0qsvIOo+XzsFKjvjsc7uffxrtZjd2g\n4KM0h4itUec/RjGsgIPVH5GaAYt5LK8VVvY1/UKE7SReZ/3saG5jizNBZP4X\nI7iKIbpa0VrCpPkifdxs5h9pJOAFMRzAl8ATexG+De5mmgwHQHbdiNWXYW7n\nMnH1czZ3XP4ottOgQ18aZwcyQwE0POff4vElI8iZ+LkicqOWd2bxMHZWsHMH\nuazWi42a/zAhHF5JExkXuULhjtiMVAALsNJUnXsRUEF1GjA3Zg584kExjALe\n/1lBuyfbLgufyFI0ZqW7OpzlgEs55vcH0nq/WTbIZbIMhHSBJYS5gH2ZgiAq\nAz/USAIn5fiMm5Q/5K1ia5gQM5LsikGW5hx1o2YdBenSerdZuxedwT9FaopV\nRnta5e5Bd00DAng3mdUMLE5TPGRjWVYWms1eCm/DuLexX0IxnH4q5NS+E7V4\nFUYLVz1AuwXOfA8mNb0uxPQ3foxyBeiepMgK9HWOgwjfFPTwRtgTJnUUSV9x\nMiyf8zALFkcRRVSNYCl0cyesrM1EgkUbaTqV3CjaOiqJ+WpUfzIMDZSvyfXP\nF0pj\r\n=iYhU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e9ba51794ee02048275694bf32f73a205b90ba9f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.13","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.13","@storybook/router":"6.0.0-beta.13","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.13","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.13","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.13","@storybook/core-events":"6.0.0-beta.13","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.13"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.13","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.13","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.13"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.13_1590171205964_0.04742804651965016","host":"s3://npm-registry-packages"}},"5.3.19":{"name":"@storybook/ui","version":"5.3.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ac03b67320044a3892ee784111d4436b61874332","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.19.tgz","fileCount":104,"integrity":"sha512-r0VxdWab49nm5tzwvveVDnsHIZHMR76veYOu/NHKDUZ5hnQl1LMG1YyMCFFa7KiwD/OrZxRWr6/Ma7ep9kR4Gw==","signatures":[{"sig":"MEUCIBIeBOgDP1c3HCLNlTVifKi0obuZDso4PPOuOoC47Q8LAiEA275VtBqwXDTz3e3xrdyHH3jmffgdzdJfcWnN1WAEP/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyfbgCRA9TVsSAnZWagAAogUP/jjadrpn9nWm+ymwzP8h\nxSSHTu1Bbt/jKq1TLL1y2E6Q0Tf9Q4ynpZzS5fDirmVnnLqcvfMWMyIE24io\nKYCExilUyi/y+cNS5WWage0X1XaoiQcCCfIM/r+1muIfCeVzxSNCfCIKYtPk\nGFwLLA7nEQfD2x+iXG1jVwEl85CdJk310sxqaJN9b10a7Y4I86RA7+Uqiri/\nOr1UNE8LyGJg5njTfvwaKuYT3XUAdBLCQiYAsc1DTdSpTXTUIcZs1k/rKSzk\nLuG8kkfdxFEW2ztXBHDb9g8p5XoaG8klEAE3dSGvcjIIaumKgM2e1lPFNEBV\nP+GIjLD9j585gM9Z6kyRMgbprQbkBbmGVnS7h0paz1uVU7TvOXjFW/FJy1Oh\nREPIRyE6vQnOByM4f7AX7pAv3Vco/fSGZKlkWeVFIml7sd7vKVlrszXew226\nc2ocoUxG+/2nBlFxidl001jEYh5nOihAJgsJc4WEy2qfwOA1tRXTjuZFj11U\nWf5NuMHExlN1XhoeqPGhtRJNC7kSzZQdR6sM+X1ouWqK82QuaFEl8KDonJlC\nRTr/JvebKZdoRcyqABMUwUIy8KdantMPjJFnMjyjumMpXNYReKsVJBt5tMju\nmR/hCgq3SROSh4lJvkZR3IaNtIKmB2EZXb0dWS6OpUM2vKZ3GU3hT9aggkrS\nQI8w\r\n=b3Rr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"e26136f29d99fdcec82a25689f0f7a10ef418fe1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.19","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"5.3.19","@storybook/router":"5.3.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.19","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.19","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.19","@storybook/core-events":"5.3.19","@storybook/client-logger":"5.3.19"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.19","@storybook/addon-actions":"5.3.19","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.19_1590294239608_0.27610600446641986","host":"s3://npm-registry-packages"}},"6.0.0-beta.14":{"name":"@storybook/ui","version":"6.0.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a5648b561480aee6b904a186c7edf4e909cdbba3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.14.tgz","fileCount":230,"integrity":"sha512-Ot8FRIkb7mmkDg9x46gOyJfhNUIpPLmrkpj6/BMozZ4dHHt0GuAmZVeOtAGe6OLLqUWktmwKoQYcwXyDVkmh3g==","signatures":[{"sig":"MEYCIQDWcOHduasvmMfY+5a2uTJUlJA6j06LmTaUkRADtM7PHwIhAL2LXSYkX9OmUw3Pik5yb7YcTUwKyzlcrACVFvxgfqm6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey8tFCRA9TVsSAnZWagAAgLAQAKF3YyiPVYpLHR+ealRR\n5UGm2Yv/mSbDxjlYLHROpkOBCSQrcsrwW6yr8LMYeixNZMABH/gtCyAzFylA\nxyh98r0iBKLJ66qgVmaWyOZoZtoL3Bg2vvFdFoE21LOcNvyOzxGcNC0dWopR\ngkOx2nv3rZazM0t7f99MTJHxqImuea3RDZ8nGKtbDa3P6NGjO9y59vXF8xLJ\nDxw076udHb3w+PNBMiQTsX0c3Qyc8Z6w9+sEoKO/r0GX57hyoJeb61bKmy9b\nWoU7B7eGWbRNUufWBr/pS6Z+4LXaS97epyRm67m9t832/3B3xc41zovFc6Cw\n4kxhs3Qf5Fwg0wO5OAQ6CqRxJV4xpketMu2PQfSKyQP0J4hauysUhpdgEnHd\n96RfC9Naf148OqPM5eIX72pizM7Ll1qdePpfZkUIbrS/vCbl84j+DqifDsfC\nk7MbVBdkViqLdaAfdtdYsF3n1U6A8u581bqtC3qDxJAFc0IaF5qEoFEyDkvV\nUJnfCaUQmNSXCHe07rAveq6QrUad8xzn435tL5DxteSHBOPh0q4CUEFb6YGt\nYC5OlhyphLaw0/gIhokmtqAYYrSkPYGQG/s2giTh3hX6LUTkEez0txBuBDdZ\nytroay/dn69G7J1LgpJSejmBWMWb9THhUdu/G0cJIjbwh8BOsONbUBAKnhes\nhAlN\r\n=pgXR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"852ebbcaa21d82876d41893b05b53277cb956cf6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.14","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.14","@storybook/router":"6.0.0-beta.14","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.14","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.14","@storybook/core-events":"6.0.0-beta.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.14"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.14"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.14_1590414149504_0.5876518874024304","host":"s3://npm-registry-packages"}},"6.0.0-beta.15":{"name":"@storybook/ui","version":"6.0.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"888ca9714072e4267a5045ef48448b64b03c2855","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.15.tgz","fileCount":230,"integrity":"sha512-LZtr3/Q80K5I7fT/gcs81ymLCiB8HdhfQr0wy6VKFHhcV12fbLPYG/g6wMaeDKdteEq8PeNYE1cpfeBKG7sztg==","signatures":[{"sig":"MEUCIGiFZ/R0ar/hMYA+Lp5HQ84nOVEP0xz2j7OhGuQuC+qbAiEAxslHlejOPz3obACjBGxuOvx1KFgWGMudHZJ5LuiLBds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezaKGCRA9TVsSAnZWagAAhiQP/jILrv+c11MZRJkpyUzL\nkp3qkSy7vbAs94y5Xq7RdhKboP0+AornE616rjT4SOVpC2uxr19WZkNxo586\nCwdQxTcWVM2MtdtMkV5bVIA9B8A0/3zgxPE899TcxsR6clCG54naKdYZ3a0G\nI559/4ccnWkUSrP6OgwngwQNU3eeUF72reCQ90zetKQHJhuqaTHK6LRNYJet\ns7ZPpdDcG8xzlVvnVI81YRqvNkRlDMa0kcSBl5n1lrroxrX7sxmqdrktl4uz\nmATbssa7g2NRsWRABuZOm5XZnbRCnKmUtzZSXoI5ptottm7WQ9oCi0u89hYU\nEcJXicqx4q4kp8+qTKPBuOHpcuk4sO/W3ntUL/tG0TvIq5gjgi/C4YIvN7WJ\nZ3TAMdwOGzElB/n07tZflWjTm/kygZvDjSNPHHNf6SKSE36rip2bXp259l+1\nPqhqYa0WpOy+2P7068MwRqELUooSgRhXRA7TySLXgoS54rjdYdWXguWVlPC2\nIaJd1Iauf+MeNgmJ6a7BVdomgzGIBBk7Nr+I3UcRSU56UNyzPhiV6z5W04t5\n0OYevDnWpztPJ+sUshM12jwsTCXSqWbJXOqpGUK/MRNBGOay/OFmV4oMYNS9\npL5aE5hdWYTqo6lSQg/Rvd3hJpmwd3nIEFEAKPiFYNyXD9KdI/5Hm7sEq97T\nHALY\r\n=JwTT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d30c942994c7799d81be568b3efb6f2cbbf81a03","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.15","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.15","@storybook/router":"6.0.0-beta.15","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.15","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.15","@storybook/core-events":"6.0.0-beta.15","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.15"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.15","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.15","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.15"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.15_1590534790002_0.005524376650196672","host":"s3://npm-registry-packages"}},"6.0.0-beta.16":{"name":"@storybook/ui","version":"6.0.0-beta.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"04a23c80e87a5be3cfcccb7c931e63a615df3249","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.16.tgz","fileCount":230,"integrity":"sha512-Wqbi7x4IJ7kE9Lb3yX6cMAiHKsdpjEGJlEW4tWeOeHNve7nljl6Z5NTLB4yhhEwaYOKAST+gNNP5Eyx/dNLuCQ==","signatures":[{"sig":"MEUCIQCzm6MU7VDbmyNe0QxoDHPq8PMkAj7tZaIfTTh49uaKUAIgQT7V2IuDRKZHfAiOonMVMPVvR3AJlyFA67odunMtS2Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezpVgCRA9TVsSAnZWagAAEggP/RuEApW7DF23Ii3+mgHs\noxSiAbkQY2aHxfRHO3dWx5Ksxh/u8aw33yuM3ZcNEoblH1r16MUzD4LuYjpC\nB5l4LAMtY+MprSgfZrgyORxdqvF7wY/OvtG5klIXHafvTLORwklnZNHDPiHF\np3CtMhJOBCmVDHqS/uDu2eqWooIS7bYPbhXnb9UiBwA/mm0IkXT8cYyjAzQt\n3MSqTyoo7mA/vMRzx2meWH3CqcnsJb+s7xvI1iJ8HzWHXzLy3ZONyN9FtE6C\nwG6Q2qL2BQh+jLjYpG+N/vG6Mh6psRzZGhFg/uJvUlmK50mHu8gnml0vkRK0\nuiKP0HoFdLfMMNOL67P2kjQiDfFuvOSzmi0MGPJfShplqko0EGwEykiyq02Y\neY5FPAjUa6j8z8cAN8HQsZYcAtbSHpDubygx1cqPL8sGhMA+KWvksI+OEVLx\noFUhwp2JoGiMlgrDRLx5uExtCMRaQ956ybu1rlAHxBVrmyYa7QOFpgSHEIOL\n/1cjMkGffL2JlZFxuwysLIyA3bV7rpJvkojtO0lpXX760EcNBaZfk2H5mTfz\ncqTdXfjTmBxg/VZuoR4pDt9LXate92FdjYLdaV8W3KHH5YfpOHD90S9rpLuu\n/G2U2R2jud8cgrq8OXFgJHoF8u/mjUVuQU0XFQCaDWIjgg14lVtQTtJfJPPa\ncsfK\r\n=zhZj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"816eb0f104c7628ad8017448c3ffc4addeafde69","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.16","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.16","@storybook/router":"6.0.0-beta.16","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.16","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.16","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.16","@storybook/core-events":"6.0.0-beta.16","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.16"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.16","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.16","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.16"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.16_1590596959897_0.5416466965568134","host":"s3://npm-registry-packages"}},"6.0.0-beta.17":{"name":"@storybook/ui","version":"6.0.0-beta.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8034ff6a08c3959cefa5420ec5b02df7dcc827e6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.17.tgz","fileCount":230,"integrity":"sha512-a69oU28OxXXTrzjwN37A9hXPUfBHl24aH+UBOeUkJCn3WgzO7Y0MkcP8bLTm+zP1m1JcuFvVMhjHRh8TZtpEIg==","signatures":[{"sig":"MEUCIQCewbM7FK88rXdoD4iwpaH7Fy9MnnyzfkC9tDV8BoRe9QIgKUQun5jjjYQweFjUW6IGuNrBU7NLttxkOWLsG2u6iXw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez0EKCRA9TVsSAnZWagAAyGkP/1pMc2MhzXg7KSjyoFN5\niCsz2RMFHNIrVfY2XtsbsSNQQ7HkRYFAimwP/w/L3KAD7lB7frjhyCVyXH3h\nF6A0E5un3bbkFZgxY6y7LbH7vrbmMEmZgjxWend3algQ3W09wla/g6Rx+KpK\nGg0qOTJSTLBMF8oDxEnamCJ+nxQusTcc/DVaLza/Zg01Mped1l0mz2EfHr2Z\nEooEQ60tPHGf8DVxAUPFKNt1gMMvESsTidUhipfsPXiD10DVRa9CvzZAjw8O\npxulGNu0vMLbYjkYz1abGXhsbaQy731NWTElPBVdxhuE0xRafWGS1rR979kf\nC6+Okj6g4hK4avky7jCDtBRrCnSYl/AC7Pa2cZp/vAgkoCM0o/BVKO4JWhPW\nImBa+0x4LI4IXdgsJVBfeRrwsjsw1GppqH8GQc9TkOAwu3pUjj57YJLvQIaI\n1uvG66+lBAmYpU/POJZQ3dxpgHTeDKaDaNu1woxAycCzyFFLuG8/fMDu1hyg\nbWLbxJRiBpW5IFX+TNqkGgAh5lcDHDLdPtEpdQNmHg0wLFjFlwQPxFVZt3DF\n27tYH+Y9vklSzXUinFus8ZGACK/fRTOM0kB6q6oVrKuBlwBNHI6934NlK3YX\nBDpCtFzoolF42FvKjpOigpT98GBXffOell39HTPoMkBW+8rQx6VkmBA7PZ/k\ng5x+\r\n=WOIP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e6bdd474387078d379d09a04220ea948dd31c750","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.17","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.17","@storybook/router":"6.0.0-beta.17","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.17","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.17","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.17","@storybook/core-events":"6.0.0-beta.17","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.17"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.17","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.17","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.17"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.17_1590640905648_0.7384074327544223","host":"s3://npm-registry-packages"}},"6.0.0-beta.18":{"name":"@storybook/ui","version":"6.0.0-beta.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"061261d87acf97670b57fb00d8ec7e9ad71c776f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.18.tgz","fileCount":230,"integrity":"sha512-eYlqG/a25HBSOkxGAVa1xZnwbZJRxKvctupFgz8riyhyO9z2SSNEpBk3FFFAVXzllojLGBc6pmQd50dI0plXUg==","signatures":[{"sig":"MEUCIQD6yzEIvjYTJzzSzyyb5KQf69HOjydZ8aDf46RtKRoOkQIgdsMAiRKJmtZDGZzb5X+Ib3msLbQ8PvL1rB1HRxAZhDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0SP2CRA9TVsSAnZWagAAoE0QAIBaiiJgDqFJjyt9ufUk\nl3V4lnBUMgpk+5LQUQ/7s0m8auItDYeXyOJC2ZKNAxepgPDGSHAi4774ItAm\nBnci5fQMgqhtJsV2YsrXaMGKHbnrGz6KnFXblN1S+ONU/pgNFz0k0IfP2HEB\nDlPO9Ezhh/TFmSwpe1hVOgkU8kj9C7GL9k54qqREt1w8vnb0x13pKnylfwg+\nURXvzmuHtJ37S3jYs1WEuCfeD0qLKwD7xIHHqq6Y1QJDYj0AyZrHFlTdBW9D\nrHJi9eYUHQWLWtXR6vKrmKrVhiuVrFsYGbQjckySUw76nko15CutdVMp6FR5\nCfbF/Yl6ngPqPu+7xMFaTpxogUF1HC52nw2bhKe3njw/O8hPEcggo4PGQMnS\nSoPuz6wN5n77QLHpeZS86AuuqmNHxbfAHK+waCdn8N23GZglTYxbol7AyPc0\n8waUKWT4GZD6gTbfuh7uHEV7osbdp4yQxbF08mzy8ztF9e2e3tzNNvWBGv/7\nn+IYkVi2qmCFpnu2HTH9F4HrXz3O/hBiLw/X12qBDXIdqVZEPyHb1ONgnwrr\nPFUjJscKVM1YHW6aNNEJwAJEJ3psnm0FSNaCUH3TWg4K2sN2QxTN1DY8xObu\nfuspEFN0dLCO23HW5yz/K169XrJE0sJhhaCUZs37YpAwLagmeoAIOKaHTnO+\n5Zi6\r\n=YYuR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"27f45503e901d8ea419e292547aae11d478effce","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.18","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.18","@storybook/router":"6.0.0-beta.18","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.18","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.18","@storybook/core-events":"6.0.0-beta.18","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.18"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.18","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.18","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.18"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.18_1590764534050_0.16197383275097987","host":"s3://npm-registry-packages"}},"6.0.0-beta.19":{"name":"@storybook/ui","version":"6.0.0-beta.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ba7d45b11e9ec0df085490a709ee0fe2a895bec3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.19.tgz","fileCount":230,"integrity":"sha512-yi6IvBqI7VL1ud0vB/dI4Iag+0MTeyP7umToLKXyObgpne+DN4w8TP22OK+2rReeORsf9IdW/mJf+guMG5Xcww==","signatures":[{"sig":"MEUCIQDipgApB7w0FNp4SGMKzPFDp2kAzlbMXVl4OfZ+hScPAgIgfQCAPiKiaS4sr5AgwyN394X/Q1hyB/B6o85HZCD8FgE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0WQqCRA9TVsSAnZWagAAawQP/0kfXjqd/NRZwz1O8fb/\nfVwz8EQIpl5s1TnijPBaS1rXMU4eBTkvxgTBfmOJA2ORDEiLsBbnmhUWzf6J\nxmcLrY7lV0MtnXYTje0A6ulWZAPlptBHcQ7gecgV+lFDZrK6n9gUveJK//XX\n2pjiEuebpcefoXinFBBqIRXzeceCa1E96+9Ace8dWigrWsLyRL3AjQEozB8o\n+GXyqFXQtWoniU4EEhGXDXZdHI9FcSx4P4XLaFIjR+5v/zH/0KJNldMji+XY\nG3kuzBvvfS36pN5ITDxywsY54M+u5sEeXONZ+6fBPoSOXkiE5HMNsgpurjw+\nsKlEXJIqI1mDsefGfedjjlk4GFrzgmFuvj589jiQwKiu1U9rKmqZ7UX/2rZ4\ny29IjSU/lETtzDNyNx23CA5Lf46boF6Fs0GSDJinYELXG56UZcXrcOhfEIrq\nmZe6bhzLbaX5K0K0e2FMKOw/kNtp+gyYJV3IifLc0YBO1YJSkb7/5zgX+bG6\nNN2x5yMWO8n9rQVE+14fUI+00LUtF2vGu/sVuWQvDx2D/fsHNWOVNeWJrlKN\nrsprktnWsezojtxQwcrPOExu/Uq0TFJi8b77WsAA80AJep90D6W5rIeAggcZ\nqlPiyXJzLTVba+ROUbbDldrsMPifhvkwH0DaZ3yerVKe/AOme7q2MzvFgNid\nOdJa\r\n=yZ4J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"57f818f5e630c148ff26ef8caaec57f5d50b4174","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.19","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.19","@storybook/router":"6.0.0-beta.19","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.19","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.19","@storybook/core-events":"6.0.0-beta.19","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.19"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.19","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.19","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.19"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.19_1590780969408_0.08754525801430302","host":"s3://npm-registry-packages"}},"6.0.0-beta.20":{"name":"@storybook/ui","version":"6.0.0-beta.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c227107be894cb3ee866b72caba50c593b8a3aac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.20.tgz","fileCount":230,"integrity":"sha512-jeURNQQKnP5LqWqVnm+ageek4/+GSXOUlcyfqrZadKBAO3Kj4Bkv7jFf4Vbl2FGBkyWLOtnTZtKdRAzHcCB2mA==","signatures":[{"sig":"MEYCIQCs3r29kfBjunkDDXNoNbdRuMuQjANSJM8uZWYLiyeKfwIhANY8yEAJCEmsL6VfrSsOss9CxryN1Z0Z9lPIbodGlt9x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1Q0mCRA9TVsSAnZWagAAa5EP/iUaIbA5/uxfFhPikKe0\nbGIyL5PfKrE8wdgckvQtjBQJcGJt7QZCa4HUByR3Wiv2WCk4aq9hrNHS9d9h\nXXTqfrAuc/nkn+DpwseS26VOgiDh/4+u8lIlFr/lRlK7IJDEIdmKuLYLyCYV\nsvVE5Ja4jUZeeiQTlSLJpRH3A3MvUD4ziub4mdiB6RL5/8efioYeZ4CQLEz2\nK5g6HLp4dTkrSwjLmUT3jwM78mwo2JIm3FUyTCrWEkQrfefN5KGQvVBbJ/PB\nLJqk8w+aaDtGVz+WBals7fJOwtf8zS5MBmXAHD7I3MDihef26f55KJiLgJ2h\nlJTzUzxoEz0Oz/XOjqw9KgzAtuwOLBa/Ahw5r3ytfsKeIPu+r7YUDO00718s\nmXeCXu3iT+viFZy4cbvZf8mJYKLpU6f9Y5NAjlLj1KaIvcsAiuuQrdVsTVAe\nFuGC/uZOztctCnHdVscintZxLDXzmDGfLIFWUYMEKjLFmfu2IHyij95w0CoT\n3wB1VO1FFebwiwNN48e48Cn9SdGVudVNqIt+GtAX/X7S+ezo0+12GSt2LTLk\nWaNlwtB6IZsRmiqK1JZY11LJnIdqeyVdFwbxRsfUVyLyiUlQ0taCvJ+yq0zU\nsoiYunTzDpe0apy9ctUaGGhyVjkyL+6lXh/+FBhLal68pNdb9tanxPhPoK3F\n1zdW\r\n=zqwb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f296d1cfa1c4d8a541df34c1c17af964f51c1b31","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.20","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.20","@storybook/router":"6.0.0-beta.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.20","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.20","@storybook/core-events":"6.0.0-beta.20","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.20"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.20","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.20","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.20"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.20_1591020838378_0.4320695161243504","host":"s3://npm-registry-packages"}},"6.0.0-beta.21":{"name":"@storybook/ui","version":"6.0.0-beta.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a1a411a4074b720a5b6292d7cf8196f8d9c7734a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.21.tgz","fileCount":230,"integrity":"sha512-rsrlVtGM4j8lrO0GgFHrKAQwB3mFxh3X6bEB/p7b+Ml7feU5HRgqW3liF1hvMLn6NIvkQ/VSOMROIHVQKXHzTQ==","signatures":[{"sig":"MEYCIQCpBbi7EB/YgfocUzvm9JqwO8jEYbqdSk2ULv95slkC0gIhAOiUO0M96WHyulm+S+r3nTHJstwMQ7T3JghxgxpuCeXE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2EPgCRA9TVsSAnZWagAAh8UQAJEKONfKsT1qoiU/IXfW\nqoT5uKkXv102Fpvaxy/A3Nj+BxQ+v/wpF0lTRfeQkxgz7pCD7zl8ggSQjcYM\nzKE1DgfrWWCDcWWIu6SHGe4yK9BIojFCWCICAEsZo6cZT99lPxjntmh9Mt4H\nJOWRjkqCHrombXDypXV7YC/1OBIwF55eXNrIjlavB4g40jDb+ZpPOSdxavwp\n/r0oVn7aezUA6z/0Poo5Y9YXA2+Y3hWYmNdusrkOGeBzCiUtAYqmVROoDiJg\nwiyDD3Ns69kqyUQfadvjTX56dawfwprg2b5TABRXHS9cgy+11KUtGQT4m8zW\nynmeMMsYhuan7kLHyd3G0YAYBKcEQF+ZUvCrJhXwT7PkWdS0zyj0T0imv0fv\nfARiSIkTb0NifhJ9j66U+5K0fHRLi+BKHP5CSptdAcJt+wEnV9VmN77SZCG1\ngjOw1sthkZJkzMdUU0C5q2KwP+60ystBzVYPjMIs4xWBw6JIL4XkW51ca4kJ\nb9wxaJq2Xi2qtX5l65Y5hQPLXiLaqE2+bWiSEJ7zh3Fn4pjsvS6EDBkoroxN\nNsY9HamTvB0k0a12K/TVqFnALM3722ahQuJ9ZCDMbJuxkctZGlWrE5duRm6A\n7PDPwZNaelSI+Vk8a3hKRrDRhGNkDiSNi2sXDS4Swwg1aPW9cCcoe4hI8TDI\nd38B\r\n=Xi8J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"93c1d0c10897faf6a357218f96673763c16e0f79","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.21.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^7.3.2","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.21","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.21","@storybook/router":"6.0.0-beta.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.21","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.21","@storybook/core-events":"6.0.0-beta.21","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.21"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.21","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.21","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.21"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.21_1591231455687_0.336162140710456","host":"s3://npm-registry-packages"}},"6.0.0-beta.22":{"name":"@storybook/ui","version":"6.0.0-beta.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"489daba2b460373ff320fe1334a9b4f81de8f470","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.22.tgz","fileCount":230,"integrity":"sha512-oiNzr6xTvpWBRx1F/4mBn42Owy3FQLRzPNiU/DkxHzIn6nG2mBI0AdUL1xf7M5gIXppkSrWYeT+FdP9VvSttPg==","signatures":[{"sig":"MEQCIHxjbxqbDL993fXDDpV5y5DzrYTnuINls9fldoPVp90dAiAR06bP+dJ6dPQwK6XPRwg1butzSDeFyZ2dh9hu+MaWdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2pcZCRA9TVsSAnZWagAA9OAQAJ3bah7wq+yvaF5Q4ljY\n9xNsTiZ3HKRwpzJoixVTxBMwaDUqiKBPzp4s4LK6n+pPQ1k4lXkqbKS471xU\npC26KbcAugwxKviPDUI3q+jplwKDg7Rezl7zrGNjj8vVM2QSRFlgcmSWPcNk\n6KPtWjKhwCg4T0p0kloi8XGtQ73smRNuZPThXjsrPuKPVkeG+vTvjsE9vqZ6\neLcKoYqZ1KSRTaelE9SsR/1iaEgJoXabik+AKykcDIhbrQErwrDbns2dqlnq\nD8hfReRMotz7qQGPjRE2sv65QpcIO0SBFYVEMiLuA8GK87Wm+RXuy5PcIwCj\nYLjEyrkpypWcegfwhWDfsU/DUlfFlGmM39aZg+FMtzblFLXsFLvVy7sLoQnF\nJKWoedCZYffHN/0Nxyf5KdFRDoIjp5QtEnspZJ2WAnK9Xu9+B2PRDdx28QqD\nFhpcIIT1rroB0tXhfciyK1aewRVKdy/bHecCgXbdntcBl6BrdTaVXp/PXrNX\nLlgvsVZtWmarPirDyQ6LLEGJFJI2dG/ZoU6PWtEDYul1I87tvtkSgmvaYBuB\nlyhnyRZl6/iSx3wQSwTh8lVLJDNLlJTXVQOfNGUYUEhMrVtzfB0b+tA3xf/X\nUC93uOa2yLoIEhliXRmHujmPT5yOwtdF7f0suOXaMSZXl3lpkZI1zLEsxTdR\njoQ8\r\n=bkAB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ff3f44f3a19cc628dcca5e36829eddd38b69ec2c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.22","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.22","@storybook/router":"6.0.0-beta.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.22","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.22","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.22","@storybook/core-events":"6.0.0-beta.22","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.22"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.22","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.22","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.22"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.22_1591383833355_0.39050079423492035","host":"s3://npm-registry-packages"}},"6.0.0-beta.23":{"name":"@storybook/ui","version":"6.0.0-beta.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8ffe06bee606e44f2405034b8b262bb7a50da60a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.23.tgz","fileCount":230,"integrity":"sha512-4Tw1Fy3hsVnyPZop6cpOj1YJA2yfeZitipsy2ksg+0a1r64CVOfHxC4Fuy5UQ5zjQXisCHBtCkY3rrkP8XeSeg==","signatures":[{"sig":"MEUCIQD5mnxIf6wC4t3XQtI/XP/qVuazAeNXXwRwoKWe4kdUpAIgHAAmbYiN7to4HZP+oRVAiCh6FqOiTKsk2kreIkyL3f4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":803532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3e3sCRA9TVsSAnZWagAAcXgP+wVhb5dfA23nDSDHOgIl\nBroRRnEOOe0+hTb4/singwBPMWgA26w/HOZeQOEeQ7SZxzbmekgY/66jU71P\nFE8TkJgc81kTII4d0+ixUL9Aa3V0Vd4Zfl+c5nTP2w5hW3j5wEc0sAZqFUWW\nCJJPknkP9mhWyqHVXzJ1S00SWT+UkflOrGUx2SLIpmW/w2ePtfnQnd/v0LB+\nMRPocFvMylULsZBZp3v54F+zxmOHrEsjv4SEvUZ7FY6xJqtEgTxbxlf84NqG\nN29+XCn/rZ7/9vfskf3eZEwkWpAh3L8/TQI1ostrs3m00PTaHYblBeWRqFSm\nO0WGFtr7vzFdgGg1cO+IK5JwyTXHR7Qhu1CXsCcnKXk1bO4SwLbkFoYtRGxx\nCpIrfYNZle49f36VZ1aBMXefdPQYGZTzqouw8lKK2TZbYtW0chAUSsBFeczF\ne+AfeAqCRdaJ73iF0SoS+JiKaKd7aj1aDpSJ1R4gFTaLDcgvEjcz2LH1MxRl\n1gH16LWmYA2OLgQUrjIHGy8WxhUA6R08ZJ034CQJQFDNrB5kpgMuJ+fNlIx6\n3jjE66kTjzlalICMEvKRDKB9ClSx998+H07UH/8EndazQfTl9rO/v36Oms0R\n4LFATdgr2kp5Q/uMcQtx/c+a26IUolsXeBd39bj287b9AavCiYqvOdsjqYum\nej7i\r\n=9Rxy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"dc89aa17376526101c1c7a98ba27762f2decdf86","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.23","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.23","@storybook/router":"6.0.0-beta.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.23","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.23","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.23","@storybook/core-events":"6.0.0-beta.23","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.23"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.23","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.23","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.23"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.23_1591602668163_0.3999928784797375","host":"s3://npm-registry-packages"}},"6.0.0-beta.24":{"name":"@storybook/ui","version":"6.0.0-beta.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dee9fa68713e11c3500fcb510d6b9e44f69bf54e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.24.tgz","fileCount":230,"integrity":"sha512-3aukfLVYfJ0H5gQLI904UzwDyzAeboBsXjMeMSkeULwlAQYVMUy8UPJvJu25REa747w5uXCTS7h9VPH9jlASkw==","signatures":[{"sig":"MEQCICfwTxBCrRRlPVpK/AJhS1bkWdGDdcTLWAhSWiaIHBblAiA9CUCAqPzyZ1z3WZufaJR6wx/dkgKAYkPihP6IHTxRzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":802234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4iuVCRA9TVsSAnZWagAA0Y4P/0tVv2dr9Hqkm7BcXF9b\nXcWTzBm2rG333XwZhWyv8epoA+nHwMjXEoaPBHPypKdby2DXfVR2iuF02HmV\nZf7jkmAzFVjKu/e/Z+wVwpMTvJz/MBqfTyzDszGVaW7NzFQ+LKfeyK0LCFvL\nyJokyNJS3GdJzzgknzgP0a7kfovho1hdYogI7ylkTo4zmqQgxH9aFEBp9wOS\nYU+/emT+sBZ3UvSUhX+EaigtE8R051LeoqH7MuIF38Gd8jvJFXnOhRWkBdz6\n+8Iwoi+3WPmfNuA1fSwPh1FnLRSDZqVDeG4frWN5Sf39rDPnEeA7NsLNmWkZ\nkHwxfsXazWbKMV0r5bSQX3IGkO+/Bqiw/f9bgKu5TVWbDYYTG51hHprZbtc2\nIVHzs4IcxUrZq/0jPbcsc8VhOoVgCLEpOznekbDlK4qd5wpdBUgT6l5stEXU\n7mSEE3KdYYX6ktjxuH2GdHMl28bJDqj8WQA2YlD8nsczo0+YE+sOuhp+RKIE\n+wyjU7KKArJSThsLTkNjFpe7UXv8pqLVJMpLq1KfaHemqt6GjjHBHGEFI6EW\napNZTc5XVYYyhVDWMXDHN1IhEogdN7lSBBrLhii6Rb59/rjgcwvcH0JGf7TL\no9WOCRRt8nMqUHgOmzjisUBhaw804xx3O22l6Siclmr0Y4+rFbVNuG764HhH\n1eKS\r\n=vDU4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5ab2b41f23d8ed466e53d307eb8ae00d7f319198","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.24","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.24","@storybook/router":"6.0.0-beta.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.24","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.24","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.24","@storybook/core-events":"6.0.0-beta.24","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.24"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.24","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.24","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.24"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.24_1591880596311_0.5955691489292483","host":"s3://npm-registry-packages"}},"6.0.0-beta.25":{"name":"@storybook/ui","version":"6.0.0-beta.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7aa856b314d2d848685b4832c30dcb41f2c3ec56","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.25.tgz","fileCount":230,"integrity":"sha512-HSrZhiwU7W0ocOY0VdVD+zpD2gksSaqNB7sW39PyYU534SfuxQKrepReAaiOtDLtq8MgpgJq886pf67QwHGKEA==","signatures":[{"sig":"MEYCIQD4gJsQi1sLT0VKEyRPclx+6JtlD5esUIJwP4mGazwjIAIhAI2wLsgZLfegOK52swgtgKq9g1c8pEDubP0oJJ/rDVOB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":802234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4jCuCRA9TVsSAnZWagAAoGoP/03E/+tbJ3+/8WdG4vYI\nYKuortkwwcNBpq/wHCjHC3sqvONH98XcNAF/3vH7ZBl1WbI9bZklOYKPJ83b\nq3FoBUzRZIUsyIXqHXUmwCyVA1btzkri2B1PMWMzBVmUIi3sTEXgVEi92H5X\n35gdK+2EjgYpUj8XFyIdrGK93OXvAxBY+FTAEWGux38MbqgHDLOVUTA50sL5\nToxYCzMB2L8y5YsuMSVKllcyaUw0XmE433w/CZC/VUfE/LdF8hsCu01HiokJ\nGhK2+D0lvGrqR6Yc3REn3WexYNkdl7LvsQUMJ9zQ1rg87r7kMiFXaDjflfKd\neOp0+//5IRSAIz+tLHTI7szeOOm9gmXRYioGmgU+mKKOVndZKUM5V0GGA9dg\nMx9f6tDSdCKwmxtOgmGdDv9njxT3MdMaP1FGvkH2FGZg86zhBSG+pZhkYhiY\ng+p4BBVGIc68GFFqCGRFTGATYpqdxcVjy9pMouaFpPtIx4D17Qxnyly4HKDj\ny/WlnstTlW0kVLOa7NahsSjHnrMbiFfgP+04Xmul0hB9zzayik8bKl3Sbues\n7aZ0RV5XOsBp6nLvIWd+1Y0TK1PfGbuGr4QBPCNcGeJFvakpcdzZwONlCiyn\npBZ1BFBnAU1htXhik4bDWJ4QLZtjZF+bnc3IxzPWMe5GDgMZ5HOCTI1H8qxU\n2Zb8\r\n=FJw1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0f2b32b890bdffc055625e5ebbacb11a4fa07e9c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.25","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.25","@storybook/router":"6.0.0-beta.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.25","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.25","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.25","@storybook/core-events":"6.0.0-beta.25","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.25"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.25","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.25","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.25"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.25_1591881901859_0.4856915767066101","host":"s3://npm-registry-packages"}},"6.0.0-beta.26":{"name":"@storybook/ui","version":"6.0.0-beta.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"718f81c97c946520ff539cc2f5faf862e56782d7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.26.tgz","fileCount":230,"integrity":"sha512-Fix4kIN7rT07HjKPi/T4lwPGK5aqa4IhDJpXA+Pzzsv6Eun2X/ew1cr8WB+IIlHIkdV2kwT54liaX3G5ygWmUQ==","signatures":[{"sig":"MEYCIQCEo0xEhK9c9UQTLD1pvQkvTkTVsbA6kP9RL65RHRmG6AIhANnzAICLm+yYUqmu4hKfWHqOT7N6tGIci+d5nKveLBNA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":802234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe409TCRA9TVsSAnZWagAAoFkP/1u6tclpv0UNxE5PiIYh\n5cwfnniU7wTkDidBeQxrMhZKVVWgimFQ6HjwqmJJTbMeQedrRf2ts/W3wA0e\nlS2jtaHWq08rPUX1OnFDltvYw3gF5S+3Aw+JX0Tre5WVGn3lAf/YnhDosgce\nTc0Vau208Zr9KNmI7q7rizmI2Yy5y+F8OLIJWtEO0/UDJiH7hrHGZzpNwMu9\n8v+bP34yeb+uja9g0Wvko8AcAF9OdotwYI7Pa7yr1uFOa5RGS7UGOACeLLAb\nXnOJP7krILkpux8h0LMUcC2bWoKyVR91TVLr+yRFMaENB8I7IefOiBHrf6Ox\nCM9bLs7Jodm+KFw6oo0OvOTWWy42dkL2UXiC2YF/ui6BCf3EbnbRG8xnQm9l\nh9p3N8FmqO7VK8UfeBGR6VbG6ybFq13svyZPt+129tWFGHNVmmO5dCRvLVtm\n9zGGU75EQgRnREPqotuawtKopIHiH6ADm7CdxPW3bXpHbtIFxnXhuj/kq9Qw\n+FV+AWTXhTGjzY28BhDaUbhZAe9qXL3oUyLQpfceMpiR6UwZMqlsWZ6T+Hbg\npfmASG+84aOg5i/3KpFnLsD7z+bIC+74U42SoQUDZLt53GcBt9gWMnOl2BHT\nZbpzD1wYIeSNPjL8lAB62kQ86L1jrxE47ucpfgTDmRCr/NgWGyACbI5ghKIa\no8xr\r\n=qKMr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f0d017581007146be87a10a6da3a478d9d23d388","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","telejson":"^4.0.0","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.26","emotion-theming":"^10.0.19","fast-deep-equal":"^3.1.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.26","@storybook/router":"6.0.0-beta.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.26","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.26","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.26","@storybook/core-events":"6.0.0-beta.26","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.26"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.26","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.26","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.26"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.26_1591955283110_0.7358315988969897","host":"s3://npm-registry-packages"}},"6.0.0-beta.27":{"name":"@storybook/ui","version":"6.0.0-beta.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4656c7c17e185a3586de8bf0645c863f2c47b402","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.27.tgz","fileCount":209,"integrity":"sha512-MU8xkHou+zhMDorgDCF+Fj590snpkxG0YtcUWSMjRGcuc6pPdCO2HTrQI/Z3OahPKbLkd3H7v9ciPEBrCpmTGQ==","signatures":[{"sig":"MEUCIQDldOpzBfyARcZ1lI4UPUd9F+sYbWMOdaQMmpV1doLCmgIgGg9aurEMRO2a+6JI6htxMkP+g1w/2B241fMiNGlI/eE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5YbfCRA9TVsSAnZWagAArUIQAJNYCKSFLyV6KUX8+nHZ\ndYGyxHommoKqGE3kzdJ15SRDRsUaknnEJA4BDrmsVdSs5tNmqNYxjtsZIb7C\nQP7w9fPp2Dk5KcMB2347PCij78CF3J0Hsk/zA2WIaSjjGPcLv6D/pumGEbXR\nSAmyXi6JAVUQeFTVRENBNzLwm+gB7Y4Tl6rphjnBOJ8whFMCuERLPUd9kDRU\nkYJ051CJJ+I1xWQBlkMqMRC2AO2Rv8hnUC3nn0szk3kcM+lKKTOksOR4jIhe\n065jPLMmkkwMLF+1XSTw1zf5NIjgyx3bPpvw0LYCppsPDHd4TOAIHgilm+Da\nXtj+d4VmP3SGOld/hdNAmW9eJly8WJLCu0KUZT+BbDqXZEofTmT0Hb3PWm0q\nFUmSdJzCoLx+dH61SMSQFU+ebGrdRpRNjSXd0U03Go6oSI1pM72TmnUhv/Hs\nVcwNEgejtCXRNac5mSEpYKkCjTgNJdnZUuMc+lLxYuks7YcUSiSIyFGnvh2j\ne9yiU50xq2SHemHssWtEc7Ok/XlCuvhCn5cQgL2J0FNjY6OSCBSrCrAYLm/1\no8QzkFSw5eIHTe1gVno5R9GFWNGBZhf/NNfXqFL74s63U8lkyz0SdsEwtBUZ\nMu2aCloovpflVWltofshh67mZvjafzl4EWOI7E/kYrL7q4h62KuvfzJ1FLFD\nqPSe\r\n=Lb1h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e8ce8fa657802689046a977c49e23c965ec815c9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.27","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.27","@storybook/router":"6.0.0-beta.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.27","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.27","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.27","@storybook/core-events":"6.0.0-beta.27","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.27"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.27","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.27","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.27"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.27_1592100575016_0.09867534856566818","host":"s3://npm-registry-packages"}},"6.0.0-beta.28":{"name":"@storybook/ui","version":"6.0.0-beta.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"03e9f2fa0be53434b380ff0a37a30319da1e9e28","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.28.tgz","fileCount":209,"integrity":"sha512-9Cc7zQqIIgRvxnn6VbZUvHcjQwJu1oSfAe+2EZGUJIQhkIM6jrVraSq7mSqwUMDRm4AuUd9D1A6g5MF5tTvGnA==","signatures":[{"sig":"MEQCIAe3d9PqLmDQdgYJgs2Zhc+CQRqLX9XlxHTPOUVelHvOAiAaSnf5+AVK8gE3Pv0ULGy7FsMXxXVxGCVG0nymlcOe0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe51UPCRA9TVsSAnZWagAADTgP/07FV9qLLgpETaMK64U9\n1tbBIuywyUx752GURCn6bXPfANYJrVaiv+U+GJxHgDWHatpje3/AldMGP/3c\nQJ/7zMU0nVf4/7OL6tiXV2+UHRzcWtPV+MfNFLCYP/fknrs9bdbyBvw3M5LG\nS7MwnICThPgYs6atKy1/c5oeU/HegZJj++WIJ12/WscT/ATRzDvhWZCAG63c\nCiJNe+vWqvi2MBb8ajARs3q9SVOnRwL3jhJWgdtq+47K2QVk8ZwaRKACpaHa\nEoUK0mkm9NspaZOBfByJb/3SwcPk5+hfuEAB8p14GFXmz6f0ZGK6eFxB/kha\nDRC+LRRGAsdIoAVUmmXnNFtPq3I+tZjH/MB9ai81E9MH9jt1sym7QkqvpR0Z\nr9XTwBw+2OOHssoFSMf6kGkKjWUi93mB9gW+FOpK4xajObx5qu1y3veKcjAy\naWUO3Z0jbj2ObSfGwTQmcydEQ8iAUZ9jOiyFyi9HXhvrocn59GcuNFZQWAif\n/z5zKH0eChTPBjDAWdOdl+FX6VsCeVyNgdVkV6L2vuoVSgf/iNx4/OaWkTAI\n/If+qeEFX+is6ezno4UEMhUCNWEFFS9J8yS2dErrliBeRRbxCPz3PaYEeQ3p\npveqXOV4GrHdXbiFaPwL+8ZiMqbPCux1PSERGZQLthons6IhLPBzQ9m2LXBv\nmkeG\r\n=+bRl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d57ed7541ad97d3ab775cb9091125fcca8b1c1a9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.28","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.28","@storybook/router":"6.0.0-beta.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.28","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.28","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.28","@storybook/core-events":"6.0.0-beta.28","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.28"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.28","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.28","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.28"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.28_1592218895255_0.3194549919240941","host":"s3://npm-registry-packages"}},"6.0.0-beta.29":{"name":"@storybook/ui","version":"6.0.0-beta.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4e1e9a907c0724229f241f39eedd99919ae20056","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.29.tgz","fileCount":209,"integrity":"sha512-P+yDhTGJWKXnQIoILL1/0HdKdJ9jwIYyUC7UQc/nq3oFdB4L7npEtZ0qLH49X52aG1UhPjkS3ysTG3aA89+J1A==","signatures":[{"sig":"MEUCIHMdSk2tAoC5Tsn6n4OFbvaZKo2IdV66adrSqJj5SbJEAiEAv2sTXbnYzAxOHvtG4XhmSnY14UF3BPcXDoVAUaPAcwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6GKQCRA9TVsSAnZWagAANicP/i2jbFUgr1vtBSNH2sLo\ndP2J/t33xA9Jo7M5leYc0uqTCz3JFWu93RsCZMfC68DbSmD/etzNN4QBIY+P\nItZBul9Mbt6jGX6tMn2e8ueliAzRj6RAkBfSyF+UXtBqDAo6ZvGeBos3PpP/\n/9lXCuai2GfHIynfXMh4QGYvscAQ69YOS4hBKpoTT/v1/eDIql5dDoC6fLLZ\nUzjpUMSa6aWOYi5ojF7Iqt3eWaCBv2KUx6s34D7cJ6K1Zr6sYhCLMbA8Ufh5\nOrYBYCzmbr5VLywZLQbR+0rb4J16dAHtYUvmS/azh0jTUCco5EfzJNviKDrX\nk1nEd9l2dUZtSPxdZaJNAffQByMWh/vRtak2lqCDxjrFjO8EvzIlBWrEj8r6\nfupuOTbBJOJfJ04H6roSQi6hCatz/ZrlsXmZeXCB+uKfTLhKwvaKcLwHMgIQ\nAc9Y/wmQoMXomPZXZVtlvfRLnZXZNHaPZbbiCCS1zsvUujKTM8s6JH37xIIy\nMrsGe8gs9Gusya2ce1vVuntmkCYrFpP3+ZgsjF9tINYLkqFdF+yxlFosRnco\nWsbsyQ030IAB7ueXR3caCXxmqusikacU7UuXULibEAUJxTsHraYGYP8y1icr\neJUeAWtr4ULkAuIUFpnRVJBWdeZib9koXHXV/pjNmaUvyTMP6b4Bo/dMJLqU\naafi\r\n=oVji\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8c0146ff03aa4e3f81b5292f2e2a63c215192040","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.29","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.29","@storybook/router":"6.0.0-beta.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.29","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.29","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.29","@storybook/core-events":"6.0.0-beta.29","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.29"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.29","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.29","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.29"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.29_1592287887575_0.5473995755516821","host":"s3://npm-registry-packages"}},"6.0.0-beta.30":{"name":"@storybook/ui","version":"6.0.0-beta.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"898bb928b192129485ae83e7f016bf443951e8c3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.30.tgz","fileCount":209,"integrity":"sha512-FCQ+GweE57KO0Cirk+nSLIRjszGwQVD5McmYDRftC4U1mtko4bHwJeIAFnTWWlrLVPCIlfYbnXpcJyb3rCM6JQ==","signatures":[{"sig":"MEYCIQDUrOEursKAk1gTXoDw+2gPf0yfVL9DFoKB63CbEFKryQIhAJnYeUK+8iVniUCRA2NJYLAoSS9K6gR6Bn+TvOZxngq6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6NpeCRA9TVsSAnZWagAAS/wP/0vrgaRFV2gl5DxwZCpY\nsxm4I8ypm2cZw3cEfCNBlruc2Y7eGgwj6tNgoFQQ5zlukLzluUStQ0/akdi2\nhSaW6H3ElAj5oD5d6LE5ftQ4kG+JxsOYHCCzJ1Tnz0XorwFo1minXhLTEc9W\nXOAWh90ReMIVaJo3Hr5CLJoscVopaS1N7MDcIrIZ0ScTcwll42iTNGCs29mR\nyxTh0b/jshi13MuDQhQbAgp2s4KNrJ5RzFjwlO25lFPUKf22rVRXm9rHezDY\nrF/uAlsV7BIMdwnl/msAUfUZZCW5B6V9gmXzODZBtV1MhwUri4hOPb7iX+F1\njxSXdvomo+wOs+joddX+1DmHq3uLex8iUrg6x9+dOU4QNzVGaQjQAH+3p1IR\n38BYPTGBtcJqQgg9yEtW4Jb+9AjP67LFWNtdW/+8X/Nfi9trblBqHG4SLGRD\nClu8sM1NG8ZumBGTYv6H/HAk4G3zReSjkWAnxNKwny7aPRo0aMa/FHzaV9a7\nBXhlLzriEKxdOXa8csDZrhjklOd/0Mw2Vs6VecozDxhXaADmyEZVOzZQdYlZ\nb3c50T82f36TReQvhfdH3ENIsHMAqTbwIAUKf1S8Ljl/YeOF3zyis0BjMJVF\nTo6bGggwrP6RSE7y4ZITkR3UXSYSn2tFtrqpCDtddpTMwcdAIB7aBW4aB1R7\nxo1x\r\n=SHCA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"90f8bd39b47e447f7e4a1be73a45722991a24ae0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.30","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.30","@storybook/router":"6.0.0-beta.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.30","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.30","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.30","@storybook/core-events":"6.0.0-beta.30","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.30"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.30","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.30","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.30"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.30_1592318557710_0.43878122438442335","host":"s3://npm-registry-packages"}},"6.0.0-beta.31":{"name":"@storybook/ui","version":"6.0.0-beta.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.31","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"70ab9c6b865a0f055020705908c4a9420f2aed26","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.31.tgz","fileCount":209,"integrity":"sha512-gT5YIDTXPZcp90xLVKOtx0/zgFRmN91suvhy1lWvF7XVXVAJs6hgwu7uWJsErojZ/tXoETxoAZfjeXangckf9Q==","signatures":[{"sig":"MEQCIGqQyDTrvfrPEa8KrndmI6sZmhF1dGMdOGSR74DIGd7tAiBOZeJ6kYqs35qyX1WcdCldlJ897QhOc8WFJOgKQE7lBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6fmECRA9TVsSAnZWagAALEkP/iYnRvrNLkIvo/AB08yu\nJFBelt50+XMvptcuk2O9Og8E0OdHaLV6XqW+WljXYI8IP+u2njfonZ2WXe7v\nMStgEvy+gSeWrCqoB+1GDSxuVSpqEXRbPmJmHNrH01TO7Cwbhh2SWsyNxyrw\n+kRMdwIVhQ9gVZVlHcfWQPor53GEBmV4jkgAB2qrHk4a6L0fu6uQWQjMS2f4\nglqTrsO9yjvUr2VV65c0/kSHVGVQZp9uuxAD/K6hrqXJ7GDSlnOft/Cg8n9M\nvYl6Evd/yzarYLT6wV4ofNksCRF3cG/C9Xe+QU/t65EZgj1J/NRHuBiWPwvT\nVtRzy67WZGn8QCQLs8u3pcGR7UPjosyMjiv2NHhUFzwC6kdoEY1b6WKiOdKM\nM4NE+wVcqZCAWA03H3L/ueYgsMZJ2a1+Cd4rdCDYVH0m9Z4k5ftW7ckAyDo0\nikyWE2y97NGuCE4rb83t2s6I0048Hft/zgk5xEahNHEsNwaWmqgcj1GurdCE\nR/jCmM3ogvB0tKcQ6YuDz+xUHbukNzn8eEsUwxkXRFp+NDR7YYYVtk4Vp8vf\n+0UzRtfiASiO5SiY4MEZ+6jPf2vvSxPydFgaCD1KeIj5xDr0VastoUmaqdYh\n+YtIgi2FsZi57d+EIFGkD0edbnQ2CRygGGB3/AXTht59R4RuSApvUmeJPBok\nn25J\r\n=80Bj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b4aa5d2a2804cf5dc163c57b4c8caca1a82186d4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.31","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.31","@storybook/router":"6.0.0-beta.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.31","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.31","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.31","@storybook/core-events":"6.0.0-beta.31","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.31"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.31","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.31","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.31"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.31_1592392068351_0.6012089709308397","host":"s3://npm-registry-packages"}},"6.0.0-beta.32":{"name":"@storybook/ui","version":"6.0.0-beta.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.32","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9b194ef20afc154d526fea094b9431791c1c5960","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.32.tgz","fileCount":209,"integrity":"sha512-iWId6bkGp/4Q6qi9AjE/lKYcUu2NdP1AjD9mAxVv8lX5L+T0NVnd0KC48N1hrChcB4Emksp7Q4TAxbxGs8DAig==","signatures":[{"sig":"MEUCIQCWsXJ1yL/sri7y5SEugYGX8Tvi83y7lDstrMgZiq8SegIgT+4s9Op0s1F/tQEuQ5/XJs2lPsWMgDv6pckqrE0Uqk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7L6sCRA9TVsSAnZWagAAKkoQAIo39nTvHlF58VInlxAu\njLeUt3b+93ifPkAXcNeCIgXkF2uprPZAqanjyjXRo6+ivtTLqqiyiZWqJR02\nNZJkjmjjk8NIt7DPu0pb0oFmW5S4K95BBywettt0A4ARM8eLthKZd0yJsK9P\nlMmf+9lezzkQ8PCAfp518561pFu5ellNPABqcW0ue9f6u9uyP70yiR3FdOJn\nwuNcFtybiK6Z5M8NOV2upr4nCYC9yrjMTadpfLLn8RTSTNxY2J6bFdWVFTec\n7kMnnfQXgAKK6QsHw/ndqxvb2qnwK85Ji044XJYD8B/SIAUuRWQ6tlCwdebf\nQlascO/TC3sEGvRdpoekHRTumh4/g+2VkVIv+9NgfMxL9sPmCpOHPyNeMVh9\nYdqqyrOro0Sn9S+BtCRZ/+lkg2N1zCXunjwcmTmfKowWlK0WfGRyPptwhW3i\n7HvzTQU+HQTmCVxEHFhVxKhgwmPCvHMzoNdsuR8D9tgWhJ4bYbqnddjEqsmd\n66dT1g100H86oRje9TxUumaMeV1mfjJbvxKQsM5ab/iY+d/YA0FlcrZNgoKG\n1MQ2OXNyWy7IAPwqTkQNnX1kalPCtJPnpNO0lzXUuqlQxvRYeU0ZZoj1pev9\n04iqZfyK9kycAAG3l3ImtDtnUbT4ZP6ysG+9IGL98Mv8W+B6NURNGIGZ+kcM\neT+d\r\n=8Tko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e704e003bc34586c54f368553c954e06900bbef6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.32","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.32","@storybook/router":"6.0.0-beta.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.32","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.32","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.32","@storybook/core-events":"6.0.0-beta.32","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.32"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.32","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.32","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.32"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.32_1592573612557_0.20349591946223677","host":"s3://npm-registry-packages"}},"6.0.0-beta.33":{"name":"@storybook/ui","version":"6.0.0-beta.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.33","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5eaba2027b8680a6d4ce01dcaebf4b631b0fcbaa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.33.tgz","fileCount":209,"integrity":"sha512-AYIRCdLkNQXb35ut1xJ5A12H7jP6Cy24OfC3yXhmFu7C8poykK/uBM/TNqyFBuiYVsVApSuL40PW3x/t0LfWKg==","signatures":[{"sig":"MEUCIQCaVuqN5epiwTlcsv16GNy/XVXstPmgn7xegOoomuSRmwIgCHfCRQa8l3yNw5BUQhPKkK/tFxRQWeRj/QQyouG8+6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8B11CRA9TVsSAnZWagAAMVkP/1p9bABoLdR/gXbVuee0\n6v24G9bYkezJbnyb6PWDvQtk+bCZSKBrHjAHNi15REmR5Yjfi9euJHgXzhfG\nTVLdA4r1v1tTk4wgIe9FFxNCKbiQAyMfeTC81lWJqePPzSd+hCn8dYBPTgs0\nIMtKcm2VBC8iysEz1+AOyLQnhmidBRRdICay7jdhIrHQ4MYS9NbWmPCHRmwE\nWExwE8odTTsSe41C1Wz5FcN5Xoip/mX7RozMkSCxlDJ6kKEwzHJdRzbWBJze\nj76cwhs2LfzawYrIQDMa95sxkSatT6nRRZz8bA4KouiZhIFBx4hyKr6L+6aB\nWQWdIjTnhDF2ST/U6BZJlAVGO14an5v7RSeYxFuHfTz0u5IJCHL5zrKu2CEY\nUhgp3n7ossVnuBkO3hK2d5rPkvVbrD7LHTlVzXPzzL3eG3Iup0CvC6kTpel/\nvev2Aya1lBs/yN8gJhhrqlCTefIsRkv30NHJ0kRGAmcedzX5evK8jM4VtQGS\n3sLamuj2CgFibeFnLNUlgmU4nsAIAShDWJngCYaOGYYeiqyP2Roedn1c2520\nIb1LabxL7z0N1QTr4rYf17s7lwx5oCyl7HFqncR2HJHYxOKMNy6bwLFgU9Xc\nXlTXqXASUkg/o3cbB/uA03ext5SOIDjlvPZcfPKNTBtpIzdkLwfkJKsgBL5u\nrsgO\r\n=psfP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"15d087411bcfd88155215edf0dcfa88e35d800e4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.33","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.33","@storybook/router":"6.0.0-beta.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.33","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.33","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.33","@storybook/core-events":"6.0.0-beta.33","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.33"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.33","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.33","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.33"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.33_1592794484719_0.6771134535776004","host":"s3://npm-registry-packages"}},"6.0.0-beta.34":{"name":"@storybook/ui","version":"6.0.0-beta.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.34","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f626ed321069c9e1176afb5ab823ad308ecc66c7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.34.tgz","fileCount":209,"integrity":"sha512-NG6YzZXeuOYDRAl2y4U/6pC5/ibxBZTikJXxmRUya+b6ENH7VXdCOlJSwEOtocdqewC8AbMeIEIQ5zOF6InTZw==","signatures":[{"sig":"MEQCICZIBTeoFfW6jFiGI23kYUW/GkBT95j+mvzlH+RHugVgAiBT+scxYotuwnoNO8j5jkhAo8ZpZ2N4ki9lo/bg+oTBNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8iRnCRA9TVsSAnZWagAAh4QP/22P7EvGz3PamioSdePT\np/2Tx0fQeUegASGYjDnLiBAwgzV2Kc5WYMDJeX9PIITc4rG4jjByVKMu2Ttz\nQ/hVz2nCvOHYdbNn2PBp0vd8/qQBsCZIZUcsztHXAWNJoJw/pqk0jXf9VPik\nauEdsPR1mQEj1ejJK5mJGDdGztnXcMglG2+gkW7RdmWNExPwRsbp5kQ8tOJF\nuQkAcPDcdOOZrt7DAkvmbWN8g8IlMNDSt6TGKAAsRVMLlMhZJfXtu70d7F+h\nhk21RUm26pXP1IyS8wHACeLskRc8I1ajAavv+Kg3mJK7vEqI3+LWhpLGAChF\n3p8JoNE/VpkuCJjGrS1RAmbuJDd4x7e5E/4FnWEwddCDPIlvJIFnnzaSJO06\nS8+9IbA8dyWCTMVvgLnZZG0XK80QREPykkR4mo46+++y7dLEANFVcPFNhowr\nkcj6pT/5xpsL5g73HNe7AdS3xshLl3EHZu8lxjJBSij4vy7oxUtX0ObBwYqS\noZmKOgAA7WIZTPwgm+trHg4XrgHE/XLSIobeN+VXuhuoo1nLBPxDNvgOkvjE\nOVx3tuKq8x4OyIWdGHJmdQp+RSeKDO7yNMjRPuvTR1W3qaH5fMEUFexWicbz\nKrX6zfpCu6wdGkiYZDHPEThx5rmdpJaPYRb1wQGvYssIxLZRq9Sym4ORU5YK\nnIWa\r\n=hBp8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"16ddf367a2e90341d6787d892542ca12d4c5eabb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.34","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.34","@storybook/router":"6.0.0-beta.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.34","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.34","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.34","@storybook/core-events":"6.0.0-beta.34","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.34"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.34","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.34","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.34"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.34_1592927335313_0.3128706229082814","host":"s3://npm-registry-packages"}},"6.0.0-beta.35":{"name":"@storybook/ui","version":"6.0.0-beta.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.35","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"de99d03d7bef0877e8e950215221dc9da3d375a1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.35.tgz","fileCount":209,"integrity":"sha512-iLOIOTJlspkgCT+uY+YMbwrHDAvTYDaCUxuUXwSC8ILvjz5jIcBUysSfv9NnBaKpAU7iJfzgcEIGrDmz4LYdGw==","signatures":[{"sig":"MEYCIQDZFsVmHYQXQOrypZdJd/s6r2h0ipRd+RhEwcNkJph4WgIhAN56+cC0d4rW+1MoYsTDewPcXoLMxKSSgDFS0MtmvbVz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":713593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8x+OCRA9TVsSAnZWagAAwrsP/1aBHDqfjVJnezzVz1SD\n2iHTqSseKN65ScEWbC7Ljl3i2jcqijZBW5jZrITcJcsJXvpdCXLUvrCbNlNH\n2S/32ABAfa10v3gGPdaHrRzf9+Gs0ed5bDGbo1ri27dRl1GsUwQ4yHkvUSCV\n8EivNOEtKXz2ELOGy9Z1+osHxNqS4J+XCxTusPocnkUwq2mhHk7zHNUwByHF\n/WlQwZWYREgwnBwUOlPkhyp6aHe5LzKgR75UxNfY2Z2DNI88P8yLfpMnEPL6\nXUwSpb078h5rSEUkPgZMSEtIW/M4WwuahPofFuy1KUkJJqGJfN3BiKiOW0zf\nQMqBoamYiFLRcC80ClXZ1Rb5RzL/7bMLsKxxT/sY1DqoHxAQbNdf0CylL4nk\nhbqJgV2a+krGgH9lZ0mk012NpMuve9kZTHJ5NSu8LluTDi4S2YN2MQJqmXeO\nAXi+bEUSPLtSZ24JMpDT/rz4JjcbjaSTQBk0/6lDTtBAmy/Ov1HLxsghke/U\nPthHKBJ2KoQWG5jUffJZ7A9bIMnupwnN3ngtqSDiim/YGriDkLilBpO015Zo\nT2EBKl4b7Fw+5gXEMFBDI8HjZkaCveHWDEeNRkYbzx9M8nxxbjNL6SjD8mLE\nH3Cm65ajEtgWHfZ5F+3t1QbwVyoxbWtQAR48KDGcbQkEvZ0olvslzYx/l0nj\nM4jI\r\n=aRoZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"24b285dff12794d836004e67d3a17f1c8883920a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.35","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.35","@storybook/router":"6.0.0-beta.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.35","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.35","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.35","@storybook/core-events":"6.0.0-beta.35","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.35"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.35","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.35","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.35"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.35_1592991629642_0.9863857703511416","host":"s3://npm-registry-packages"}},"6.0.0-beta.36":{"name":"@storybook/ui","version":"6.0.0-beta.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.36","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bbd467379a7f498a3a1b7393a48658c414b439b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.36.tgz","fileCount":209,"integrity":"sha512-L2p3JTbISJXc7Fend4E+ZZS1iFcTe/4RCmSNkFLFdCJ3vFvObJ9OQZTzNEtGvEpiU1NMD3ZqtwkJyoLV7c8BJQ==","signatures":[{"sig":"MEUCIQC1UU79mE+UAFG+kYG88fvkACQf7ReNjGV1KYkKbkR/RQIgWbS5Dwast75lzeqMk39liJO3HOOpwkRQ5EA9gEj2zfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":714047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9AmFCRA9TVsSAnZWagAAQVcQAI2AvnnMoOKVqeSUUPxP\nUvPwTTExAA1ijmBayp2PBeulsMUBCIJMI/lFKyKWMUFwZpsu8MAgBKCzViy2\nljtfORpqWc53TDLMq9E3sn2VaM+SGd2nlhKlyrYv3wHoCtPbDZg3D7djGvyb\npQXjk+/+Eaxt7NZTs/AAV0Qiuw0WZSqojzSeMxmr8xRQufV6CNc1kzfxudpr\nkBs9efB6qfvBD2RzwUw921gauqp7ognpWEOimBdyjrHcOnzHvG7hXfmNlpy3\nhqPmKUlcOmVkUG0cg70b/TkHM+nkaTpAUmOnV5n2vdnFAQGsz6AkIBVTIiCW\nnqNaujo8VXMsig2vXOtyRQW1v0sUPLlnP2QCLmF+ypCL7XZbEbrt11J3D0M7\nlvsgxroFDT1lwmyEcpCjPvyHPBZRrrtV3n842dHDWmZV3iV+2e8h6VB4T+fi\ni+sqWRYicNGS1nROfmc2zn4YuByMCcCuUu30Fiwkqyxxp4i46txdOQ6RIrdL\nDfq9Vp16KTXUYBb4ZOsNEF4APUytcmY8Ii2eJZJWYvlwZjmWG/Ivzkb8y2aC\nt5BmK3AyZS7OZouyOd7eIX50hoYopxPM9/X53lKT4pFXQ/Iv5l+Ez1RaimVR\nysWXutFSiCkOS55EBUQe1vdgtCHU4HFmWPg+wli5dDSDvXlOZN5NWN6mP14N\n4Fji\r\n=zgLi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9f4d471500703069493bdc974e238d7506d7690c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.36","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.36","@storybook/router":"6.0.0-beta.36","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.36","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.36","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.36","@storybook/core-events":"6.0.0-beta.36","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.36"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.36","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.36","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.36"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.36_1593051525058_0.07725827908230865","host":"s3://npm-registry-packages"}},"6.0.0-beta.37":{"name":"@storybook/ui","version":"6.0.0-beta.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.37","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"11d37a5b9ae04ecd00445ca3294cc47a1f41cd78","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.37.tgz","fileCount":209,"integrity":"sha512-qGsoRKbeXBoE51+RFuzcCETMXiK/LpJJq5PvLm/hWemWhZs4OHksZjsT70iaFFDJhTGWrB01L9K0N4v5jF8ojQ==","signatures":[{"sig":"MEUCIQD26nemboY23oj6iw71W3YMn1OeUG/Xo9mL3J5+1Tz7DAIgbUSvf8bSkijOlxlOtC6lGA9TJcXIZiGsdKu8gfG2+3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":714047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9YydCRA9TVsSAnZWagAABjoQAIebw+0rkMZ7YlFEQQny\njEEOpt452MedinKqRAS1gwOFu9TgqnMnQf63hD6+NxdSpkmD+vzN0/cBZOVA\nX2YBZVReTipTud8JUBpWeFFXs7X8rX/jQgvoZ2qh9x1USU1HABWwudXlyDUI\n7btc6v211j40GwHoU9uS+qgZwkUeIcQPxRJUQnEsCj0n17IpqQ4i3MY2kP4/\n6WYOV1A8TTtY5yWFhjo5pVtzSm7oN5ArFfajZ0Fth9RoUdKIiEhgAFeRj9If\n5OwW5dkGOEBCoNSNahkdA/FxqoZDfcij2u282vX8FFLluJemIH81Jk4VUpSr\nHRgHtOg6R2oM6t9dNsp2SckviHmGri6BwkgoPW2dKoElW5rkLiznRq8BNDNP\nxHFkNMPerCG4g9OP/3T0MOCScgik+8X0VLrPD3tLA2I32vZfXCmJQKAr+22o\n/6KiAPFI2/XmjXV9b11lIHPJ4f1Tl1ommZOw3w5SrV1/RwjiqLYTwQnbCB9l\nbhdfateyTO1xNaXnInNvUkuHuC4G3yAeUeVkuS5swsRamoXpq0IIuTmbbQV9\nIGm/vbHnxyPWalcduiZqFTHCaGzEHZ1dFK4yagJNV+EOi6ho47k+lHSOUKoR\nQore7cvcVF/gYKpY4/aGzdPv9tqNFuaF/GS7T9n+B26Vikz72dskf5nGqiFL\nLcn1\r\n=HUTe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ee6b50fd15b8d653c28f213efe3290cce208eca8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.37","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.37","@storybook/router":"6.0.0-beta.37","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.37","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.37","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.37","@storybook/core-events":"6.0.0-beta.37","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.37"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^4.0.2","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.37","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.37","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.37"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.37_1593150620588_0.7150936405954471","host":"s3://npm-registry-packages"}},"6.0.0-beta.38":{"name":"@storybook/ui","version":"6.0.0-beta.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.38","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"17b575adbae3360df1383ebf4b91bf1d0d3c1889","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.38.tgz","fileCount":215,"integrity":"sha512-ScP9G5rzveEfSXwqQB4AgA3elK6u/LduSjpCtIwp63ft2YphnlkZYZNXHJmxBfC5w6jodSjBSFAa30WAl9cFnw==","signatures":[{"sig":"MEQCIEBvdW51hZW0AJU1QOe1bhu//8a/llbiS7xyBFTPJYoBAiBVKTMDZPhhcviXbzs50eUmBUInTDiyKjHIS2Mj2N9apw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+14ICRA9TVsSAnZWagAAAE4P/jGEx11ToSr0GIrdzRPu\n8lc6CDzRa6oBOoFJTjnMKVbaWxRxDBgH1HeTS7h4Bko74qKkYviXie5W9OL5\n019NYNhI3t2Ey/VOMJR1w7aiL2ITUad/ORVxxz2PkgW0hwWTjU9qrSOR0CXh\nWUdAl33elDpESrRU/5IeQhmff+rEVRRMLAoV+4YzsN7NsyTYiv5gIeaRM9Mf\nWH9gcw+NEell8GWQ+pLEKtg2hgC6xAkrW1FlIqbh2QseFXqwpZG87zbyJeOv\ndCVr75rZoj+XQYyINoUNjGrYDg76tmNpmusmfTwLj//7b7upgGxfB0CTHTq/\nxACAg7V2rzcQ92qNBsWlbKJHNgYprxOrf6myUE3kc1dt+m3IAyQC1/eI6fzz\nfyo4OtMDHPgHXsyz+Lw4VU+0oQ0nRorwm0BK91LMu5tpjOCu9DzlJleSM7WJ\nzejSyU7gNaq1SoWjkY9Sk6oukuQD51dDpN7xsxKq8urfU4Reu91DNRXrzYym\n6DI1qwSrkMFFzinQtRqgZM1hLIjMwvIyCul7Mq7T21ChsP0h5peFuBGYILSD\nIM6R+jrsioWn3qtLrdjyfQ5ohlHPCWXQsTApR7l+oISEV2GPPEkKwG4BCgey\nZj0ejW7Qys9Brj8Gg4wuq5pxtfIFt/bPmFL8e+MaPAz7uxavSiMNkc6sRob4\nPrn+\r\n=aBvx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1646f3881ceb0bc51b10b5cc92f0a8ca8be89998","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.38","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.38","@storybook/router":"6.0.0-beta.38","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.38","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.38","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.38","@storybook/core-events":"6.0.0-beta.38","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.38"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.38","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.38","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.38"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.38_1593531912066_0.6940823110828234","host":"s3://npm-registry-packages"}},"6.0.0-beta.39":{"name":"@storybook/ui","version":"6.0.0-beta.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.39","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2be2b1f6408123237166775f5f2182c99083a5ed","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.39.tgz","fileCount":215,"integrity":"sha512-T8k1YRXwCHWc5ZF9ez8IJeRJtYy22orJIk6k77nsP6302rxuZ5EiM+8M73SIXjJfcXiPyHWOVwfkPq50o2GsGQ==","signatures":[{"sig":"MEUCIQC95baiRXtmTUaMtv2Kakgc5CRU4KfNWzQ9UettJKtcdgIgSJgDxBg0sWZmRJFOI9EaOfASjSO+W90KzNqrNpcrRFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/cdkCRA9TVsSAnZWagAAWcIP+wTY8afel6j85siENRkT\nr5oTxZwlaG0j5bF/Je4l26l90UoZO93x0ubHXG3Aqiay9HgWwRs5Gh5Iuut9\nRXjLVZqDRR/7O0yKY2WuQVVIiU1RTzBjN2aQJ/lgcUy5qRQxZadDbkz0XFNY\nkyNrnHIAdgK+wTOsZh/Jwt2N82gg40PRlGmwL8rnfFniMn+uOHpr0U0L+2yx\ntWJgUjkYcKFJPBSsdi3COMe8R9pLsY+SXhysIegQ8ylFfGxSa421jD7fWx14\nMHdmAHhkhopt3bzppIA8o+MWBrBTVdy2r/SnweM1rwu78T0Lu4vuBgfSxbKV\nxpIvpQhgsi7u1xL2xDNpwyAjVgez6OOnO2+cOkTarjCDYZMwPelFy7D2znDC\nso7TyWrvPx+x3vwS+BylCW0R+xT+ghztbEko7/UCHpRmiJXTK26xfenWF9Kv\nC/tliAuwSI9cdrDSPpy4bchjSaoGNT4nyhG88aj10GBe+17MLpx3oXlz6Ktl\nc2XY/g5BlqH0yqqdwYzo4fTucSP/El+R/sw/ZYVodstT82Somctb1ENoUPXY\n9yZGjUc+ak4PYRKJs9RlHjAYAgBllUFLDeBF8qchX2U5LV4edYJtR8e+vyBP\nZkkHcItzKpWajK/lQ5YHyyTlbR8ezlsy3Ox5X1h6peSA88tmQAh5iSjrXGbG\n3T2Z\r\n=8jnx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ca9e1affe9852f3b2614046f60bf820c61927f28","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.39","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.39","@storybook/router":"6.0.0-beta.39","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.39","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.39","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.39","@storybook/core-events":"6.0.0-beta.39","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.39"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.39","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.39","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.39"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.39_1593689956375_0.2570456878163625","host":"s3://npm-registry-packages"}},"6.0.0-beta.40":{"name":"@storybook/ui","version":"6.0.0-beta.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.40","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c28b5105dd391d5a602d87a356580d9859c7d3af","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.40.tgz","fileCount":215,"integrity":"sha512-WMtm10HyDgB8s/0NmIW6x5xsDV7q4WHMM+gtOJKSOJ1yooRGinMbes6+DyRFpI0r5l3I+I7/U+GW25rgXJyWiw==","signatures":[{"sig":"MEUCIAnu8Xg/iHEwoMeerrq/bDavGHujWF8ZSM4wUPr66h4TAiEArQt26o94WNcIbYk4+m/1jNBOj1ksMV0mTWnJQ/UvaeA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/1viCRA9TVsSAnZWagAAhYUP/2JUKl5ADcupa4fJFj+7\ndMe0MSgnYdHC58pwXUwRojNVhGlCgiycYdzCosychdLP+DJrejRfCedC9UrY\nK1h+6EVW0RR5M5d1Q3hXFNd7PKvVuq9UZOW+bIl4E1Tfm87xS+AnBGuvKY71\nviPPwJZmRwqTAFAvM/X+r1RJv0MWeaZGy/hDP9oLcjRZiPSY4UTpGiOLEMud\n5Lg3TA/53oUQFqOe0ZhsSwzwVFoQytLHH2US5I/x479CyeeDgpVJrUhYYBeF\nxbMmgHbCRrWklQE+lPYoZYHEVxK/4os2O3gDV7cFywL4A7U0b7WuUzwIm7Xu\nzrY7EaRkdZ5zd/4MFNbV+UtxlB98rx+XomeamtAgt21Ehxw1+8/rmK9Ycy1X\nIYhbtFI7x++Y0l42oyBmiY6Dipr17SK7rFZkHOpilas/9NYBgo6vjP4sN1Bj\ndMLgeCaXnxGnKsnW/iG+XXRN7Ecin6Z+7oZWknNEEabVeGQ23fUM7v20jEPk\nNxs1DXGe2TFgomYc7jybRGl16XtFMFibkpF44eaY9RAoX0SbJZeHGbMJ808O\nMYewyj0cJcml5zboCPH1Qhq4xi+xXT8R6GFPnrrh9LX1jbui8fWMoe/jLps3\nvMnbdBf7lukz17zd8fTYsC2tTZtUEnBASh6gD2RkWTGojY9Qmcw8Q5uBhZam\n+v7V\r\n=jmmL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0ba27c4d5bb416cbb4e6719a1a03c6c31c1f0372","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.40","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.40","@storybook/router":"6.0.0-beta.40","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.40","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.40","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.40","@storybook/core-events":"6.0.0-beta.40","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.40"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.40","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.40","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.40"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.40_1593793506319_0.08490782538164376","host":"s3://npm-registry-packages"}},"6.0.0-beta.41":{"name":"@storybook/ui","version":"6.0.0-beta.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.41","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cb148dd1d840ff993b2e95ef50118ba0b104028f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.41.tgz","fileCount":215,"integrity":"sha512-ghyZL7aWrAhk82FD7uMezKJkOAxweuTfqgtjlYZC79CAFRcn8IfU+sNGAAeAHevapkJ4YZVd+4HQmiH0ANX9ww==","signatures":[{"sig":"MEQCIHuZXzsFMfcQi+jUBXF/xueAdCC4U3P0VGORtm8olZfcAiBUMzl0wOL0CgBtoiJNlEXvSsruvvn9050wOSJs0VlgHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAC4vCRA9TVsSAnZWagAAmPsP/i2t70Io9Xd/v9wGzSDV\n82tj6/UhEOb8EIhdyTtks2sLRU4suQ6IQ+Xibwjn9ZV/k12YFOs1g7ZVcpIK\n/xb+xo/0ubRkD3x4LW4VnlS/emOxS5w1cCNih4jhCr0zHY/zjELDHrBFL978\ntQbFEGI2uI7cl4xjTvW2AAKPQneML8PlARY4xcx0Nr/UtWkuiJxlIZYi6yAE\nRFyYuxFuu+tgMuvKkeJE6P9BpjrNiTU5rDgFn5QPtbg7gdXfV68KU/ojgRdJ\nvYZI58+jPWL8O7z1BtDNqPdmG5j3IKIBKrLgfF7Kj5+rJ80slrQJZq+DcgUl\nDkobk+rhuxQncjE7OsbDA8JG2c2j9U/ecpa++PgaRxRegG4QkJhDDIbKcKuR\noUsvrk/aw38/16TiHPSvJnn8tKQxMxvgAk76yooTF2UJnpQTO+ADkX6oT57i\nnXh+7RM/V3414WGcZ4tc5W9Qk+8hfFB9/wNJgW5d7uePdVw87GW5LE8YrtMT\nuyFI6HNgNT6Tw6mAC1y6ZzpwtPohPIoM0cJcOC2/F5P5wnUu/tqj0IQYoo+M\n+wXKG/uuoxz7M3BTBn1tfffIKVH6XZoz/cUqPXV4UbkKX+8QW+BcrCSx84RO\n9GZNnYKeVJP4N2IRU1nIsOV58R1mZmJNitzjK6AsoTEVJYJq3oOcFPFYDzee\nZgiH\r\n=kiEC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ee425c3615df11b4a2cd993d6beb1e733acea4f3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.41","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.41","@storybook/router":"6.0.0-beta.41","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.41","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.41","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.41","@storybook/core-events":"6.0.0-beta.41","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.41"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.41","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.41","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.41"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.41_1593847343453_0.1179419228963301","host":"s3://npm-registry-packages"}},"6.0.0-beta.42":{"name":"@storybook/ui","version":"6.0.0-beta.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.42","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"096de96b0b84777afdfadf0a42a0b0c78c36b4f5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.42.tgz","fileCount":215,"integrity":"sha512-AhD4IjtaDpRBvqnNzPue7fvIgRYfHOE7knjgJL775CfqyAd/xgOJZg30kjk13ims+c/VQE+FcM5DkEGnTrcESg==","signatures":[{"sig":"MEQCIFgFd9YE0Xn6mncAENUiV+4+eAazLVL9nOYxrifmuuW3AiAYPEAQWNM5gTw9z/IB2LcTfecBfd3wHweYvTNR3N+DtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAVRJCRA9TVsSAnZWagAA660P/3/eVCgzSk9Gf0+4sHVX\ngbs83jk0y9lWrFdEOs31fUrUq66g3b0CKoV0ZERhj8e5YLVu5g7+filUQTLF\nY/1aVE6pwdlU7hR2ZhikWubOdrmAGsonR5jYYnX6j8blzwv+R57GDlmxwnMQ\nQup/pNNv9yxm4xK/Y11VlWbV6wddBXotl2vL7cVENZufVQIFG1AgtR+F6j16\nO8YmtPD9J109zC4PVzhDAGEZvgvSZ91vROmz4c6cN1y4dDca6Q1MUZMyhmP6\nLpDOjTeYFvC0ugHVCg/CpR6hSmqzHFsXzgK99+uyFIvvmVt9kr6S9cKBtcm/\nrvLvJh0HPNM1kDqGsyB9NAwS/4Sdsg+EoRoNYsTWMfQKKkmE0EZqd10TOVvF\n03MvInQ8VnqSmmfsHjwXqoW6azwRYeX/7MhLIzqx2E3umwKb2WQwBmxC6GfD\nCzfB/i+5DAB5bo6LolbjI7UyUxrs4BcO0/VOsT9v57YCkk/Yx1xAfxgqWP7Z\notrPhqX8PABi0xR4SP46pL+wekuhHcXfYpNKh6F8JOcioTCN4PHMNVayDt/n\n2QxGpdR5GwjQ/3cEPmCVzTmWLeBBsMr4bVflGx/PKIsYW62FTspxGYxssEL1\nqugonTjiqi8JvBQemiP3tc63IZbcpWjtLAyAd3VpwKd4qjY7Ohf6YFU0nYqI\nCsW6\r\n=pwih\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8b5427577af0a22c9a9b291ea7d8a3e96c3d12e0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.42","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.42","@storybook/router":"6.0.0-beta.42","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.42","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.42","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.42","@storybook/core-events":"6.0.0-beta.42","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.42"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.42","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.42","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.42"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.42_1593922633306_0.21537960477970963","host":"s3://npm-registry-packages"}},"6.0.0-beta.43":{"name":"@storybook/ui","version":"6.0.0-beta.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.43","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"87fc39a92b8620ce6441b3a2438d2e620d180518","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.43.tgz","fileCount":215,"integrity":"sha512-KlyQgcRNy/dp7u89NX9cZu2lfaX8vUH6Qv+Cey+t4Sbi2/4EXsa+LLKrN2LgsLL6RHo1dsqEHJB6Y5VuJhU6jg==","signatures":[{"sig":"MEYCIQDKwJ00/Ww1bzczkTImWgxI21tPfaZViZnUIWc6g6+2QgIhAJKbhV7O6PWXBKehLY0NKVhI/0R8s14+XtXQLwOVz2/S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAa6FCRA9TVsSAnZWagAAivMP+wYCeqlDMn9BAeCHqNyM\npbffg0DsUGr6RbhC86/yRLD26fTjh4n8+ipdAC9t60u9VUTLZA7BvJ4GXcye\nTU5bFKy7w+teqCWWF1cLAG/U3fwBMXiSRncIYijTCHH9W6bdoj++l9LfT5Ga\nT/rtzVWvZrsFy4HRuLDKEvJp9rebZXMXj4pk4uRsKHgjlOJAeeNvZtZzah3h\nLABfxhwRS+cL4tNMa0aR95UUcUauH1aTdFvP8LKdfd6Z0fO+ex85qejXcTSg\ndB+jRq1aagpTO7yuFgtisBV/7squakzbfEjW4Iz+K+c6V6A0IWP44CUezAHM\nQHWMKGRBzRlXflvQILK4m65StshaZq9BUgOLThEyPYCYniQcpORUWEL9SJ5i\n81+4elsX/rza+09J65i9Qfzs11ZYhnJmm47+X894Bmy7rR+VcTcpvAYNk51x\nszuaaGNZnNN1/+T+0AzOsZLg5LUGNiZfe1vsPZo1PM1QIl0Zpu08DGRo2eCz\nCAsjTvfT6XOTAcXmonAzyBEFdsngTM8e1Qs8bfzHDFl09Ta9FAUTaywVMuZC\nEAHJKH4mfAZvW6ClI0mP8v05qXVYJYZmdc0J7oTfxEPqThF6K0vLEJ2LCX2u\nXi/sfBxf33Cj4tGP/Yvu7jxqOEXzSngmdwtLzcw5sl5Y6kKfgKTSaN6qZvRv\ncG1G\r\n=V013\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"99a191894a936ad0476117d857ca0387f2cd5afd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.43","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.43","@storybook/router":"6.0.0-beta.43","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.43","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.43","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.43","@storybook/core-events":"6.0.0-beta.43","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.43"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.43","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.43","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.43"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.43_1593945733186_0.8286401416924996","host":"s3://npm-registry-packages"}},"6.0.0-beta.44":{"name":"@storybook/ui","version":"6.0.0-beta.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.44","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cf8717ed69b86affa5d0d2d9263b00280ad635fa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.44.tgz","fileCount":215,"integrity":"sha512-9eB2o3MLe9SyaX+0YWy6t413WmZLI6EwrPc1LNiCvl56ZauXI4mpZFuPnW4wXkMhQ2HZI7PRo6ayOUr1enwIiw==","signatures":[{"sig":"MEUCIQCZMxdVRkGKAQOcbca0fpbAbte6q93QdxuS21r9FH8uVgIgZ0H2X0By7qDTdORdjoA5l4PYEqVlLxvHAHHvScRcgYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAzUnCRA9TVsSAnZWagAAUCkP/iY2TaOBfezBaRXfZX4f\n7eBbyNTWdqUUwj6YUnLpyoc8cv32wBWBfebOg8//CNw6Kp5gfZFxUBqONEct\nadd67k4cGsgMuzdT2LZOf8RekYikWVqUXvppSE3513c4Pv1BwzlHr3K1zs1h\nrff7eR0YiDX+kjX5cBsEiNdrUn03a+SD0Xi+v8l0TdraI2GRo7xq7NDREtNV\nXcd2NGpyd/RWNgBhxqoM3OvW/UWGmFkVPark8OznJpzctb2rTPN6OtCovTVT\n0An9JVy2in6HztZml/ap12Ue9KkGWEXO9KLH2nzivs78mKoMntYiBqh5IiZr\nL147EP7u0GHFuhwlaws2LWzidJ3wvnD4GK0FP50gYjVWuPzXWG+0T0xAlyLy\nJcPAS5ZWIvmvcgr5LP2B1r0ipJD+Sp3Q1yKlg7JmjqQLD2dVN2ThO+9OPKcK\n/yfblMsrBlZ8d9DDKYkOj8Ln+IHyI1KKcXWbdElrQi9SxLj69MXiBHVi+3NO\nYVH1KUL0II2uM4GZkbM4MVRBJwA4PwNe5+he83lyWMlUSy8zQvyJiNMzs5xo\nz6s6rRvmvC8s1jFy69y5sw3SmriRRv6c6qNj8tV43cA7XYMnn0YkqTgCVFds\nJXdX9bQuXBxbvRY2BLeEVxkxugosadS1nCBhQrHpAFyIDLRDis8EaU1ivNsf\nmlqn\r\n=Fo2S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d5df9d126f8862293ce5a0dd9dd13cb50ea6c588","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.44","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.44","@storybook/router":"6.0.0-beta.44","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.44","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.44","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.44","@storybook/core-events":"6.0.0-beta.44","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.44"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.44","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.44","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.44"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.44_1594045735361_0.6265227370396906","host":"s3://npm-registry-packages"}},"6.0.0-beta.45":{"name":"@storybook/ui","version":"6.0.0-beta.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.45","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"111939cddb61036274374b9b050bc3cf60cee16c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.45.tgz","fileCount":215,"integrity":"sha512-17WGSkHnlDEkJT1oswaWrdKBJD1LDiNT9S7u/CxXlFhnMOYuizJ1lWMm4z7I3dxaICfIg1qkyxF9KgUADuxmgw==","signatures":[{"sig":"MEUCICxgOAYpvnDboeOHB6xRovtX7BSXNjqJbJD9Qed/HUijAiEA52l4fv2VaFczartXvZXHSYE4rUO1qz5h3IGHyRiLk6E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBHMYCRA9TVsSAnZWagAAD24QAJ9Gwg37tYaJcz1ZyQ6d\nv0Xwb87QoPbsXJF5qnpP+l8Ndx/gcS1odb0W/gcBEBg+7MmsFDw/gqkuM4eG\nGeTJxeRIvZ0gj/6P701CXQY4h6CM+QzpCqtbsy8g6j/gQZLjgECe9Qg69pUw\nvgwFDhMaGlMooRQFodftJPIZud4SX7af3Er6f88kwCVwqtnuqTChYMiR+hXM\nu/QhZOqGZRIpEwbYeLxPRQuQdVNagQaJDFhOVZMS3lAm/UgYttkCChrT/Neh\ntctSEq0PGRnzIJg/qvY72p+q035lDpAiTjX5APqTjSHjvVVpaZ5l38qsVrIH\nhvTLRsqWOazzm36TmU3N5R5qcFpNgeyQS4pBombk+r9XYvklB0gAqJnypP3+\nrhYGGOcUOwnjGEhQFrV1xfwXAo0U8upaQh457VWhputkwOSMzT3uUaEaAVDr\npesoS0+vgyExTu2FL/2e89EirWf0pfX5gM55Hs8XDmse9493C0F4QgN/mkaX\nKMdm3zBgCspc/ON+jUz3CYGgAMMU7bfuNt1ALgycBeeW5H1zqcnR5LmWKxb8\naHj6HGAISyGgPcrt8DQvtTPWNoX2WrIItmNHDRdYJSjwyndyGMV5WHQrnaeo\nXPQ1A3qyR43FsLfXJIE6cARjGMjdC6q11RP0xW5oCWtFtbaPBdc4oHND9wLG\nbdLC\r\n=N0+D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f03eb04a2ad4bf14c762419e9c960a8906a0bba8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.45","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.45","@storybook/router":"6.0.0-beta.45","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.45","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.45","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.45","@storybook/core-events":"6.0.0-beta.45","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.45"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.45","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.45","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.45"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.45_1594127128210_0.5540789192417945","host":"s3://npm-registry-packages"}},"6.0.0-beta.46":{"name":"@storybook/ui","version":"6.0.0-beta.46","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-beta.46","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"55c89c69fd5c2d413646bb178862937ee3b28fa3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-beta.46.tgz","fileCount":224,"integrity":"sha512-CzLFadqAnoj0v/KsYzPWzRtHhXUxv97BqQ4uM0TnXXiyBhqtvhGHlPo/vgMMU2NhBdOCPmgPgb4ERL+gDgHhJw==","signatures":[{"sig":"MEYCIQDepnUrz/6l/FVoGYB4NW9MBhGbB6WpmPfFntuN1mA4fgIhAL48IdWD8R5JUYuqahwJK7ZrfABc8k9EQbR0iudQYr6A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBYnMCRA9TVsSAnZWagAAZVwP/jUFy/3QFao4P6Ju5oBP\nupyLQZ75/T614VwA/W+VNzdSNgquHMXGuNLo46yn/J4IvVXjzopeesvPYWaS\nwhhLy2y7XrRh/F2TOFXpaqQUVTESXbcDPosRaSSK506hY/AJd/NUCv+SpBPt\nHopqOmXiv+om7KVPZr9IkHFVgbaGTJjcfwmtXAi1yETV+FbTVDRm0hYGvZGF\nksrICxW3Z/nHIy1GQYvJ/ysb8aX7UAjFhaNDVBXyVb9y4GHLrGpv3LTeDWr5\n86s9+4cSIl9o4Wb5m5AE0EFQHSK+Ek5qKTqXK0C1BsBDo+BWBYANwPHzwGu8\nFp/IcofyFUeEj7jTq03NeKhkWC1/sSx/pT8ZeoXO1Y5DRaaKviYw7Ut2DPf2\nqfKNXV4XwnIQj3gbyYvv7eP5ho2+86P+NOvDOOye8XTItJmCS6YnoMuXtWYT\nekd+dw3CwALjNTpuC9aVBDghulMi3queCZTYvdGIpoQg7NJzGjfUMqJknp85\njiBUO/YYM7L7A2vdUZDmBUT6SUwbbuDLR75liv0FXRO1wfoIGd3NCxtHjS2O\nd5adXaiky5aTZADc9MnzAn7xN6TrUWD1mkLbEeOpNoMIdiI6CeWSBZgcryLo\nA4w2f6bXa8dWHJrweZoCzGyxIDfVfCzMncSmmXU1XKa5sWFX98C2qAudlAcD\nvxOC\r\n=vOSA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"971b888701279d3e1c135b32d20262bf2aec5b85","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-beta.46","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-beta.46","@storybook/router":"6.0.0-beta.46","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-beta.46","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-beta.46","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-beta.46","@storybook/core-events":"6.0.0-beta.46","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-beta.46"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-beta.46","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-beta.46","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-beta.46"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-beta.46_1594198476108_0.8016074486873492","host":"s3://npm-registry-packages"}},"6.0.0-rc.0":{"name":"@storybook/ui","version":"6.0.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d28060817f8a96f28ce5e2b3c06de63eb3c822e1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.0.tgz","fileCount":224,"integrity":"sha512-/DdfOX3ZffHm9wgcBvc3Kv1alTWEyJCHKuQMuCJhegHkeE6b9395XheEV9ObLWNO6tUK5rneAWZGLhCAcg/PHA==","signatures":[{"sig":"MEQCIGf8ZzluPYqQ5hbVCRkdx/5NfchQpo6XOA5na+wJluhOAiBNivA75AmIBzS4GxaPLtu0Wl5RDc7FTmYWnMsoX3liTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBaXaCRA9TVsSAnZWagAA+6oP/Aq4wP7wr9sPOp2sKtPG\ngWlAS8fzROCqXhI+DruF1coukeR32pwVoA3wCg93iKWqdt+gGHUA14QHKd0B\n2wPlQe1AqLBoZiUjYG54j/jqJwWZrrTlenBQ8xDQ5q7mzRc6W0O630q5kc5L\nYzXmlpJSkrWCdMfL51xNYcQiT0g8X1hmzZok9BMoIQQLM8XFxGWS5cepDyBL\n17HbiA3bHfBoHueyV68KRhDhyr4tSrj44+RDrc1o4n6krmHNhxWNnlugh5Wy\nCEw6O3qi27pXAX1FKgPchqQDjCjGamBwKvhM01zQFd9kdy+P4plLUyRsLlBT\nD4v4zvMPMW2koSUYQUak1IJHlpj4hrqyNWecjQ6Pl9O42vkIWLTEguM03VPg\nfXLDNK4YtpFwgTMW6EypTnrYrf6z1px4zsZ2WvKi3CYDK08YxLj0q+PdjE81\nj1JWuK9OwGRkQ2Jfry6H/fWllxT1u5yzpWGULN/9VFloutTxm3wQ5Si3t69c\nJ627psMWbTSCPd2mD/HCiWSIE4lfGQGg90clgFA0gsDIgiqS+yxZs8/RaENQ\n9r5Ypogk4o/NmmSucn1HJEPXtHEMmg35M/JlAlZuXDPfSM4Hn7xv02r9yRx3\nAwvLYBNUPEOl3jvsLDPhK9rspHuoRDMjChX9eELxOfU0RQRBAWXM0pSB415Q\ngrfc\r\n=QKXz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9558b3901eb79133f758530c1c4c811a5e86b7f3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.0","@storybook/router":"6.0.0-rc.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.0","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.0","@storybook/core-events":"6.0.0-rc.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.0_1594205657919_0.08514939697001878","host":"s3://npm-registry-packages"}},"6.0.0-rc.1":{"name":"@storybook/ui","version":"6.0.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"886a423c8c25b754e759673904b6ca4ee813beb4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.1.tgz","fileCount":224,"integrity":"sha512-naYT+fMzWqTXH2wJIIJQ6JJz3oLymGHvPSP7BE2JgTHcamxbac5wLL2kR37hIHEexbHmcWRbzvi+dL2+fB1iow==","signatures":[{"sig":"MEUCIFjtlx1eV7VcifRa453jL+RXDAqTRnV+hN2xAwaONiNvAiEAzwPjnRXxq11Pz+skBoFqD1PAUaXWlsRoEfA5XO+ph3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBsauCRA9TVsSAnZWagAAYVgP/j0s3H5vYgPk8sjFfffB\n9QNINYuaRxWWjs37p029tudeIDt3qv+9p5e5bpEkFdgkxObGP8MTgDuk9DuR\nfDGVVzVmlYnJ28zLuw3X5o7x+VRMLWlB5b4La7lcBphCik/Nn+F3bOc9Auro\nI4UnzCIN5RSPSvzsnOn2NemUpBT8dQvtWA0ABLW9dwPYXApzrUvVwRrmeW/o\nVlemyJvAka8k6n1SminhaR08cK5Nb6/iboAbKRnvGw8DOhvh5Khx3lERiL1z\nAsaXFFY7egC8rIXVkvf2zS7XBTj1bEYEogZUnziuyT2Ppfp1QcW9i/KGsJcx\nFvGH75VkP+35HfxnrlG13RHtIO5TWoR+irRsx+M8Tjz8ezAOLCftuMqzJEGi\nubfvvxrUNW7yIGA6MHbA5t2x8x0Z4oJeCHPeC0vSMufCmoikAdnqqWzrOfaw\nmHm7f7fJs8fOKmw0tvKu70H012llo5sT4P8jB4cUqDKmdQSezbG/jDv3xBml\nXhjkvOifjTwt6v/KBfjnJhraBDmGYk6yUFVDss3/1AkI6nf7jeTTT1a/JuOF\nmsTD+ciqABqRrz6Au3gf1PIPMh4rxeAUBqRVFAGqxrwOfGPN4uRiCXgHOF1E\nT/OIcjXnC38NInkU/FJMHh0/APYKGDEbWopPUGvNjpO3aKWFoxUW4f43jlfl\nasNb\r\n=Wn0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9aeaf80a2c224e4f3dcb66b6329280c4cd73c017","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.1","@storybook/router":"6.0.0-rc.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.1","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.1","@storybook/core-events":"6.0.0-rc.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.1_1594279597866_0.020000656893655933","host":"s3://npm-registry-packages"}},"6.0.0-rc.2":{"name":"@storybook/ui","version":"6.0.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"77fa8610af5c3674bc0505b2d9aca421e1237a41","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.2.tgz","fileCount":224,"integrity":"sha512-HGM5ZbtQK18KZqacaAtNRXeUZA+sNK2GNIqTWYpYNq7Y8vV3+dSAlGUr1w0nQKHt5db5bFzCVSgVR6ODvncEYg==","signatures":[{"sig":"MEQCIFiiUTW/BjGCHrxRj+Kr1Z0DhSp4aW27Qnxc9eGbiNrNAiAPXIZhC6ien6TWv3yboaPxlf7xTf7/ofd9FdZq8TcP6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCHaWCRA9TVsSAnZWagAAvD0QAJ2iop6YwPdM9Iwg9OeC\n3ZYRA9mPt8nURx05qip+NN8lhBFzlqda/Ugp4OliUky2hwiGEFHkyRDaNAsY\nIWkFunF+s3eF4HgRXqEtwIYycef2NerS6382Je2UgV2vUkUF9MPATRtepwUQ\ncGTc6ZrBJL4ZwahF8EL3Yq7kBQxYmLzWMnHdIbFbQeqSLi3KuryFbFJiZ24F\nSIarbg8U0nX6X0MSnFmvjUp30xJAjdQHd7zoa+Ugb8RC95ehUkNTpr5Ftgdk\n9IFLxP2PPWjc2fHp3d42M3mu+z3Zv1G/7VD+Vu3no1WcsZm+iHtlM95QLEyg\ncBqe3pF9tLAGyr8tYX+D0WAHiWKSYSTx+0eA8TzmtepXVxaBI3j7/gaogx3b\n+VD54wNkv0/9JEts9NDPcCDpuR8zCZdOoqXmzO5RnMJjUnsg4g/Klk7GUMsp\nlZ51OpmMrYxx8fRMscbYlhbaQsrF9jnbKqFZ8v6WJa7krMtYXJvc8f8RAgT0\nUfJoDBbZpBbTK8pkFz9ER0fNPEGvjqMuH7i42+mcndRjLSGcn0BF1KDB5CLR\nKkYAFC7w6Ur07GSOB57ccAV3ZNo0Uo9WkAQ5sCNroxvRrEXwhIaGvVVUGVPB\nOQ6T0us7iMqdf4yHpgzzjdopNWZ4hUOjj2GuPJmb9qqy/Q6Y5RDDzTLAXhyF\nRv6V\r\n=z/+a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1e8d1b0d027007f7aba09d8e6ba50de77c60e94b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.2","@storybook/router":"6.0.0-rc.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.2","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.2","@storybook/core-events":"6.0.0-rc.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.2"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.2_1594390165642_0.052886926479169594","host":"s3://npm-registry-packages"}},"6.0.0-rc.3":{"name":"@storybook/ui","version":"6.0.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b52646e3bc454f0bfe6f4787e47685125a780233","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.3.tgz","fileCount":224,"integrity":"sha512-OSDn4WIPeA72X2m790bufrp1xsNBqhOCcwhn5+xIM9lsg0rkkVk7Vxk6lTkHUOSwVRjYrN6HCdL2gK59+cvxLQ==","signatures":[{"sig":"MEYCIQDBt2tx2QNaScRBg1WRFKfLEULls6t0Xs4/pU4hQucC5wIhAMZM17K7MwioHpdeDOx1DrwveLxcC8tyPGXzdptLu0Of","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":794173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCXmICRA9TVsSAnZWagAApCEP/2erU+6prMVoKm0LMANs\nPR/wpnjDW7Ez6aGQ8SgIqYet3N7fjpuJEs+Ibsufx8j9cprJcOihEXN788/d\nKCRrqnePnsShqxBrGOx85dKNumsKCiDQIQS4k58ahYjCr5mbIwD6MtndDPDT\n2scmPOtHwjrgVnK5U8JhLoRTWRlHUcpC2qUAGx/YUoJ++5ibZ7Q9PU9AiwRy\nC5FDU23trhETG3+dlLHlQGU64UIwANJH0RYcDmgynTtZd2F8Oj9VfhGTBexK\nOmos91NCkV+rX1UnNUSjvns7MrEv2Z3yioQKdger1UdPygWp5fTmvuk1GBYx\niqF/X9FeDW74/++Lm5b//QIdt2mhFWom/K8nfeB6c9alMC7vd+uTS3jy6s3u\npPEX5Ik3dOwZ9Fc0Qd0tLi+3VFL/d+mPyn1aBrbMEDHUo4uezuy+ouFqEDW2\n4Og9xwj5HH3XX72vK4RAzjBldUlCJlyOCunkSBA5gQO59xWf039tm2ArJICF\nei5difTe1TfMA1NBKN+L6xSikqspSg57R/JutzigfrvdYGo4Ey0vOZ4f2Tov\nq36Z/tmqU0qiw19JphfTAxp3ozCgH7aatAdDkJfDZZq+xgDL8nMZFUmWTUqW\nSFk4uLfGIvK7mKjHdNk7SMn1VqL80TqXBgTEYNXwaeTbFolLDEn1Mu4Wq1R3\nYgNB\r\n=LfKk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d7b8606ca3b871c91ad321b407c0bbbe0475dd56","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.3","@storybook/router":"6.0.0-rc.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.3","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.3","@storybook/core-events":"6.0.0-rc.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.3"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.3"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.3_1594456455583_0.49902346730403013","host":"s3://npm-registry-packages"}},"6.0.0-rc.5":{"name":"@storybook/ui","version":"6.0.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4ed5a1d2c1bc5a9273c34f6806b94e199c4ae48f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.5.tgz","fileCount":224,"integrity":"sha512-T7EYb/++pWWGwvmQjcKVaK40Bnp5jKUXThpjZEC71bA3DaRWvM8nWTcn+osY2hLejh8OKjtj8rNq30un8PSn2A==","signatures":[{"sig":"MEUCIFP7qAaA74MSo50IRF0H999F9HAW2mWaotnq7yL8l2h+AiEA/PMncAMJL13QahzTidiUoPS9V3F+AGTgl9dCCzlORzo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":792752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDvtcCRA9TVsSAnZWagAA7f0P/34y/LIx8ihep9p6Zc1n\nqzfmdLvh24PhHECcCPHaY9BS/gxvqVyXFPcMeMJGxhaGTlvXwIeTiqaQQ4VG\neLREqpUh477Jg4znW5CW0qYGrvp49dCNHtcWH0jOVo0erTKlAG08BSzam8hX\nehek9+C4NJoFKe0Ms4gTKWkxEpr79ayrCfXkVPxWlhz9eXGsf96XJA8NMuwi\n+aQ/dkl631lnZBHJjBczVsLzR7HkblrW/fjGJFFgSliHsEcQZ8DcSj5MlgoK\nLoqdePIsShUBuP8CNQhsfksRB5X05xtZ4Aq/5ItlY0EN8FHJBXGwmF+ZAmDN\naDKAwdELYpDZgzypcbnggvqzOFsa42fs/ZEl34EujYCTbxtuaL0eSOPIkvjQ\nu77iyeiPc5COUhhsIc9pH9SjwYEVVcE2sIcOzkUrYAaXLsoKGk7u/QweNn8F\nHfrYwvMheGKWRHjbWH3d6gNAqnL3iylAr9GxqRz/vQ6QZTRtKwDYkEBUHXWc\nP5RlKVirXXYKUAICKA1dHV31v778iI+qzO66M2HaiDuTLk0ZnBER3dvrvPfp\nGrKe8I3LFx/eE0Ql4GO8Mtpf9HZGTaRcECzl0mZS/tgHhRjl0YhfhlrzFkLr\n8OB3rAhMqZ/TX06G17SDGQFgJ9VEuZz7d51qh9eudexN36N0W7idWUEZCKkC\nb+fg\r\n=RuCc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"747ced532b90bf7a6fd9d5289d9338d25064e764","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.5","@storybook/router":"6.0.0-rc.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.5","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.5","@storybook/core-events":"6.0.0-rc.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.5"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.5"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.5_1594817371961_0.11483108111219065","host":"s3://npm-registry-packages"}},"6.0.0-rc.8":{"name":"@storybook/ui","version":"6.0.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.8","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"40ae008db8c588f1a93464b75cb1ca6a8685a53f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.8.tgz","fileCount":224,"integrity":"sha512-2tkXaVqgJm+YM4VsBIV8fm09Y9PsEwSjEhg5oO46fvFnS+Tc1zMU7/FFxkoAdsj7qB2k3+0W310mahV9BaDymw==","signatures":[{"sig":"MEUCIHQw/50DPqTeafDJB8u89rvFo3CWovvaeXLeFZDUh+wlAiEAzpPJ0Dj8j7KeVdpF3Uz/LslhVKCQ00nOEZR4k4ljNfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":792752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfED/1CRA9TVsSAnZWagAAOUEP/j5FhrtrOmwiQpsgKZpE\nz379fvGYhdDGEkH+ORgHQpH+VJ8vb/Q+4N8LDF6jldyoqR/ExN1jlQ8h8Aca\nHicU4qETvE5512IXiz7AhragzGKbPW8QIZ+VxwyJzcd5T3wCax0rImHlG3FD\nlHq26DleBNKubO6141F4VNho940fZUyPj93y8kcrwc2nJhfgEZfcw5Aau0vX\nsAz52CSOwKANuKFyIksKZme9MI3MB0fYHilmGXEhzbRmMF3Je12J8B+VEqpR\n1IlbgYaZpCC1DNPAuvSpXO8d5f6GVuibGKNy9FuojirbAvHH+pL9QGj4BzWH\nAmz63k972qBEW7c4/B+KkkCvIBGj31JGQtM3bz0NCVL+LXi8KOoK8dnaQKgs\nfizMWEGmoW598hQ3vaccJ9IPcUnAklhSzcVxHf1Ou5TTAa0Hd0loV60cYgbz\nfETcf0ybcEpbXpv4rDXaY7k+yWCQpJDthTul9h6VYgNQc6NEINetrOeVpd1X\nFh18c+qgnCYJyYrhEpq87nvTzdU3VdYNvlbBqO5wG+zk4e57yRi+i9TCzHal\nNsh2uDsf4wYbq+g058eLiLU4i5Nf+hJzVsj5o/19Jh8NmzIBFt4i22ZDXzMe\n5W+MxB0RfFxVln0Qz2q3NqTNQgmQW2FAgETsSpRTPwNNMiBXdQ65V4IdOeX8\n95CF\r\n=vvE+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"eab66aa5f27498c4326e37087185048ad224dbd6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.8","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.8","@storybook/router":"6.0.0-rc.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.8","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.8","@storybook/core-events":"6.0.0-rc.8","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.8"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.8","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.8","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.8"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.8_1594900469540_0.03351676971547035","host":"s3://npm-registry-packages"}},"6.0.0-rc.9":{"name":"@storybook/ui","version":"6.0.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"74a50ddcaf3a57050ae289372b8131e9144cca0f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.9.tgz","fileCount":224,"integrity":"sha512-RQVFMA/vaIMbr28BQhmWzs8xzMAih+2ARBelxDtkGs0Z9lp88M2dxGNoPUf2QpK50BV3u2XpuiXKt/GcT0N5Ew==","signatures":[{"sig":"MEQCIEyLXGvTkjsyZ2tcpKg6pOw9Rd3kcMFNVOWEMqxhap98AiAnC+njitk3PgR/3SocwVDz8hKPzbuQthuMMYmKj+/OjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":792765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEbi+CRA9TVsSAnZWagAACEgP/2DLxJUorsm8LlIxahmv\nxiikHYIh8edhBbz5B708RVs67WoyDqBfz/xLR132dwFfFHKZlNIGGsmwb+HF\nas/u8YcmTPBrnLnsJZA7tKT7qVO+5QB5SSMflWLbg+XeVa29QuwUYV8Ku7lB\n2oWR1pxMa7sJXOGxk9bY+TNOl70s4Mo5dO1rde4rtdmpC7OSXrX6H5R5UB5S\n9YBzrtIt1YKnVUVslFQ8aRoNS6p6bySfa36JqV6HCbD6P0w5TkNshSSCJd7P\nAbuGW8M3k1nj2ElI1HcxHy0GObuFi+E5OmXCaCx7cTM9DwIMpJbqRkjEiKNj\nmlW0aLbuLD6kE6tJ5fWG2o17/Dud265v1djitP9kYjoir0QtIpuBP1y9X0kM\nwmSIY4sUIHV7R1HS1vcetsK7tgGQkr08ZD+6hnG0gIfR6+WNSgTBqQW7HhiH\ntQGtv6A7WBd2uadjPSB/2L5stCipwF1E7CyNvklPSbECU+RYCtOvt+fiaLHB\nrWZaqNylrbZW81hTluoiF4detG54tGkwkaf+F9J4R8oQM7zIpUsHSj/O36gZ\n/kGnuxSKEQ2IP4/QlWghH2RBhsr6ukgoUI5cwSN3Pq4hqXcF4d3goXYO+Gec\nyLfLhpxkd+Sp2cFS/YnqiCr2LOvnWDh3VHnkxf/NG1724CrlfhtU/XtI/xbK\nPlM0\r\n=Nl0r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2e5d8431be9d0d3d9d2eda95724f772d980640b9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.9","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.9","@storybook/router":"6.0.0-rc.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.9","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.9","@storybook/core-events":"6.0.0-rc.9","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.9"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.9"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.9_1594996925757_0.17193923534387578","host":"s3://npm-registry-packages"}},"6.0.0-rc.10":{"name":"@storybook/ui","version":"6.0.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d4556a6e4abba6945620ced2679b84c72496ac3f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.10.tgz","fileCount":224,"integrity":"sha512-Ttqru74CcXFBGHPjsbcPt7f/figJrkOBdS+Lgcsbb+uC7Ing/Ipt4OMVAM3vgis4DZm2VCFlFMLIu7S2fRnMqw==","signatures":[{"sig":"MEUCIQCHd/WLcPjhFs5Tu4xZO6rNjIe4gpyWdZgv+GuEiqdukwIgUoBlR1RhfQp0chUBSf4WMfKkVMLTxnfRywLOA2RRAhY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":792777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEwIoCRA9TVsSAnZWagAAaVgQAJpYkLWTX+7H/em5HFSW\nDRGzkEMCxcp1JiFb8u4wxfRneh6fPfXLnVJAwQJXMgMWrZk6S3Kw5J6P88Nv\nvzyRJoTyLorQicCekW36waVOoNjArUdx5mZ9F/7n8NluPNNm/ssNXfpFjApd\ndaLQomUkXvzyfqkVaJ2gaYAGc6BpXKcQPbTbnFNu6kcmpYxY5jqWVlvB+NBb\nrqk+iqseIKtRHTgxRquhD4XgULZFPYtfJachGTwddr8IjTCJ1gnpzb8u+Y6R\nKYPaa6gtKViPzjnuFqNVd9HpwpAHUqNTEts4FAyTjLs7/J4dSqw+Jl5RJMce\nXgZlv4pTFJCoct3GqeCZGgR8YNjm795WCC13k75TgLJHyg4mLPBoIG1QjtuM\nYdU3vKIKRBex0Jxb9bGtwhqFTUm9429vOiE3nPQe/yw7fyaMaa5tQTvp+z/Q\nFz0jkAjDfAmerB203D81RqFIyuMQZlvOcN2OgADjcc+I4X/EW+/bCaoR+MI1\nP3lA92ih6EXIQ/Y5S80t+/zFC/dRPc9jUavXLjf62/9CQsgeCt2QE0KdeMgT\n9cpp8a55BLimvkkZecbW1GgZ+hs/r4MuuhA8m/HPLKECk/IyzhKZvQZ6yd8Y\nTcQgVxfOZe/NTG0TuGTpEBVqUZ2aLbvXQNQ190ZrfpclBkQ2/ojrub6wljha\n2XnW\r\n=wqp+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1f0309cb5ff737b40dda25e770fb63daa8ccebb3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.10","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.10","@storybook/router":"6.0.0-rc.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.10","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.10","@storybook/core-events":"6.0.0-rc.10","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.10"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.10","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.10","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.10"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.10_1595081255599_0.7092443751103219","host":"s3://npm-registry-packages"}},"6.0.0-rc.11":{"name":"@storybook/ui","version":"6.0.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"49079d25591c608cd31d802418c5b951f019dc49","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.11.tgz","fileCount":224,"integrity":"sha512-P7BQRE1ZxyD0m/G+KXLr4Vslqwdekx1kiqUlDfgKf4VTCzSUhJA5znCmcerNW3QXi4T0qH48jN4mtw7Cvkb+Yg==","signatures":[{"sig":"MEYCIQCM/mIjcHOePOkSScjUo+2tzjGhA917eIqOF3OAj+VprgIhAMXGrvXPx455HGCQOz5baQaAtBCLZhYg7X23ePpiUiDj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":792777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFA2hCRA9TVsSAnZWagAALzsP/jrzM+X00+fP9ThllYO4\nH6iXWh86D88Ji7zSJVm8W9SfLz3f0fM99HvYXTaNi0Hxm0Ow5V+aeQd9bpeN\npvvuxx0VDb1FWbDY2r/rNLmf7Wkc+VojVIGb/+9dRVcUlviay7uzuOi1kH0m\nhahmVx5s//DxsKPH721NZv5paetLk1w0Vdvs4ZojATrzEjKJUd8Nj0PCeqaE\nly9FPAuh0aLKOTfcUJbyoHUUCapiWrVZ3ah/N5DhXCEoS6TQCCmdCfOqzoHy\nceRC382FKq3jrgwN/iWOEipJaXLw+gYrlT3iHm5jIIWh4aWCTmwBDGW/CTyl\nhBDrfdNQ7YPj2VxpepAyMPWQFWMaPwz6vfQvu9XToWsXT9p0oeCego2EPJ/r\nmfzQzcIJonQ5UMU7sCvhoiNRLhZUf237KTBZlJottrsiCBPc8kwUmadV7gLb\nImTLeI4c+2JDFm/K6dpsa2g4YlzFj8c1pGp9IOVkAj/zNHRkBIZXOK1Yuk8B\nMwu/PgsqGK/UHufY5nZL0yG4hAnrmjQmwR4HZz2r+W1dj7WSrLQ7ui9lT0tG\nRJTBhSd3K50/JoBOx8xzbqKBuxh/5QRJ4T4IYk8JzT84aLuk79xKkKmvSzSP\ngI+y2WR0CDLQtNpMOvy0F6qUVykKwsRnIaemfxZ6mkOCpZ+2NZEs1o0DXAPD\n1gss\r\n=6fhy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"24e238da6e1be075eb83f67af3f2f5a7eae923b4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.11","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.11","@storybook/router":"6.0.0-rc.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.11","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.11","@storybook/core-events":"6.0.0-rc.11","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.11"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.11"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.11_1595149729282_0.646323481107165","host":"s3://npm-registry-packages"}},"6.0.0-rc.12":{"name":"@storybook/ui","version":"6.0.0-rc.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5fcd795502b94d00666076c0f69b8a73d1e8fc6d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.12.tgz","fileCount":224,"integrity":"sha512-A4oaXOdgVsY2dBpusa6II2N8VxAj2E183Vs7/Ax07LXs6neYwZzI7RYI3CmrhqLj3sa9j0j2fC2WPxmqSKTvkg==","signatures":[{"sig":"MEQCIGJ72VN/bWhOZo0+tIif23o/zmSHxLRBuf6KufHeM9r4AiBk4lNrcxZUuwK9oKstLT6L/zZU8l45tdcEBeppZXLDLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":807410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFY/QCRA9TVsSAnZWagAAbkoP+QDeBs0ZlW9hJJfDOx8j\nANBE0UXDsNNIWzEm8Xi/2GI501/H9GX07EUHuxcr2EWG3MU0ogwZr977I2sI\neBM/Ra3Ocf7C0AuvCMcQlkQDXQ0tCQgKhJKXVYSKnqzwen+kJ+9SQ1Qwb2a9\nTT+NgOnfmjhrUHr2CmYwlbR9g62tnUgNgcWf/9JnT/ZLkwfoL4+laVXfS46r\nnHIzlgI2rasiNsfxEV9Uy53B0FGulmYTNQoUAKG/mvP5JpgHDmkB9wem6dZz\nQ03gwMZ6TgbcQdIVLcikogsEJVdBbaiBdk6Yv4ydoeOlJhoRXdwOIUzrjPuX\nhHZ8vSjv10s90q9iSuVBDnESionjtx4qpR2juww/mrFmxXhzDwnp7xQjjLHg\nHbx6LJxhs8139UjbWX6WHkiXbEZ+eHnMOjf1ZdwStC9xEHEmyjzD/B5gPNbA\nQrKo7BKB4kW+vAYDVQo1ZoO5s2f59rYfO5Tr3rFncBF+k3WcJBfyfPgijixA\nrw2W4yxgIAaFZeAOKDE7Fih+lTMyxV6ecyD0Poiit39euoFO6o0EhlqBMAVv\nxg7tieDVWzvvXcNllXKXDtbYWdWOEt4g42ikpAWqj5Ee5JBR2heuMbIRw8Nf\n7TQVS58HNOVkI6n4DiZFe7hHH/JSThHXXNDE/p5KrNSzPk3oXXlfNKsDAOm5\nK1eP\r\n=zCkh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7f48e2852608964b1a287a0a2c36ca7386a56a05","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.12","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.12","@storybook/router":"6.0.0-rc.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.12","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.12","@storybook/core-events":"6.0.0-rc.12","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.12"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.12"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.12_1595248592281_0.5416051863066675","host":"s3://npm-registry-packages"}},"6.0.0-rc.13":{"name":"@storybook/ui","version":"6.0.0-rc.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d6b97e21ec157f90dfba9a0aaccd007442b8b54a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.13.tgz","fileCount":224,"integrity":"sha512-i2/w5olsipacL7+Jf1PZNLibfJw6aOnLoN7rqHk5jEN9hxSwiVmjpz5aMMyadETe7aizvu39wN2bX30h25eOcw==","signatures":[{"sig":"MEUCIQDonX2oeZktWNCP+SOCKesmnpaRA5mLI/zSt8N5Wp2sWQIgFfRE6adfzaPHiVENQk0G84HDnJcHUoLDMZZNqEOx8iQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":807354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFsO4CRA9TVsSAnZWagAA5HcP+gKtojarXOXprakWxDHH\no69y1BuLgBh/Bkoxi7vd8nU9ekiYaTajpqGCUFWYW1CLjVHxVDSaCj4s6Sxw\nKFEzLonlMxB6/d7fIkrJ5LfD8qZu9uVin5ezBRlm/Rtb+iKnSxTmHdHbeHHf\nIqUfZy+Vy6rB4CUJkLvZen2LxMKn79PexB79v7YEi3znozTTO/Hfu7Ekxm8w\n5CDeTiJ5Ra7s6dDlO9DZRgeBkg3VJQSsKc3EOmYnjFsCv2hOXRryJ80O3/5O\nv+vCy2cqk/QPPim3xXhP6UM+mN18te51HvNySOhIADaVF0izMRKBhbFNvFoR\nBWu94wpgPOBT2NHsrGAUySW58SbamhQWsKM+DKToUYFhEh5dGftE7EZ0rFT0\nLn0VY6mCH4cKQG9MzlzGdBh/dRz5SiGZYf3vNZ7HDTfzBwOqgbAZ1dkGHQyg\n8D9TQkAphBGJNpnbqAu6cqC09mwqnb/sRdzopd/OuSRHGvsSScY0bZTSvHvZ\np0o6DEtz+np7MjdCKxndwVehqMHFhjo6XtilOLBRD5nK7HEciprBLN0uJq7C\nGV9qYWWxaKJQ5uOipDoUTGOaC3LNloyqVjWVgDfIkoULexts899YrMJ+eK2S\n0Gtz3Z0x2SClo2QtGNtN/+hh1W4ehg6Xe/XLbTchGRiI1unE1q494Xuqu7Kz\nHDrv\r\n=n6KI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b5a70c7e64cbc6ebec9454d0dbae7c0eed9db23c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.13","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.13","@storybook/router":"6.0.0-rc.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.13","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.13","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.13","@storybook/core-events":"6.0.0-rc.13","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.13"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.13","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.13","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.13"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.13_1595327415762_0.28513156700451137","host":"s3://npm-registry-packages"}},"6.0.0-rc.14":{"name":"@storybook/ui","version":"6.0.0-rc.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b9a1a36e94182afd53a81177eaead0e39c3e2204","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.14.tgz","fileCount":224,"integrity":"sha512-uSnttRFoeCWZR5EtjrQXHVALUByKbboym01FQ15Zwe/IBhs6MDZjufdaebWH5aM/Uof4jZvxnpWZ5nDIuJDrrA==","signatures":[{"sig":"MEQCIAb88rX3nwdJ6Q3B+O33vFDX6Ykm9oV+LxAptbJ6SXXjAiAlG6C2La2Om9Jne6ZsiOj1Q8rikn64nozhCKdH2AJltw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":807706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGGFbCRA9TVsSAnZWagAAY+cP/2ulVEEVz2NQUUP3v5EO\nbXBFQtJjc5e+EQAXK+84MsnRYiz38oCXALG306kTCtkVE2y6Ac3qF8fofHbq\nPGYdhnMOdq2wg3iBx5+GCw4kMKaAwBqkeri9RghVi7N5VsAw7eAMSgjnGot8\nUBKCl9+qodtVVlApYupxjmWQLWHtgQE2TSQ5fNyn+TN9dmVua+xKZv63uptO\nCvWCZhePjd8kFA5LxRY2sPJdK0NyP8283Ff1WHtvfziAe+oEprXru2mdR/ad\nYb/eDrMCJxp+Cg96OWGUlGTdi5q1Bn3SOsYUipFoBRQDxJIcDxPSBRr2Nvhh\n+GgBKmOBqEeHnrUru54uA/SD6OTWfvQK9j2OQA4t/0v6V6VkM7JuoUHYACwW\ni7APbG2gsDINWAsekpq8ZTCTCBKfoeFX0B1MO876tL6E/qFQV/WdK1TEpTx3\nuAzzJNoFvIm4FdAM8WkxNKaS6aOzLTwd7jERjylvnLLvDQFVKkqRpJulppsR\nhq3FJVnNsCLt84dlARQIrveTu7JB6sRwFWMtbhw7hD8HtEV7kpgLvY1wMGBT\nX6+FpPYgbapncZTzWCVULwLM0p3KzJKoxCC7gGQp3mK/hN9kIY9eHm9E5M4z\nxaOPv6JBMppzuJ+jn2HpLv/DkaiwQm3WmYC9odNz4w0Y8roLZ4pgZu7wwKox\nOPgT\r\n=OCtb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"718fd4614223ebc427911ca5daba122205e63f55","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.14","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.14","@storybook/router":"6.0.0-rc.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.14","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.14","@storybook/core-events":"6.0.0-rc.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.14"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.14"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.14_1595433307032_0.5423293275325589","host":"s3://npm-registry-packages"}},"6.0.0-rc.15":{"name":"@storybook/ui","version":"6.0.0-rc.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"223561cbd3ee4f6b56335e2409cc406c906d98f5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.15.tgz","fileCount":224,"integrity":"sha512-sNSwCuISlrwnC+smJgUSboFw1SlzF9L+0onYk3+/4QtJNXqiFk0UNS3HAoTq8jb7B5jLJPPb1hFDZDSA+JJnHg==","signatures":[{"sig":"MEUCIQDKGMozc/GEXXMeajjIOpTBfzBUioLKWNZZn11AUn/EgQIgO6ZJyVZbfxdf0alBk2cKolCfyIQfQUwPvAS2IbgyaZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":807706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHl+LCRA9TVsSAnZWagAAWfsP/1ZSM35g25UIEK00/zA6\nUPQF3c0OwGX4FzDKyzUSw2GuoKIcU1+ggaAfqB8Cg6fkmw8PVstqaO28gdW/\nVnjvcqqxLT6RPbhfwCzvRFzP+nYnxeEg8toRqrVrpr+Emw3dBgnPtOAPk/fR\nM3aFlvWqBJigW4ycHZfuWfZGvOW70EnBavS0xeJUKUVXNZ+DZ0m7FT/BNZAP\nNl+csEy2QZb3nMI5hfruwzbcgcqhFiF+wRXm9wMUc4x9bzQGSDcwFVERD+JA\nS2HyXes4LjTzrvbcnVO7vyDMl47GTrDC7CdK+gYiSXeX0JWjcxFmqWt02NTx\n9863gcA2+EfG91edKEhGvpdOTudxYJ/ZmOoLkLGhlz4T5/YymBVt5Vo5OYbx\nMXehqS6SjlcOTGLa5XWlJdspYKZDgOetFB5iSQZm9BedgXUxhO3mHmDbv+Xb\n9N4q+yflZ43LdVxiqXqL2iNreO1G0QEJwIxLvS7XRzx4XO1Nv4a85PsuAGH9\n0o9ul/pGRdWtt3WjFWn2e4jQ9hORzZFPOHNiKXetYejYGbYGT+Z2Ch7mDU0R\nCEM0CE11LpY5/KgDWedpB9KuQevS8j3CSG2mEqHVcZkphzth97k7MQoW86Ql\nRoMdUy/j2Tpr+1Cmu0GGGyZ//+kj2qqLXZeZa0MRIVfCSCTTCX1QORtT0EX+\nyzoh\r\n=50LO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7354abe09cb490f732384d8500f0df8be2707611","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.15","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.15","@storybook/router":"6.0.0-rc.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.15","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.15","@storybook/core-events":"6.0.0-rc.15","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.15"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.15","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.15","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.15"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.15_1595826059249_0.6061966548052675","host":"s3://npm-registry-packages"}},"6.0.0-rc.16":{"name":"@storybook/ui","version":"6.0.0-rc.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"815d5e0dc6c9cd7f93dc251292ee9742f22edfd7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.16.tgz","fileCount":224,"integrity":"sha512-gpZdB+8Ss77Jadg0wgx4taZ9gi+HSLi8wT8vAYM+3Hllyj5PCOYUMvmYpWm7x9rogPK3MSOoRKudB34KR+nMLA==","signatures":[{"sig":"MEUCIQCf6f2ZR8m5mWEkrV8eyyUxuSJ+7Ld78LDDz43aV3dneQIgPe+CDF/YXwgn1eSPtKDiG/ai3uqv0qSm2jwTW93vYPs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":783851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIDZICRA9TVsSAnZWagAAvnIP/RlVzU0UCznZK5l6cPC8\nxAqK1QwPDkS4UqD0K7vBl14IwZQPlVE3eCxCAoPEkFejOB86M1srvG+Os3RF\niiCpGXn1/xalRerdNETQKBSfC81uBB+rRheWeDfUaMFo7MbLvm+dRo5jSQ5p\nO/ccWpMGWwhZq9wp+m+d1ZIUH5hVEg/jXRjjFBQDtvaML2IJudKdPnA8YPzH\nAKlfiDPDjNihF13ig2+esqToYfEI+oWhXzOn8qVzwCpn5v/LHsP7OGIbgAcJ\n0gx64ockAN5hSpzrrkvUC4UkQrT7jYn12YFNyFdVsqP6GbDehH2uUI/1auaO\n7ZP8Kng57wf/wKX5M2Sv8F4AuAQr/H53ZMlvD2IYfFLg7etY7WIlXTBgnt16\n8W+hbWNfev9Y4/dDArvBVhhJmMgYb05zgv0EKHIs1jz1W/nFVgDgboap2zok\nZ8Y41Tbo0CRmD6VwRbbxKImeeYee+zu+bv5iijS0UWEm+FTQmEkF005MARCC\nArpg2f876oGrSqAINsbGwTO0wePIHS1Zr2TKWnOqFEBoYNp60mWwKuNPKK62\nPACLXwmLnxD4i9E3eu246Cp+bQHyz6HTaci+cuN1kisblCh8YjUVcrevOjwo\n8DEdQ9b49TOIHjX+5noi0xUd0RcG+Es3HNSo/k9CrYpbZG7U2KyxCtxNazQ4\nToGW\r\n=YTEa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"58b5208af86922a5a7aacdac361fb1e15ba6848b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"rfdc":"^1.1.4","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","@types/rfdc":"^1.1.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.16","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.16","@storybook/router":"6.0.0-rc.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.16","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.16","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.16","@storybook/core-events":"6.0.0-rc.16","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.16"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.16","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.16","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.16"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.16_1595946568248_0.6106628646620238","host":"s3://npm-registry-packages"}},"6.0.0-rc.18":{"name":"@storybook/ui","version":"6.0.0-rc.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b50c671e383281eb6b3d1fbc316d03ad8e495bd2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.18.tgz","fileCount":224,"integrity":"sha512-IrmQ1o/4hio6JfBEar8gEXX0MJltYbTS9JvPF7SXTS0hKlda36S7J2EC4EsVG0poacdzuimPN9eA+xoq+07fcg==","signatures":[{"sig":"MEUCIERc4iC2J0hpdkBW75DoEYf4rphVZnLcWlxoUmsSUb+iAiEAvPl0OXkTEVUBwJjc1bZtAnmdMqv7na6sFiIOxCNOcdw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIbHlCRA9TVsSAnZWagAAATAP/3F0J5DXzS6TuAckJpkD\nOLtPCudnlE6cBsQBK1vw3Vx36eU6k+ud9+aHPqWjFUwLtRF4c6FOjPbzpnQe\nkN6Gd4mwxJqYxj+H6uxeKKR/UGqrlMXRJy9A6K3HQeuf4fKQG5d3Iq0ypWdu\ngjRlzfFuLdAO1TEIKajtxi4xH9kmcXYPfZO/ZjklvunrmxTPiGuFcvjht1iG\nPnROWk21UcriIfry35ibsJmXyWsNzWc8XBA1Vtj4JiKWvBl2F6DHonvbff9g\n7bPIO0hXbqe8GseW4iOsW9Jq4+dPgoQDgKw+gidAXbjLdMyQqrTSptsORfKs\n0fiOyWVc669OUgfXR0Avebua0yJY1sQN9XrVhqQuH1N6sZvC2gT83d5DezQB\n3HeEPcvLymhV89MgiwulDXH3LdcqDDfNmYh7ZyIzEpBBACKAsIRRICCBEuU9\nFt9t6LOUblXRToCKKlF3UxRnN6CkZ46P/FGWJzcp77UmfobmHFRLbXtptY6j\nTeVmuS/uO//HIYO716LvwrSYnoEc9ecpW2LdwFFFVL+mS1XjwAb222Y78i5X\nc9xc++kvVg685GZoFIZXO3KwRc2sEdjKmed2hSN+Y9OOwhDJJxH+cK5j2P0G\nf3d+87UCqwPGBL6AB/hfsJ9kS5il0VzX8LxC7zEVaVJ4MO6NxKYwzEV5iKzI\nH+ok\r\n=Eu87\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"42f3ea27e0c82d6f6ea2cb964317252ffde27a71","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.18","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.18","@storybook/router":"6.0.0-rc.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.18","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.18","@storybook/core-events":"6.0.0-rc.18","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.18"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.18","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.18","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.18"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.18_1596043749172_0.7454228905478488","host":"s3://npm-registry-packages"}},"6.0.0-rc.19":{"name":"@storybook/ui","version":"6.0.0-rc.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2c675e7aac9cd43d97038ce4e79cd5c4b93ce66f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.19.tgz","fileCount":224,"integrity":"sha512-vGRPmo/kKpO3eX6sBb5NgTqMO5US7pYvLQxZMLqTqyQGkXBblwhzLp+SS98tqNmxQh7HzudtCntzophCZQzNdg==","signatures":[{"sig":"MEUCIQC3Ecy3SkIYmDsIZ9sj7EJvyjwanhI0UF1AW5y5/699sQIgfN5qk1D3FIglogo62LXp9YNqTklk9hOybqnF56SuZO0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIvclCRA9TVsSAnZWagAAvkcP/2Jb3/fOh8bC3qU4yQQM\n9NrIXjWBUsKdaCUCR3jsVDzQUMLhPlsIvjBtS//bsQz4trfdqKOpiXtRxxWB\nJltWnvcN1ty4Ddn7MW86+ecPJWCFf+OWZcctXAMufWj0uUa8ab6967/Z+HTE\n4mylpCuXrHSP3g6VcsfJYtFFnNfMW4MhTasGE/KLChbkNQELUhQTDeCQpoQg\nsM3DxHtheK7sZZL7vliBZEvvMfHXfdZMGJNk22owzgVgkdXp1EuO6O2MzN4u\nC2TokNL+DM9MrQJxW7YYQ6Y2ftIPBKtd2rrhoBAwBz3/czOk/se629up0AFo\nhLDzlzUvMz6SoihFez3XDoXME7OLTCmyrXKePyCVfw/ftaE24nAL8N8B+wmZ\nRO00wS8mqID8p7HlKJLdoF7nzcTdg/mdVHTNzX3uMdPi2oQa90hJvH/zz/PH\n6pRSSeBTsr4ziWEBlGNnso6Xz4BGYAtHR+MpNU6NYFVF0uxgGhfCIPg+DMEi\n10ywMP3t2/caglw8rkBv0oNGyxV7aJmMTKeI3JeLvxXRc33w1vzOy7xhaTWl\n5MRac4tmgJBD2v+jyc3zWfYmHkD6FOSWG9HZd54ReTE4wf3ihEX7DU2Y6zpN\n+6DhYt3BR/+ha1UFE4cJ+JmYYUtQF34JuSeRLPIwGSyKuxQGpQv3sWeu6ZAq\n4ZG8\r\n=MRGj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"22f5d0c54ba4c6f04912309a3e93bee8056268a7","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.19","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.19","@storybook/router":"6.0.0-rc.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.19","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.19","@storybook/core-events":"6.0.0-rc.19","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.19"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.19","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.19","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.19"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.19_1596127013289_0.31219492702609286","host":"s3://npm-registry-packages"}},"6.0.0-rc.20":{"name":"@storybook/ui","version":"6.0.0-rc.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bc2abf803bab923b2ec6aa8b75a39e1323f6ef92","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.20.tgz","fileCount":224,"integrity":"sha512-mTVb6pjKUd92/xC8QE/myBRRS1Qet+TdtA6EHBnmRe4bkJhVF0nNlgesoC3pyz26DdgYSkJoNSew1vtGcntVvA==","signatures":[{"sig":"MEUCIQDVDBVsergg4IG58IK2dxurLwD7YH17HIbjmUfrYZ4KiAIgD1VfbicH/mY2YqifR6VMN5zuXkh4gplGjmOwx59unvs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI7rQCRA9TVsSAnZWagAAoi4QAJoJEgemmGhOQDt7La1e\nqB4ZwtrXU04JAgR4ab6MUWiuGpuLMx1pCMfchMPrvZNueV9ouxgVgCGjkdaa\nrKBr46Yy04WPj8II8B8E/ngqUDRBWqJUApyjFr5z2PFbu5BYBmvHHdeNZIcd\nXmeCEBRtteM3oAYgfjP1VA/EUtwkQPo/Jcm6Rfs9uupEe1XgDu7wOL4RRPIw\ntZ9dWG0iRzN6D7+FGKWiIhmrTcfAj7xkEc9SZdR3MqMVbdrFdJjK/1idsIED\nqwx5/LrzmDKoC/ZKYtGL+EGsrAvotDwYrmgu3mS458JFmb6Q4Mq9m2SVwKtt\nVgciJbmIx9caZn5DDM2VKmegIMHNW6sEIN8LlvTqLi/LjWippFYMjQpDe+VA\neaCYkLvRZMYXkqF+2/CQUBo6AajMhuEaE92DXFRmssrxlRQ1vVmnLSZqThwi\nSyU6VV3dukWtClp9CuLhacUw6xehRgQzfQ5ftA6yiBlwhZ8ruM3ezXefTIBp\nWml6FhlE/sC30ctL/MU2Ekh0H8r5KOMZ6WxJSu+LqyfB6JTAzNEROEgo7WHZ\nz9RLcn3lYxDxQFbKlGgKrHFQJNLkEvQO3XZVG6Yu9oc6vjHgXLwcArNhSChj\nPIIwLeBOA/Y5FyUs7crUo0BRjC1VR4a85cqDI/KR0XpTKG+dc09aI0pV706h\nNi5R\r\n=cIQk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"329836be34282e34417b21e65d2ae7057c1e75f5","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.20","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.20","@storybook/router":"6.0.0-rc.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.20","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.20","@storybook/core-events":"6.0.0-rc.20","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.20"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.20","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.20","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.20"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.20_1596177104245_0.7866874184099226","host":"s3://npm-registry-packages"}},"6.0.0-rc.21":{"name":"@storybook/ui","version":"6.0.0-rc.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a1eb3bead64254d7229f59f1d62bef7ab2901fbb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.21.tgz","fileCount":224,"integrity":"sha512-nBMutH45R27UR0uX0fvqKdvc2Vy8GXsDWN8HSvTGTvW1agJ03I7Xy1L+S5VZmvGNI7ckd0acUVraTvqU4vzMlw==","signatures":[{"sig":"MEYCIQCqUSAJlaGP2J1VjdgMBV0dPk78WI6ysUukcBhqnMgzKgIhAN5l3+luG6uavkPDHGazuZIQfiTSNbftvy1dXryBJycz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJXPGCRA9TVsSAnZWagAApQ4P/3Wi96e6uYaf9CB7ILow\nmd4foWX1gNUQEta32jR8O3b0tUepafpUgDGNahYlMjSohoYYVNzP/k3jLmW6\nl9KEoiRmfQJ7dRUia9UKDNMTfvuZMDLoDjMqS2sBvIML/24/sCSAhHgA97U0\nG5RyARpYU0GIgrGZPOTUTOVpZMldUtXe6gf5gWHbQ/8W24WiONRj7NJJG+Pl\nBr0yss4T9tBF1czvP55bPky/LLZm/bnEtnOY5uVPSG2Ft59Iu50viAdcXTvf\ncJ52x9F7JuomG/TCCMZUJM5xekOBFzuu5XrZMToV6kNDZTVYC8cV1f6mSZ5e\n2b1jMjE/MDgcxQcsZVJ8ySSSha6wHIFsv0C/7qcZffMt1K5cHz1Cfg7QlBbH\nXh3+t0YnZOMhwWrqQ+6ck+WgbBthNci3qJZ34mqS4OV9+xnnUYxBJU632/jR\n3XQfN8MRN1WAHgKuXP5Iy0J+4hM1CXIWXCIZJwwFzGrWMRMhY1Zghmp1O7Pz\ntI6ODozrk3dYdatTIZ/zHq23X43wS86vg/LPFXys2AfCx0QJCyaZhzUkKXdP\n/dbxvnmoV5MduoXa0lnkRhWhK7oZWoUnegOv6bWnynpFCPTrN0G5BE4xiOTq\nSLTyQytvuYS0XSoKILMY+q3VVZSfAPW0XngwfRM/BJRASzm3AUZ14LPm7DVx\npBl2\r\n=pI/r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"aa7ad3c00f46366cb28205e8fd82689afc4dfbc6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.21","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.21","@storybook/router":"6.0.0-rc.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.21","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.21","@storybook/core-events":"6.0.0-rc.21","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.21"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.21","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.21","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.21"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.21_1596289990514_0.7458873307124365","host":"s3://npm-registry-packages"}},"6.0.0-rc.22":{"name":"@storybook/ui","version":"6.0.0-rc.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.22","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d2d702e334b7dddbfc8aa794103ff1e8520ee1a5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.22.tgz","fileCount":224,"integrity":"sha512-Ax/Qjtw5hd/+RUUf2WanCLCze0bT6BHQunzHXPgJx21kNhsCA8iWhAvstiENJkL1WqRewaZZsLmHMPR6OUdIRg==","signatures":[{"sig":"MEUCIQDx+foHPXTxcLEiMHodRToWqw1TLzd7qE51URTj9SO5rQIgVTIHhiyzeY6vq5YQ6WF+Y6ULmMKXOPqdWb6GJ4D6Pfk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJs+mCRA9TVsSAnZWagAA9h4P/jnY21/4c7oB9DQVC8/O\n2+uwABSGMtKPXaP2e4jsi55fBnE+3Wq3ko9UofHdmUYInVDLvV4UdMKET2rQ\nn9QO4XTF1RcYsp78hEF8+GHDEaP1QFaEdvahYoTVHKVvTNhV8MjUv/JUz5lj\nxwFUh9fzHa9GfxHFUz0AVB43FuV5roeIxndlCJ2DGAvW+YZ4ZRSKIasExP/M\nJeW7vvCrEtTivOjm+iHl7TY3bR+ARKvsqo1iaROQadG7vXYTN+N4n6g6uDcA\nC5e9lxR6idm5NHgcG+FtXe3sLPmgWdcZaxo9XT7JiWwAthz74+ur/DE8uWWh\np0tGZ0BC0Um/PnmS8k1ihDfnDaeC9cjQxlNLBsvDMeSnzREJSjBVUOKPn2Pp\nO74kU1bK8BkXtPFAjcsBxHrjyySUi7T8tZd8aqK86og/J24jCi5QfXXnmVYw\noPanwIQtKtrj/1c/cjaRnQLhIzz4PJ8uAuyEbh7nn7BisA5PfI1j0kdaDzl0\nlApJ6LIr01wIzA5C+OTUVha3tAuDGJFvtwKjMTm8ryap1rrx2/DpbZTX73Ms\nqZQKeFgXP/M4ZHAVmrMqd55FZ2M8qPyr4lTna48AqYH+/OcxfXqFHnuBATEz\njPE0H/W+QOqWtSvLYJVbhTvp9/hy/ZEwKx/dYv8A6SW/TrfKgTNn4NrIfOUa\nkLrs\r\n=e3ql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c2e3329d555858e7a8c1ce8a25e0fc0b245c4747","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.22","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.22","@storybook/router":"6.0.0-rc.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.22","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.22","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.22","@storybook/core-events":"6.0.0-rc.22","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.22"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.22","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.22","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.22"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.22_1596379045693_0.2095953606547003","host":"s3://npm-registry-packages"}},"6.0.0-rc.23":{"name":"@storybook/ui","version":"6.0.0-rc.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.23","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d42d3475b07bc313a9df009f3bc6579b8dfe07ea","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.23.tgz","fileCount":224,"integrity":"sha512-5+srnM2UxVaKAzZ7yfgoDG95KnmGnrfurnMFHvO8fPc4TSdiw1dJR1Ug0WzzZE+1TCvTSSs1ux7E+MQyQIONPw==","signatures":[{"sig":"MEUCIQC/whFg1UDICsHkYgoemLGHf2BUZj25XbDdT5YkDEuDTAIgaLawZPy2itBNXY1v2A4etW+UJ7XrnjChU7X5smuMP9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJ4ZnCRA9TVsSAnZWagAApzYQAJHGsjcWvS60JN7jjDKi\nd2rYDa/4BNwZ9JCc8VN6j1vSCZUIXLIAsmNtrEj0cYrupTGoD0oFEm+3kz5w\nE5Igx8sPtGq77CngJyLvnKGzAtsVRl4vjzZuvyIBs8oYlYdpSl3qVuTQpDyY\nyMOBZx0ciN3RwyRC4BjZLQi+fxkbeEvYyZgZ3qnNGgOFAk/5GHfk9GXX1A1P\nbX3OL61I+1Jv3jMQXnh3hRF9RPfXwvP+SfzEQ1cezVBkKMjCrzQTcj3Zfo+B\njSdG02py/p7m8MeaMBneESdEG/fpjdbA6G0dJGq2Xc0Ve3JUKIQtg0cf9/sr\ngqna4vnkn4eJ0vIXuN9uY1ykNjUZdGVn4OgY9EDDJuNROKLnBgkPExykdZe7\nXbhfbGH/wJrUePUOZMwxTZwIPT9UNc3NoX7YyvmfflWC7NLeVQcRA1YSA9k2\nkpNxnQwatFH4wxVE5zaol3yqoCFfqbKsd/dYEYPShBmFv10i4JSwVWm33ZO2\nAqwG12ob7bbLGBmrzMTy6+daQhk9uZyQBaXt9jaO8dZePsreg6Uss8ucq1YL\n1vAj3Dv6qwhH2FUzGZu+DozXYHjXS3FeAw/5MUxpFhRLk9hWDLJDiTzHw5Hp\nZ1mQt42j17Zwn6vUkIa2sRSTklAVy/NQYqqkeBqCoyvMNI87rBeBvEKVgpD4\n+s+P\r\n=m5z2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f541dfe245537701a0780393633c5453fb19e740","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.23","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.23","@storybook/router":"6.0.0-rc.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.23","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.23","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.23","@storybook/core-events":"6.0.0-rc.23","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.23"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.23","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.23","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.23"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.23_1596425830568_0.8435695223912543","host":"s3://npm-registry-packages"}},"6.0.0-rc.24":{"name":"@storybook/ui","version":"6.0.0-rc.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.24","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"086639a352d0f02bbd4fff544ee494a7a427c7ed","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.24.tgz","fileCount":224,"integrity":"sha512-bYkvXT5YwwY2VTSodAax8bNvV7870ReLuQJbiHHhYef5hezO4jP9oE29C66qW7tpRIL6jq9jq+r09KUC7AaZUQ==","signatures":[{"sig":"MEUCIQC60cErxQdmvKLnIJl54DtY3EW+CaSTKsLO+8zGPUcqCQIgARf+zcbdaqgiNSO7vrOXlNvyvcRtYe6wks9Thho3nmg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKBLCCRA9TVsSAnZWagAAhvoQAIJVvz7GrKgurgQweFgf\ngg24dAG0yI5icIJTVOkf2ab+OzNwJjWrEpvoZhQZERpRkYYFYC3UWRGz4rFz\n4QuQauQysbva661ZWYTqMjoGWbmXQhgyoL8/PcTJNfMtXW4X44GEE8mMj5HV\n/914UYhIKVr28tQ6M/8Od1GSKEs1RtXrJNITaOUt45q8rSWEKRFhyeuE9AAW\nDqgkw4+ACuKKDjFCLRE1Pd0O7LUqSsg/frhgwgY4bVdEVRVzthbNvquye4qV\n6xIHigH4KK53i0gi1xwXgYu3ObuNuLqY+eg6sWUVGkqHWcK9LemqTQVOlGRg\nVrlC28t/fEc3aY8i67Wxq85Dp9R2CJWEHFgoddunIqDuuGYWCFEjFf+bDZPf\n8SKDF3zd2N9+ErGoqbUTwNWHJCnJrkUyBwH/2zTYrloFPtOj0FBD0AMdz8C6\nTYQKOO1MCqre6aKNBcH/VLS5xQum5yZNWgtK8PeevCas3M503ShEfG39xA/o\nZeeEMsOoyb0A5Tx2fxbz2sBzMgwrzY18Wn06B//xWTDxJJpEMZMbw1v1rxHi\nBzmyf2s2oGxdsgZqUO5iBTMtSXxim1fbG8g14tixsvFtADfEiQjoV0wOzEgC\nq8BxppKKQ71qrYQbidKp0uHr7PPcalkAuU2GWMHikiGK0wibyQT0+E1iHm2g\nGtHC\r\n=jjCJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"76e1bf2df32ec75a3909a7f5f2b382b2e553120b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.24","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.24","@storybook/router":"6.0.0-rc.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.24","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.24","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.24","@storybook/core-events":"6.0.0-rc.24","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.24"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.24","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.24","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.24"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.24_1596461761591_0.9198493733287045","host":"s3://npm-registry-packages"}},"6.0.0-rc.25":{"name":"@storybook/ui","version":"6.0.0-rc.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.25","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"52a3eb085109fd0ca85a97bb1f2e703410c6f293","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.25.tgz","fileCount":224,"integrity":"sha512-cj3NBLRj5zQNSQLIfLSBfBMjmnfT1iwFvgbLiZMvKfIFjrKE9Wig2zNQ2ZjYpRQZNJRAgnu65CZhV7ekWRnMxw==","signatures":[{"sig":"MEUCIQCgPUDvNHNDe0wXHmjd76bZHxU8KMMUibOwjWFpAT28JwIgZ9ubiiBzMR7o7KqmXPx/v5+0oeneaUtY6XVJNpw/uEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKQReCRA9TVsSAnZWagAA4xAP/3b7vDz9rEIHbaJ4PMAJ\n9i0uqcLZKwbQCKQhSqefuM8sgtW/URv+APBGy6YiI+KqSMS0XI2ojfZ+Fhya\nHm8QeEPEfZPI+5Nf9nUBSyqcsznjzWVSJ1Eenk3tJG/jdxOxaWrGnsi7Ze6W\ntHXqECEYmoTgozquu7oim2PBfsavGVjfUbtSV7NW9dn7AM2XZurG7dG+qUcG\n5TWu4YRt1QnbKfMpCRGh+AMTISg4Se5P9uUNjuv1DBdVmzxncFEFsNYQu2qM\namLIWhbzlJPbiP3zwtlUhEtYyH6koItVhiM2ntDq+wOPqBI69YB0wleao8ZV\nuypGa/GMO44grizAxGeFkV6ckxzTVJDZwy6YRo/b8NWHNaQOcZQuRB7/VeE2\nv6HWNpEvdjHlDNDarMkPGDXnHy1jMUCJqHKaxcoNhr/I54c4aPqmyQRvt7vU\nojA7sCbIv6q543ztNDa3bDKVaj36PzULmv+2zmgKy8QKm1adPeTcB19/gi6J\nMbI926mUX73FOi41maY9drb4OrNmNB7K81kmLRCqMICIexk8AryOh8R/bZKk\nY037FZnwAAbyQ9oPruBA14vSwKnj54MccEBymjHWd8oj5XWikeV+dDDwIXW1\nfJH7xRWzMpNtdfFKEfDwpBej2218LJiWelJphWpUvCJLklQtFmWNEDSWRmtC\nMyR/\r\n=cbnw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b0464fa1543581b4c6ab2718014f88151d17ff0e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.25","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.25","@storybook/router":"6.0.0-rc.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.25","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.25","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.25","@storybook/core-events":"6.0.0-rc.25","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.25"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.25","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.25","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.25"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.25_1596523613886_0.4756527891169937","host":"s3://npm-registry-packages"}},"6.0.0-rc.26":{"name":"@storybook/ui","version":"6.0.0-rc.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.26","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e43e2b8154b6ab3f59d1b6b75dc4f6df7455d49f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.26.tgz","fileCount":224,"integrity":"sha512-So+9oHmiiOR6PDHZ8dShh/6JYtvalp2KleTavEMEWvASBvwzazKFkrLgbWH0OxNgY/efdZ7jx0kFe62oOEsPgw==","signatures":[{"sig":"MEUCIHOTmeUvB4/3ftUFRTl963Ovtxuwd0EhYNZc9y2DK13mAiEArffk/k8s+3ihrKh1/0olXMZHRCX2HlOyFpRzNbnKr60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKY77CRA9TVsSAnZWagAAlP8P/0Qhab5pHGGD/ojSEBas\nLviwS7K4Qbbg7SKr+MZYaRrm8J/4BfhKiM+lF4KLfExKCIikC/F2SwIWET2j\nxOvHgEPtPcHRJvtOf+WqZdPE2rSDbsCbeP99kvX0YywReBzoH72N2VK0+W4O\n6yRmy6D51y90/Uwo4bPlANpBJhCcorsINcYvAZTbyI0IGuibnfQAcf7YrZrJ\ni5T0TD9J2uG1n6muk45n21MX3a5Dy/7Fz1G7fBTq3sBCiUpbuwmdZiXXY3QM\nQtkY1svkqdPSymyklCfIPKgxELnQyI/6cEX9Lg4KkBXEfepQTQ2dZ4T2ImZE\nx5BdR9H6XaId3J/2AWAKumUrbrUFGzrsstzEm4VWuXDO16i+tghEanhJrGuL\nCgCbdwowV4ekpARQTe9ReRJ5CjD+A5os44C/9p4AXYZRa7yylSIe6N6TM9pj\nOj9F2Ou93D714I3guuaS5PN0JckMnTpagFRXWTYu1S/N/jBELXoiLSJVxcTn\n86ZZ/Zg1v7t3KJQbuGppi0OoAJZL6GzWSsG9uoWi5A4ORfpch6Cp4j12p3a1\naDrd7+iHwr2tV0IGzm51nf2dAsSX3ODCViF2OlpUpUYDV6HPKWKpF1jRX7A7\nTKKmQhoGmcKOt56eLYxi+bdrrjjzI1k0CRNRv63sAlpxfJP2zKrsf6uV7HUW\nQtKN\r\n=1Qz8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fcef77bedfdb9ffb77cfbbd843c05cae67f1a749","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.26","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.26","@storybook/router":"6.0.0-rc.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.26","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.26","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.26","@storybook/core-events":"6.0.0-rc.26","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.26"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.26","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.26","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.26"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.26_1596559098759_0.11416344120225319","host":"s3://npm-registry-packages"}},"6.0.0-rc.27":{"name":"@storybook/ui","version":"6.0.0-rc.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.27","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f9e0e43aa19db8a67be6d133973e7a9be909915e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.27.tgz","fileCount":224,"integrity":"sha512-6RzQfsaed3zkQO/nwFRqW6qUZABxiJzFTsw8xIXvmy+5IWG06kYAKIUNAwd+tiZrxB1YxMlPbEYQc4QSWLYXiw==","signatures":[{"sig":"MEYCIQCcfF4zBqDftH4fbiMqbrKL0G470BCk9bSVBnt3VlHy2QIhAM9gPMxxUgKLCrw2RYrje7irSeamHSAR13xGgf1MGo8Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKvSWCRA9TVsSAnZWagAAoX4P/AyPCwmhx6JJjnsMQWFY\nyxIzw6tTINSr5HvSmmpyT+dKtJD+6xRSm1WCQzWbYewg9wtiDNX3wjCu3AA9\n8l/iucFZ1OceNOWU85Yo8ydZeql+Ba4tAvYIsM2KwahtUrcdCa3G3suY91a9\nYr5UetrrvdhWkpcaStUNYb+6haYs1X6/zgxYThNpfrYXr1yXjdI36QmTFMyt\nLiVloD2rH69AhFRVCoiQYjKVERnAQao3T50oZWwu1Oo6Omb3KxVsxB7a4XpF\nGQ/BbcdjwufbOdajQl4eDCyQvpQbO77BWHTsH7gKIGlNfAIqHszqsRsmJ818\nAk1eBbT/U296fKfRqzVVaHrQcz7481vWFH3arIn3ArPqNoyg1dp9SlQlOFym\n2BNYDV/1AEzCG+07Ze+OAUCA8/PknWps+ixlXxzdyO4QMO071Fxsas4GGn/4\nDzLTtAEfx7alSFM+JYwbmkO2DRwAr7cX6yhQiT73Eiy5QofY4TK5HIw59e6Y\nwlO7jOKSVcaFibFooJZtyvbS87YYA4dZz/J2p/0oob9ANMXruzJ5+wIfpRMy\n0BTgdkp1wIji8P/MaVq6GxpfC0e8RktdGIfdV/qcYI3CdzTenvJHwkFf/uw9\nSP+NyXpn5U5xa3a9NWEg7jmu3/fOLpJRbFEQBpQkPA5Ze0X5gQofoUDHe/uR\npwlX\r\n=UhNw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"54e931312fefba535140b6e1290b3074970de978","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.27","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.27","@storybook/router":"6.0.0-rc.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.27","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.27","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.27","@storybook/core-events":"6.0.0-rc.27","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.27"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.27","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.27","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.27"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.27_1596650646212_0.9803271776138849","host":"s3://npm-registry-packages"}},"6.0.0-rc.28":{"name":"@storybook/ui","version":"6.0.0-rc.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.28","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7fe6984bccba6c796a20a8ed0085c08679c6add5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.28.tgz","fileCount":224,"integrity":"sha512-WGUlkoki2FyjCV4BlYvXin8a82MFIfB4LJcMncniSPdcy9EDPKlP2ObVzH2IOSox7AzWVnmwbXwJ816TP7Jucg==","signatures":[{"sig":"MEYCIQDViPzfGRRG8yduXXSrWhgcd5icC6dyGYLt45KZISqbZAIhALOqAi3bV2qKLZD+NVe0eOIDeacC4+92BCZMNQMBylrB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLBpjCRA9TVsSAnZWagAAZlYP/jkJrRNATLFPkFODNUwX\nj6xe9R7LZ1iOzS2BNfdggmvCQ7vc6/rqS8JSynx3waz0Wz72BUtIztk2BrzQ\n+Mgo7SW8G5MFV3RRmmdzELQdi15Ic8BmWWdvTdvtaYTvr8qIZG3xPHpGQf5c\nol2I4KjRm1up7TO3ZyBFW7ANVLLDAdlE5/g9lcYO2tWy3FrqVZmJKa/4rog1\nh8pvkoCalLUMqCPXf44b1+ufg4+ds1682lK/G15bXhCRXZrXFKRfufGB8pfP\ndXXLQVU3gN115eI0+DhbFAMJtEWkKhOEewXIEBrYBwUsR8a0tEzDjCalHxsj\nFgSEun2dqWcqOrI305nxnBgul+4+qre/s5lgut1SFlpK1wMS9ycR7yy78mjM\nQ1iBEM0qv6dA1suInyh8Mcu+bNuGp6JzD7yAAMR/gVUz4vjdTdbvPcf3apF/\n6VDpX1Bs5PR2Ky1G0qLCyTi3RM4DYaYp4bBt8LC3mztUR0IasRLygnJBCJMH\nbicSa5L1OBkn8tEifvE2PXOww1i6rbouwG1bumnfsKGnAf9CZHeB9d7A83Rt\nU7W4mtszIPsjE8YmqYWEPGUkXVAsDdW3BrF32+jnglqBRg6o2MwqYqkUFUa8\nRK6cyYX+r46D+UKzNND/X4OkiPHg+5YfABMAn2mSJLhslYEpTlOvLoZs4KbF\nZV66\r\n=usEt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7a8556f396217ebcc5c1b1b91e517efb9941faa8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.28","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.28","@storybook/router":"6.0.0-rc.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.28","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.28","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.28","@storybook/core-events":"6.0.0-rc.28","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.28"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.28","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.28","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.28"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.28_1596725858998_0.3185497006437932","host":"s3://npm-registry-packages"}},"6.0.0-rc.29":{"name":"@storybook/ui","version":"6.0.0-rc.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.29","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e961aa0bbbeceed9e661a9d5e18448dc130a3e75","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.29.tgz","fileCount":224,"integrity":"sha512-4POcRtLRyitJiWdkT023wHWF82s9RZkr/Yj5X/XZoUMnY+Bcshg11EoUCURI+T04R5mQyS+AukcQpvYO3RTFZw==","signatures":[{"sig":"MEUCIG9IF0PQGWUJY5HaFJSJb6b4wamdZYUFAjzmuHQGapDzAiEAptNzG4q0SUaDSr35e/+46BKFgejHIwTfrJQoMe9WUPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLT3eCRA9TVsSAnZWagAAz+cQAJ8OD2vKEcxDL5x4S1DN\nwi0TmkjXRGTJIoZr+EJVmy/8WXtkSfZue3WHWAfmYZNXdpug1WzM3sj8NhKv\nsC69Cy24RGiq3BHveXvnguuotmOJnkuXU1devXPsWHuRWiTtA4Z9thpz5c8I\nNCtIQHl/BOscDev6wcAg0020koQiTcOibIEJnhp3ZiTmuXpovzHjhC25mFU6\n7Lup94QcEbaq3o/W5uH9xLRnDANg8fdm6NY/e6NgWfgtXk2J7HmGfpKEmJxS\ngq4VQxHAdMZEiWQGSIcwX4cC/F1HV/gtKSvsZhAvmrKkhEMXOPhRYa2POXcE\nxPVVkXfVRrhzWwJjGCJ1xilmq/rmuqgi91N2bqydhLH+RoJ9b+q+sYPb2x0r\nkPJ9rirS0I0zPaxzrVyw1F6sZRpv0kopCgmrw/0Gg9yPnIF/ejm3NpQ3uoVC\nHUP5bKO5nEDMQbwX8+x7Sha5YMZ7jUTf3owQT7kgSm+831QTQ26KtPU/WBa8\nxaKqZQjJo/aAtexD1R+FzhvmDu/lqct2rKYNHtMrPR2itZDJ96Fl9FMMq8nr\ntp2EXMWJdlgxA0Qie3kJ2qLRkidnkP/iSAjZ48+CSSlno8AW3XUL52CIF1OQ\nwBBHFOTfjryakYreg1ShpYYuc7bFL7PQoX9hwFOa9b1bdmkm3KgBGfbGvkMt\nZoBq\r\n=TdS1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d31e743fc15970ad5722abf4678e03be82bf8b8b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.29","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.29","@storybook/router":"6.0.0-rc.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.29","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.29","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.29","@storybook/core-events":"6.0.0-rc.29","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.29"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.29","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.29","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.29"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.29_1596800478339_0.3982382466667045","host":"s3://npm-registry-packages"}},"6.0.0-rc.30":{"name":"@storybook/ui","version":"6.0.0-rc.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0-rc.30","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c7c81840d3e416ee56b5a9885bf77a24c5203f6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0-rc.30.tgz","fileCount":224,"integrity":"sha512-BGuYTC5sACx85yUxoArRJLu2nci/b6Qas+aJ2VOsLQBxxJJXTGibqIVO8ZnBrK67xqdm66fC/4gmk/U/fF9X9A==","signatures":[{"sig":"MEQCIH9USmjJ3olotG6KEu6to5CgKXMu8mhjkMOCJ9wK0+bxAiAmp9RmcDX3nn6utusRgO9o8xZAGWK0tKINd/r7loRbBg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMRTFCRA9TVsSAnZWagAAPIkQAJElLkAb6+x2NpUALMus\nKf81Y+fDk/wN19u3KxH4Lw/vJTSHVNQyNa2qxqK2fwjAOfw8Z/qu/HqytuDP\nnRHk4rHRPZfdrpOUPq3yrMnBI/kUxYa55S5bhFjO06ySqUgBrPqEAi4tXCcK\nQpdpXjvuGEpKkGSeIrqW7GRg/Khw0u/KuSr65IALl9TJP3E3kVc67OpJtnqv\n7MOpf9VcCkJWGLivOxHXAvVCCs/DhlAyrFPKxIowvuYOBCvWzCZxXris0OEm\n6NsPRWmPIr0g8wUoyQgQ8YrTzvyXRrERspxPxtJr2AFyqz1SC0thnpZasSsX\nvY1sc6Xw9eMsgUcHfEp/O4nNLCV+1effqMzexQ0ejEK1voxFGlUNAhOzf91b\noeSpgcacQ8GGOuMpsZJoJk47LWw+5Lp35Z/iZa3vJgBYOk3q1KTqIRXlPdJ0\nCzoEod9On+3GfiEOl6l0Xq4Hm4a16AsvlvyHX//jVshh7EAc2XvPB8sdmms6\nr7y9sCVAozq0WMgTaUugNzk3eAFui1NTQ7DFktqtsm7cWct3MI5rIWPmPHtD\nk0HWy39A/95vf8iAsZcaL2L5iIbFtB0rJNMf+jq0R5wPIIhuwGSBisYd95w6\nLNfS2vZodGxbkXx+RNwu+iG/jFivHMw520L21Guu/bovSX7K/Qw4Z0HW+KSt\nnHvG\r\n=8osO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"46bf85714342208cf612aee130f8876ce56ba46b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0-rc.30","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0-rc.30","@storybook/router":"6.0.0-rc.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0-rc.30","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0-rc.30","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0-rc.30","@storybook/core-events":"6.0.0-rc.30","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0-rc.30"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0-rc.30","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0-rc.30","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0-rc.30"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0-rc.30_1597052100981_0.8597430430693209","host":"s3://npm-registry-packages"}},"6.0.0":{"name":"@storybook/ui","version":"6.0.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"13d8a701c463aaa102c9e3220b87c45630659f20","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.0.tgz","fileCount":224,"integrity":"sha512-qhY1m7uT1yrdGU/+3HlScJamDIwSJ7ZmDrGkgT2BcZuVvrZPMGPlWUWFsBi+tGqQ+mCpnoS13QpYd1qbTLmgvA==","signatures":[{"sig":"MEYCIQDgSgOTRejZQsqGeBocEkzIdpJZGS+UnBNEc8x2zAHoowIhANReKTTbvl0QjT0EAyue8kT+nNCS5BmqTeCPS9SN3flw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMj3oCRA9TVsSAnZWagAAlloP/1BdeIt72lVmvIrv1tso\nuhDfnWUrmV1PAGCSQb6+567PlbwGV7P588Tunk1ZVD3w3NvBHm9X9GCuLom4\nZ5PzdhBptZ22Bubtw5KLNbE1El8+kd250Jp+sm1Nc2zYYqFUhJfv/rsCWSf2\ngWQoHBItNzeAhxy4HEUPeC7wrQiV1/0DhLlTKH17D0EnnQy24NI9zG2jouDl\n1nV2ASAcZKgQh5W4wm+kxsmPRToclanlwb96LdHVAg4sV623NpsuE1vZZ1kR\nk/YMEeM1WskuPXkWIwdHCWtGooDNjX8dyAndeQomvkD2bUjw2PWjs6n2wgiy\nJNCB6mml9mVkIbTVggZ3PI2IlWod6Bicrc/i3gEvwkx3+5Ry17dP2VfOOnGW\npzquPRotR3gpTJ0E/BLHyTzaiXjDUNp+g5VcWNbtYOyUT3/SI8NHwWyWIDya\nL6E2CZW1HDYPgnjBrqOpyOzzXdT1jKyWHmz+Gopr4yvgWkxPqm3PMd70RWK4\nP57YNOw+Yoa7r+4261aFcP9k8Cq+LrxRTsWMVJHvPrfNvvHECQvrP/Jg3UYK\nWQa8NpuTZkjnhGDW2N2oBY8CQyCNJUG/Q5Bf61e/8Xja7otmxKaVKehIriaf\nElD+1NEmJGcWf1bY83SBoOb04SqruJplqgZ05cUqc1omEMKYAjsX8Vl0UADo\nvf/o\r\n=2Wcl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"b97e2eed2fce5e124eb825e2a3c768cf8e134219","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.0","@storybook/router":"6.0.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.0","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.0","@storybook/core-events":"6.0.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.0"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.0_1597128167774_0.8362363286426988","host":"s3://npm-registry-packages"}},"6.0.1":{"name":"@storybook/ui","version":"6.0.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5377f18783ac69b5b685a855f9e2b8183eca65da","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.1.tgz","fileCount":224,"integrity":"sha512-bkbJS/ZSruQwAhZ7iUpfwk+Cqeav0uDm7X3o8fjGOxoeuGkksi7cVw7rBRHL+oORYtBcUlcv/8pKR5cKtqWDAw==","signatures":[{"sig":"MEYCIQCzitJ+RjUZFFP3csORWWjvpNHZxM4tKrz6uHCjt8A9sgIhAPBRw8ih6btFB6lPFeZuFNvpwR47z53CFSbn2XC92+g2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMoQzCRA9TVsSAnZWagAAFYYP/05suV0XXPZALER9N2JW\nMTj80/tJorVEkVhhImHkAL/+gGwOmtDV9vVVsxNujxScbgzQ7uhg/XmSLHmt\n7xUYP19InGA+4wvTn1Xq6bV6UEb35ZX5tZe7hXjFN00wJU9NIlQ9VN8jstMs\n1CNA5XbrTNOkmG0Avwzs+IIsPH1DG52+93+8ZknocYAK1PRgS04IiCt0qqne\nWBXIBxtHkrdY6qgPjkGuZthE+IADxV7gwKJfIvjQFuDrI9pSKwqBGPI9MVvb\nc+NUjtazrNzeCXS5RTJW/xmuqclnELxwyTf9W5WQrJbWNm2tJPlLvOTgHrt7\np+rm7kjI6B13HIKwiSe5+bCGNXkD4+U3kdj/PBJfYZzERRU5S5afy+ptX4nw\nrtyu/3i3pjqB1h8nYPB/V51IYUzJTSoh75z4Zz39wMPzuZQpJ/xN5ElLeUKf\n9T1vJoXvv4rUp+C7WWMQbRQAtRttHUcDYZQ6iopDLsIvzlwVeloWeRIGge4O\nfBndP0mD8Mll1xkQ3CBVVPiEr+ReY+pYkmOYiL6fPSYXtr2+FqBWlqZOSmLB\nhtdu8OsFMY7VGB4dQo1oV3yZq5yT4gax0Ms+sRIXtGTwrL2nB2ALx3Q9Q2SU\nSUWo9BE+g4xDLby4LywWyv5NUlQgr48Z48iQaum0jkmltHIHkUa/EMgc6pFF\n0hQw\r\n=5z8b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7b5b726aeac3de6eadc4093c2f054828098df5be","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.1","@storybook/router":"6.0.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.1","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.1","@storybook/core-events":"6.0.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.1"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.1_1597146162916_0.8535232889368569","host":"s3://npm-registry-packages"}},"6.0.2":{"name":"@storybook/ui","version":"6.0.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.2","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ecef2eb3dd82888c5810a7b27a44230bdfad1587","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.2.tgz","fileCount":224,"integrity":"sha512-K0BIufyit+WFMIQhRYjjwDQuORJ/yAotIaauub0K4MQo4GaasgJkIaVs5w9O8yNbmx9WuAIpRhZLXbt+0HSxCw==","signatures":[{"sig":"MEQCIEc0U4VaASw+eABRjkvZqywVbM2a3ms2skGgubrryCuZAiAB/qtYrBkiFlViFtRSrkjZ836NxXfk9p/orY5E1fORMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMrVVCRA9TVsSAnZWagAAfHoP/3ig8KD4xV28fki4Iooe\n1SbuO4AU9SNlSqtuFfGgAS6Qo0dYXmiOgngkXKcKWcXV/jklQndRX7Cjytpo\nY7jx9ag1IKVRLZ0Y8ta/Afb/V51LmQtEKhNhsEV0uKQ74wVxJoPQQRC3ScnQ\nSMf2me0NQ4UgcX1LH+oUfxvJwrEz070ho3B0LKE8EgaiLFeTqVEFm10uxL4h\nSgGD1S49e0kvfQTAP94Vav+n4NgY504/FezxqfCZNJWQQFP2/OBkKM5WsHjn\nWGYakszKXoDHpTL2EfVCdh2Os11yTr3zlhe2j90KDi4FNiG04ry0o0eWI820\nbdEtRpBecxXjDXxrH67ST7Wv6hcEc2XNG4RVIvYypLTYIVNjFcGPQtPpWX+v\nIfPiXHVDGnBlczOSoXjwJYfodZJLr6JbI1zesR6jPyFolErqOKy5bcn5Q543\nmJgihkelOQHKACRooFi0Ev5EcRxcOGGhcvUNhwPxpfei4i+8bybcqr6ejs2G\nAb6B0/JPnOIiE/Dt723CIT6ljiQ0aWHCfWCoMauQvNAHKSP55uT1seV8AaF1\nDmzikb5nOHIIIqo2AngWXzcaYcjd/K6ztA0WRYxn0Ezcy4x1MuU/4aPW5jab\nFvY0UsrTHCUgOturrrj96gbhYWj70ueO3E0xRfjPjAWmJ2TjeH/XVd8bRfAz\nsmhm\r\n=JNwh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"f407796692e2809d3d5b9d5b832ee787097041ad","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.2","@storybook/router":"6.0.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.2","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.2","@storybook/core-events":"6.0.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.2"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.2_1597158741338_0.8636288035701236","host":"s3://npm-registry-packages"}},"6.0.3":{"name":"@storybook/ui","version":"6.0.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e37e82159587c48d56087bcfdeb64c89676f802e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.3.tgz","fileCount":224,"integrity":"sha512-iI87W7WxInvs+N/dpwWz2mP8+IOb/RdsGSaQPQ9EnmsxNN0PUGzPvUttm1JzJOilDa3IT24Ha9lcj3Z9aBeRow==","signatures":[{"sig":"MEUCIQCbXigO/WctwRZPTR0p7iA8VNv9CO0iUGwt+m5FmuZoDAIgJv9HIW9G7nR62PTEe4EkWMuOuDhIoc9p2nwUl+qhISU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM0imCRA9TVsSAnZWagAAeHEP/jWafrFQxBkcy1at67jd\ngmGZsA8qG5CNTD08uaQmfEgAVuXV9nelJdxLD958qCtTANkBSEpVqAEDW/dq\nqFpLsITT9kcPOALAsI78nSAMhSa63UhaalItrFvvHbV/R0411qoaQMltCjnp\nWFQdX/KRtyeSzCVF/ya305QbnRLFMwoqBYdqfPVQ/TPJMtcdN1P8tMYekHUu\n459a8ehd+R9dk925kjqYmoqd6uyL/YygiULZTS45/aBD1nnBK17Q7YzaTnG0\nphViV9GzIo9xaHqBR+lajUHvxU3clAwBy6OPSsDE0Lk+dmJTuG4LZpI4XuA5\n+6Gyy9kRIxhRdGU3Zr2CQMARtLoq4D2/e5J3tQt9TVoOY+J8wsjhRuuuImxj\nTeBouHvxcTQ4zPxEHYd+WdpsTxXFxlOwXSe+zrl8aqCxM4umk8D62qGzkEi3\nrgO5gi806SPdgWLRYMgFaixQMnGUo07zrz9adQdHwckaX2nxeeFAosiOuE9z\nvCygROhf2pu6bz8qBerunxAP5YGlFO6cVx3yQqaFWbiockbTgYPZPpgodG/U\nu9fpufZ9vidW5kVyY9kYPF66cI8feOV7jntck5NIJoejWPAoU82ZwlBOvIxl\nyb4cJLMRx8rXNfZAWRuDWcxwTy8lrqvqTDZZ+F0Q9+KWmeCCSMjJvbsobVjo\nHsAM\r\n=wm5s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"0a9ffbf955848072ef8971e4023e8388772f2818","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.3","@storybook/router":"6.0.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.3","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.3","@storybook/core-events":"6.0.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.3"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.3"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.3_1597196453630_0.32202826657241457","host":"s3://npm-registry-packages"}},"6.0.4":{"name":"@storybook/ui","version":"6.0.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.4","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8346487af2c814e32178deeaf378d6c45463bf53","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.4.tgz","fileCount":224,"integrity":"sha512-8b8jRUNc3psIsV0MyaazeQN7tQlBuUy9VMyZrebi6OGA4GS0YE6J7pa8GssFBxr7u3vXY/kG3lnMLyha6C+elw==","signatures":[{"sig":"MEQCICHOZ28d7g+uX6gtVNKfOWLEO77hffHb9tS1ZRA/rMYLAiA/IeoxJep6SyTdYQuXL3j6XOo09O5pySnx9Z4hehymrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM7Q6CRA9TVsSAnZWagAAqrsQAJfP1loDVFnwIRnTMEqh\n1vcaRyMF4wuVTLLwdR+A9/KlmjtXSPLCGEUZJoleekadJW9fp/Y9IQa5lRhw\nw8mybHYJsxGAPK/0wqtyzR7kvjcWctHCA/AlYbwIokGYk04ZEMivHvAZPTcI\nOHxMxQbIsU5yZTgo1/kdJ4McpeuauxwFuxMs1wOz/g1lc+n748ODwqxv8EtE\ny7U9L3yabJKkcbk0eGzguhITLisVAXwYsQBkjbhDuy5EkPpebLsYZA2ZRrCq\nzoYbPvVrXKGT0v/oSe9mArBSmaebtX26h+y1+PFhMxLTEjjR88yi/nM6JC6O\nqy2Q7qvwP8Hbw+FHMbtiYPiqArSQQ2X3tggWnXrGttTqzuz6olaUmtvrefSN\nZ472BbxvdORkH8ccFxXrOhvMYRpHEKSJiZdl+7l1iN212qqkjTuXs54+w69q\njXa8TXc9g2x9zuI7G3Qme6t6xD3E7TnSBr9ZZ83UK7Whd7Xo+w6DS2demSRf\n4pEqXa4pxyyunUvbietCO54HaDgR4bKza3Xf17S5TprG2Fk/sa99SgegHbPp\nYKW9gQw8BcOgC06eYLmt5N6isDdl+fgmEB+JtGzbs+IrPVd02aV6QvYvnpRb\nVH3nT3GFXPag+pd8vZgTi3UpQVgkU87LZnQmp9cE+kzwKvrBs+hkasrHIzeT\nsu8A\r\n=pS52\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ca50653f3a10879a7e0677d2464677a86678c3fe","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.4","@storybook/router":"6.0.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.4","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.4","@storybook/core-events":"6.0.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.4"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.4_1597223993915_0.23940979864449186","host":"s3://npm-registry-packages"}},"6.0.5":{"name":"@storybook/ui","version":"6.0.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.5","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"081ef102473dda03850fef400480f94d01045fd2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.5.tgz","fileCount":224,"integrity":"sha512-clSxcqSuhZjLi73SLyBMrLBo83A18BP0MqN1o1NXueB3FQ3DA/6Xnsz11I46HsPordnpB6Lobpzbgq9wp9JPtQ==","signatures":[{"sig":"MEYCIQC0SpiZU2R1H2h6EDbEq2bKXzR+eLyzzM9XsH/08D1AZwIhANMO0Jsq2LGtPrH5chsegNnCauNDtLXTFNMwhHxZePTK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNC+FCRA9TVsSAnZWagAAFIAP/1qY5oTq4kdsKTyf1BgK\nn0DXDYFVwtl5KmL8NY3TEH6qxmuqKS/TbDyAGrmQLVPnN5CPbHDyewgT8Vrp\nwD/P1uf6lH3wMUPEdf2v214mbYSRgp6kJjaUPQgOAT+hKySJaaLIuOQ30QmR\nz7OooDUWt+FPIqNmDzw2lJlnVnODWjg0Y5d2nz2mrNQFIHiNnes4OeLrQtsw\nFSwUHS1uIv4/kbiZvpU+prWmny7x+pkjyNbGZ0CtdPMykyrT2iAeVLn4JR3Z\nmX/c66+k5Oby3iBySze6gOnrSnNmuJwlVZ07tT6S7wqkPd+96CzrYqzL/ybL\nZggp/I7b3TDwGhSQ2LnQiknMFBrGYXyJGX6Vj7c8P+E7Jm0YXzfh1lucHqFl\n64QVqs1+SkjO8nbMRHYngjLAEl3hFpXpMYHjq5rkIYFcfBRhWRvpVu670IWG\nh5hvEj7V84swJTHRLMerOIShgc+Vm4Co4P0BLS6L6E7a4JryUQhbCvK+FKnf\nLU7KG4W16/NYTOUY0NyBxdIrQUiKz0IIkvnZWoXY4CY1HDFLq66BFyeJbTq8\nbd6wlWPF+1RMuqF+71Zvddt1JAetCvQdf/lULPa2tb3gXIL+enzNN/7doQcx\nTV1fn4ALanDueBGC5dAskkVZwK/iAJYQSad7hwT46sdQL+YJyMBMLU7MiZXU\nhaI6\r\n=AbNb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"4f6ce4ee3d7c060965f51c48cc0a75848db895c0","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.5","@storybook/router":"6.0.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.5","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.5","@storybook/core-events":"6.0.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.5"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.5_1597255557449_0.730715251441149","host":"s3://npm-registry-packages"}},"6.0.6":{"name":"@storybook/ui","version":"6.0.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.6","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5d941ed6fd107a04e73b9f36f9294148dbcecc69","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.6.tgz","fileCount":224,"integrity":"sha512-CQ9MvUfosuPFOcVAcAQ6mehVA6B+mzlrlt0cufcC5PI4KY5VxG7ufO98PnGblMk4dR/Voy6gRSDdZhHnhqd8qQ==","signatures":[{"sig":"MEUCIDWIbFJmKCEZj2FbvkXshHXRFGY75rL7a/510cY/Sr4pAiEAjbVVW9oCmgj6CK/v3/Zese0cABf/N52XaU2iRNWOe/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNXhTCRA9TVsSAnZWagAAn+MP/1fNjUxSR+Zj1ZT3EgB0\n5AiuWaYm9XaN5yaHKbskqdjXxRu+vFh6kbV7pwMejfQS7xBX6Lwnfv4UVdDc\nCIoF4kMK81k4RBRvi5ALOYwm22bNasuPkz29Pi88AHN/46MUTHTKmn8W3SB8\nGFB/dMb+0dHKFPXD6hVlyZlmNom//1JRuQsEICHlKAMDW4C+K8C8CmbI8du0\nl64I25hGsSQmSJJWcOcVnXdFemOeenuwOuSLODhL3zzkU+pHjNHNQxAtB6Br\nbT18h+weJ8P0MyeH+hrcKxkoJhHSzrqrm2rM4dWuS6ewNdmrPs4zH7hn46XY\nZzFxlh1KNgi1hWGtfgywNpkF9qYQSiXkodntVAhMEJmhseNfqH/Kn6rZRT5a\nL109pTJrpKcBln7eyHc4irAYmLwifAcTo5WwVLs1VHDgEOs/gITwY5EQ9X5c\nhw8PwckKk+BXNptLmxIwKkVAVsU9M7TTLo3Te/9pyufqDUpdTh6NAswiYsVt\nYiJ2s/xkJEFy4gzpwg4pWzj2SqW/qorOsS+J+XDlbaXxqlHaOUa62eEFEr4c\nT0bM/AJ/X4yE38le4EAbdts/5milYNKuRMq5Tb4oZ5yI3UofcyzFRZ7qJMC9\nW2u33D2Wiu5xV9ZxLXqZVq/f5b6Yvj1qcCJQmoDtZpK2GKrTHzF6N/6qiiED\nxuSd\r\n=wKGZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5c8ecbc3456a5d1ac361a8abcab084f113d8123d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.6","@storybook/router":"6.0.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.6","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.6","@storybook/core-events":"6.0.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.6"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.6"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.6_1597339731102_0.6145104593585426","host":"s3://npm-registry-packages"}},"6.0.7":{"name":"@storybook/ui","version":"6.0.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.7","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4dfcb8722913046dd998d1784b7fb0b32c126236","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.7.tgz","fileCount":224,"integrity":"sha512-q6AZEqhUmXxvgf9ZxSC/+AvSsyY/K/mJq3Z3cINGJKlwRQY6N1kGhjg6go4NCSM+a3eq2Zqq/SWAE/6oGU9RMg==","signatures":[{"sig":"MEUCIQD0+lst5/7V8TvbAM64HT2NDr+suwyF/lIxpkPUiRFswwIgD84EcRQEmBvA3BCmG3u5f7DuuzR68FXJa8tdF+OvVNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNmEiCRA9TVsSAnZWagAA6DcP/1695X7mtzjZD4j/vsFU\nLoZ9++utZBVV8TOYu6gVCZb72v8CEOVVFwR6r6GGs6dguV0OOwPvATGs09tQ\nuT0cvhNukdTtr4ldpmiLmmkIc82WmTquAsfgqcJ5uYMg8qLnN5yJeIWY5zOU\nYzKazHY1/1XXs8V8fbr1BC5AyJGeYBcjgwgCjMeqlWuHwBRPASzZDGlEpwux\nh4HbZLMuFbC1CecKLMKZFOqSNBZeQ7j1GWPkefbOgcBfNvTfH17jhhxiDVnH\nabHhbZfWsUydt+T9BhewGIOdqTTY4mGe8zP14K1RWZDwXJ2bpT6Yjq1EDRPC\ncmfv6qwW5asm3a1Q3SL0Y3Vcg3qM3La8zMv17Rea0J2q6NnEbeENkX8FqP+v\nVxWfk2Z1oUgYyJI6YBZBXx6cYk3HBFX9+SltzqglX5euH4+8NGc0SWayiter\n6y5UKzxVUy/LP7jaKa/ZKU06YMWIuJ5chVxL9K9cxSkqqjnbAutFCae/WGO3\nTuB6Lzpp2KDAZY9ZXBr/vNvGPSf2jFPGWLg+2H0Axy+NTcnAPQy95wz/oiPq\nqOaW0PrtXTnD4P81uLhaAkkaGXVl9PupcAgHfxLSk5IXj1XPXSQQ1A3+4T32\nUusgbSDw3tU/OQ5+k9ywtBKBNY986XRXha/yCsxo+hY2wJlLbXvlYki7+Tew\nSry7\r\n=EudV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"2ba756b82c1ad607ba5bde77a445a481ccaaf68f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.7","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.7","@storybook/router":"6.0.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.7","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.7","@storybook/core-events":"6.0.7","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.7"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.7"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.7_1597399329400_0.7669911196153343","host":"s3://npm-registry-packages"}},"6.0.9":{"name":"@storybook/ui","version":"6.0.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.9","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bb4570763df42ce4660a78d7acfb2ecbecedab29","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.9.tgz","fileCount":224,"integrity":"sha512-Kpla5hRYOw86sXyWevS7Z5FPuv630j8RDMOGIbHhUXZkYuUmrSGG9mbabOzRPIuWw7HlzOIBwIPUDpTbt0hLcQ==","signatures":[{"sig":"MEYCIQCK3AxkYqP9DLcRQpC6b4ctQLJEhRNjbDTNoJqQCDy2iQIhAJBhKyhLff+mvxZp3OorAiyC7HEXkrH9OxYaUeMB04cf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN45xCRA9TVsSAnZWagAAE1YQAITB3qEGjI9JSGlhbEYw\njXBAkYeVpnRNUPFQWvRgJZsGPxg3BnUitcfeWEM9nmw85+Uq0bzUXqQ3k1WC\njuzurmldLuy+tQbExSR5R5VbkpiPizJksWe0GeP6rUrakvOWKRVbgprsROoT\n2hro3vvUx2sWxdz6QY/2Xj6flaFe5W95tYXKroSSJzhWSyJHGl1TMQRqJ2sa\nN+ktsuxcforfFMKZtwXkoCBXbhDfqCd0Y4ekdTJ3PKr6zbNwVxK15dPynj7y\nmms9wWDmDVqifRYZPRAgTiiGf8vFa9aDWKuOzorHY/7BMTKtgXDCh7C/bpMd\n+VH72VPmg7ZJFmMc/3YN5bL6FKvB7pKYTkhgcN8z+OeSE0cSfjmfSas+CV89\n1UEHoETcj3L3rh9enZM2YD3AU5GOoobc5HsXtm1sUVtNc0XKqsQ2H0Bhplf3\nfjww64YBt+25FaqJ4M8RAxbY2UWpBkcK+uaVal0xcmcb9CNuBsq1bqdZMoWS\nt1Zhpa6Rj8DNaoGyqdqlJyjs70KkAMNH4r8Xf2zzPJ/qK6Y/lIFFUyr6x367\nrRiF7Grq6iNJgZKmF3GW6y32bcwDGe1O6twhd7GLjy0UczztI9cC3BB0W1s7\nZq3OapTTIl5WEFjbK/HjnWa/oJdJsgpdDzxHsmon9e9l/XLJqxkXKiU6OGJH\nes5l\r\n=OUlI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"23b6d64e2b3655da296cc23b34798af16865d8ca","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.9","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.9","@storybook/router":"6.0.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.9","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.9","@storybook/core-events":"6.0.9","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.9"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.9"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.9_1597476464676_0.7813055374232409","host":"s3://npm-registry-packages"}},"6.0.10":{"name":"@storybook/ui","version":"6.0.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.10","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f77f8cff88175710ae5af77cac58a328046998aa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.10.tgz","fileCount":224,"integrity":"sha512-r6lipdEPSNGrNbtwF4lnWe/LASygNP1pu21tUfl2E/ziFYfSZuVGcGxVK2jkxVNjeyykMZr2Zu4aAUVUAWXwDg==","signatures":[{"sig":"MEUCIHMtC0Zc4xt7m9Whts5EALiS9sS4WzGuSQ66x/xYDO67AiEA54OvX2wuZlRLRD4TVo7yYoO53NHagzuO4cb34RnOZBk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN6hTCRA9TVsSAnZWagAApXYP/jM4BwFnCOFH8XCubfrX\nzibtYXIxJin/1Vidn7zDoyMrHOcQJBUkfohMGLAt0ZCf2wkM5Q5ybDawtvtW\nrdkHNBE/y+wbPGNHZuaDdjA9lR4j8abAE0LmaUmxsP1RM+6oJhjtR6dXmsdA\nZGNF3J8DxPNaHwEkBmuErsJw+VH90Ev6X6dcUOD9cyUmLF+A7Qo5mSIsgeYo\nDyyq2aDGaZ3IJtd+K/2oQ8HJcIKI+yYcEtuS0omVj+kF/tZHS/jvvuhd8+Ju\nl42RMuH8/Lbb+X88lybG4TXmWCMQQtdJXxDnovaiGqGwtGgz4YgQq42THR7F\n/PrrjGAknXjtzsWscCUQgiyCI4K2tO9fV5Pp8adR/rEJVHwtGMjTKfhjB9QO\nsU3IVkjCbJFhMm0aUaBpu6KO4BctrVSbGfjVjv6Gm7ynXDpvP7bN+ZQ7wTW8\nUO9u0h/oS79mExiarNBGvgTsa0AM7K8QKtiImLDgYUvgbksVm+dGeCSECVsY\nM9MQBGW1+ElvJCmahUkV8ExN1KPTZUbB9OTPJPbHCyyZ1yTTkC4hIy3qbMPy\nXeMeAbKYpSYnB+QzWeaOjZv/ay9HZZXeEYKf6bfZD30hSmZp63gVL7Aq/bQG\nVlH9CcLS7dEDPWl7TnH57COKQnpj2aUGMKNBX6+HkgnOREtTzHHD7pCc/xJl\nIChw\r\n=2cbl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7bdfb903373a524b2bd23836564163dea9f69372","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.10","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.10","@storybook/router":"6.0.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.10","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.10","@storybook/core-events":"6.0.10","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.10"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.10","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.10","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.10"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.10_1597483091392_0.143281274639528","host":"s3://npm-registry-packages"}},"6.0.11":{"name":"@storybook/ui","version":"6.0.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.11","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"28e8d3844214b720d4438099dd6ec32c695fb6df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.11.tgz","fileCount":224,"integrity":"sha512-tOozJvCKiXjtf81GabRZ65v5SvfnOkSTsQbacqF7VxCUAbgK0kV7c8z2fcYVjF45QZAB82Nq26DZ57Ti0ZSCsA==","signatures":[{"sig":"MEYCIQDRTZHW9FpG2sGkW91dcFkH4SHJHmit/k8d15l+FXi8UQIhAJwa+owTzbdCfM2M2vdkEZmsObUtH+9+3iet54Iz6e5/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOpIKCRA9TVsSAnZWagAAM4QP/1eH0T7zAoVVviUzTPD0\nhCtaYHrC1bzrEL6cCOwPSEJ0IftxoaTodraKzvyHM4QYS1QeVzPo/shwq7td\nhX12PhQwO6CIIKLCSWSo/V0wzeeW0uOeNrxKj8rE0EcV+slRXgqzDiUYkDxy\ngQo6JpcgEH8ux7Y4yXnGiZzAu4N5shajfcBVzIM8Tw6xg0by/fedq7v1TQbc\n4UFJGGFc/7vjfJdnUND1XxVH/OHnZr/dJj33JkDlVepYF2ABAk3VGE8K8CZ2\nxK5ON/DwYIxV0rL02ctjDKF98wDuy/3asJ+YzCY7Le57wnkry1GJVqBtRXNa\nIpSY5bP/s5WufGgAQgQO3i9XOW+yN5M9IIlhuBsqzf++J9gpTsfOmUAapw+P\nmTbhBTtbkCzkiyvtpguQ1SBdAgY5GATU/yh+siTkqTpHT+1oteqxyQWZRqKK\nbtlarPzr8ur9UZZg66vwoJuEQ/cjnJcmwZgCVhTx7/s23DCSEnkz8SONwD5Y\nn+zBQnXVPSfLbjg39cslcj7cyOdZMhrp+WoeAxIWWUKzBrxs4Ehq+hPmtK1p\nfahqCSvf9ZnzR6G1qAzG6UudSi77eNLzi449TOI6m5AR5x4v5pAkftUORQae\nNjCeoEGS16NQ6FP8YV7Yxjk4yuGSnebvGZjKb9/jQwuNJjllgfFLBGHfGfJ0\nxvK1\r\n=gtP3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6aad4f1511e55b8c6978e556e4fa46184047c049","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.11","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.11","@storybook/router":"6.0.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.11","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.11","@storybook/core-events":"6.0.11","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.11"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.11"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.11_1597673994359_0.7734397601501586","host":"s3://npm-registry-packages"}},"6.0.12":{"name":"@storybook/ui","version":"6.0.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.12","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ea36474f54af62b4ab3f45cce7f7c7053d4d6014","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.12.tgz","fileCount":224,"integrity":"sha512-uo2YVozW7HP0kA6YfVw8C/CHU9GWXo4KhiJ8KGxMsGH2RhukQ02316a6Q7EM65pAFu698QSnL/2NJ9+e056k+w==","signatures":[{"sig":"MEUCIQDXTmQwhu5Ig2zeBCYChtDStQdloXuAmfX1AMrsk6MNIAIgM/AHwEhCLl28VfbBTFg6OYuo5wUgZF0mabUZMAqaRuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOpZWCRA9TVsSAnZWagAAGW8P/2VQkm34j3+z6Z1am8fh\nBEyiQwYyl7ZZ0kl7MAKuZ9AMkuyO19WrwCw3cqs6sPKtGGmttvRSHNH+zmL7\n9nsTPiiF9CjB/Bc+3AQxZx4e5qT3N6xnQg8l6Se4YNwmaNgiNcNFqsb3Vsn1\nORFoTK+5YnPGSLCCtEpvydE/wrITGXZRhBbZnlRwZMnHcgVr2GcmpkWolF8D\n4XfLbefHW4ifdgF+FYhzI2TbaG9LhB7xLLC1TnETvPLLnC23uMB+RRBVdP3a\nk35dFR+u4yydw44fQJHX7NI9/snbsvekFJOhuiq4NAP6bDUO4E3cLJ0Vfj4T\n3zYrPlaZyleowjZvXCdJSVet5yCChbDV3PVeQ1cc0EYSc9g+eZY4ovL5PN6v\nWx6ekAfSLM85PUEiqmgD9671C73XNowBatlA/CmXuTozDVzPxAwN7QfhW7rB\nZs0IMVyokqGSnc2xG35ko9u6rQbsOue2mTrCjTUCIAVdNiy58gMHbf3S08L7\nRLmYfHfUkfctlXdyjSiiM68sxzvyclkZlEj7gW3ihRWXUL7clS0TrIxOXfmz\n/5FgVvgIGbkBwvVzSQ/sTfumRDv3CPfzdHL3CrQSuLPnu+S2ZoNSf1j7gg9u\nJZEj+uFSNWG9lZTizyjkpdOgIZBcHv73GNuw8xMIW8zkEJtQOnStbhnATSSk\nwLY3\r\n=aC8E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ebb058e4090f2a697a6f2f16494d57a5e3a553f4","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.12","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.12","@storybook/router":"6.0.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.12","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.12","@storybook/core-events":"6.0.12","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.12"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.12"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.12_1597675093538_0.7813564642507076","host":"s3://npm-registry-packages"}},"6.0.13":{"name":"@storybook/ui","version":"6.0.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.13","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f684ef3fb6eee5aa34a1d7f1f219585197226801","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.13.tgz","fileCount":224,"integrity":"sha512-o3rP0+NTioc+BghOLNUAACna5BA4j2WX152+o+ZDn4KLt9XRfX2THzlvTFC86XAiYD69LsUUD5csq5kAMAZKiw==","signatures":[{"sig":"MEUCIQDN6qkujry5kHyvJiRGpsJJFlUDCBR2E8somQmdK/QN1AIgNeoUGlpNSAkhkG4NWsG5I+zqGNsRqQZAA6rEb7EGlfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPOxgCRA9TVsSAnZWagAAK3oP/RL8m2CxCwF3JB462yrY\nuolQGqMVxI3AO1H5+MWtwiy+c8lSeWzEA55xw0fNWju4hIvUWOUIfuCW5awd\n6rYGnF2XR8oemVqXrNL2BHaLgvk92sjlZap5luF7qA0k+3Ar1Qrp9m+WrIjZ\nDsEtVjGLbymj4YjEwJpw1OoaG6xcxhPzFjvxz8yzbLshptCDPJFg8QUtEFZm\n1kZTMN4BlW9tiyAYklBFaMQ05im/dVo3Qwr9EoysuAWc3pCJfSz2qQ5Z2zU+\nE4dzBROtaEFOeDmOlQ/IHVgWuurbWmR9qt16U0VH5Hmjy37MLb9fGGyDW0SX\nvEq4rHPeie6jHmiIiDwbdRiOwl2J5gCJKjYWtj7M/QIbA2R9njyE3f+yOGeA\nTDx2dwS12wus17AEIOcxjW0+JQ4xdZqLs1rQGxjdDQw6kZe6ocMplNp1Rzyo\nsEElSavl4i2rFjEGYAmNcOyLRNuTb0VyaS4eKzvAZ6zLgpdd3ITq7cvy4ozV\nrNvJXo8hbnID5F17hIk4bKJpuQmHAlwqDw/CP7ePOmJCwOSUneM/WFIUUFkz\nZ7LLzqKx0pfpPGAslE8GKBbcAC6FfSwPoq/gJTp6G7GA7LaEHFnHhVBFzlJM\nM5nLrE90ohDlreOIgGwGwnVc5r3ZKzAvYLZiKxUeK73KTdRf4vZhQPgzKPWQ\nd/7y\r\n=In8L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"aa75d28f1b85794e343355487171655a71941eec","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.13","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.13","@storybook/router":"6.0.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.13","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.13","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.13","@storybook/core-events":"6.0.13","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.13"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.13","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.13","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.13"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.13_1597828191572_0.1832680315303219","host":"s3://npm-registry-packages"}},"6.0.14":{"name":"@storybook/ui","version":"6.0.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.14","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0984d6cc1a9b7dd2276ea70c0df0f18c2477fa8e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.14.tgz","fileCount":224,"integrity":"sha512-33HZ9a/DxvZLq+wQffTq+ryVLBOuyFMtx2cI70HXxH/t8U3/8j+2QFmM7v58RAca9GuGukkjDU+u9rqLPDwaow==","signatures":[{"sig":"MEUCIQCWbX/qYrgOoWxQT7EIOpuEwEYJ5f+Z547UgLjzoaLWBgIgSveql8tDNAoQ3Woc6NKdeV+o0O/8mfRBszwC+C0UwPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPjB4CRA9TVsSAnZWagAAGAgQAI4zI1pUQ9C7F/e2WgXT\nUrLM4jmmJKBdiG727rT43tw7ufIRRXU3zNTmOEooKjYwT8PXJOgVX3uzCYjN\nvm8CO63FKtCewRROr6HykuS3jzjp3lkz1fu64AQkHEFVbCVRdfLQGv/nuPBP\nNzd/T6XnD2TgiX6LjDGo2BF2OXOOsGB+JrsBAQZ6ir1SXRCrXsx8gxRXiATx\nqZz4DNCdX01+KH9da/mgEXQ3mUFCqiU5MIJF/2IbFpn/LP4hSG18vj2JSXCk\nBoYFXFe4VvSnuSBSGwKy8zNtzI8v7Bl17laCGIUVJXzETF/te2VWPK7OBD4C\nsEpI32/u8bGDGDHxf+VfK2nMC5D/iXEQnf2/2pa5kmKZPkJAyk9HPBZByfZT\nhzppmWPYFc33yZvceq+WfueEYxKwZ/HZ9p140XzH97A1WVe8AZQ+C7CCUroD\ncRVHyBgiuuTYPx3mhZWr8QunzYlYCJ2reNBDlxm4YluH65tfUGfyrQ6m1Iz6\nd5K9FCxNDPD9kk8GveeEmUaMDyrK2dYOjJ27Wdoug74CCGkXOg4S0LkxNr1b\nb+upHgHO4jf2X3doaUkL139Awu9HAixvokF11nVcI8bhmWOQlB9gHbDxktjR\nP5j1RrKzJR+RkIZJeGmbwm0AbHOjd5oXstkbXbXVBs8sItRyeTGR0zINOlKe\n2oJa\r\n=jonz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"717fd675c952948094fefd9d7196c5040b95c736","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.14","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.14","@storybook/router":"6.0.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.14","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.14","@storybook/core-events":"6.0.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.14"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.14"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.14_1597911160013_0.8762552922309512","host":"s3://npm-registry-packages"}},"6.0.15":{"name":"@storybook/ui","version":"6.0.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.15","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fcd9cf8bba346bc28ba97c7f1b4fb4b5efa14052","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.15.tgz","fileCount":224,"integrity":"sha512-A70yn/JsHprudpBqs3p9/erQ8siYA3hKekS/L6C9oZ8VXcznMm9ylU1R5locNjdg/XSO7rCDSEPTbxmlfxMyFg==","signatures":[{"sig":"MEQCIHMyYFHqdeNxJ7ugvGkZUq31BwswxRRtjDLbLqGft+MCAiBHNm1nnY151lLU+exZNL1aPnkS7iznD/5bfKqTcovb/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPlYFCRA9TVsSAnZWagAAvWIP/RJ68Rn4LfzmtHctj/70\nyOhnoVAMmXohRPprwo5mExJpZQ4XJzBQCp2G/miAUa+e8ikMUvjzLLxn99a8\n75LVODHn2VrRr0Wnv18IdtBjfevcInvsNa9uTaKU+WVugzgl8XVoxlymzReL\nPqSfmXBmrL2nTY5Tx7tf8q3GYL10fVL9ZQrljbkBCo9eKkSGaMaaQd5LwcXo\nmQUperdSYYtW2FIc+46BLrWr8EPWc5Un/PvG8CuZErYeSQtVttSF97iOVAG4\nNr0uB2qFVoG0p+IwZ1/ySFnGiCdxMcZRb1P9TyzKBHG3mNj/cD9YjGModc80\n/Ln3VzOVeLvYXGGvNo2ybZEbXJGTUWJMvbGjzFxLYrI8ODlSIaq2cqoW6ECk\n8h79iuegEnkPUDb6K2nI3PZTc+ajlCaELlcJ7zYwZrq+Ai2wS50H0R+VD7DJ\n9ah8uRaGLVNWtHIj3BiXnJ56Bkfr9zWbnzYBjkuFOXXi+dNK3BHTAGWc86L2\nKfBum95N1xOzqBNa8egSTp4M/PyGU7zu6pQxZO/OHm72pkc466wbkaW70wVD\nXHCQTJJrE33CwgdZiL93bTsO8j9RO/t2D/OkeLDT/R06X0D3veEI1cB+H5h1\nk0CmqZneqfhUUvXeFoI8sTyFGpgmNu1MKTWn4bvz/kM4bO3fBwuZQzJaTse0\nlXiR\r\n=6smJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ab2a9cc10ce49d8e534124881bb2264bf0893b9a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.15","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.15","@storybook/router":"6.0.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.15","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.15","@storybook/core-events":"6.0.15","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.15"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.15","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.15","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.15"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.15_1597920773035_0.742730952214183","host":"s3://npm-registry-packages"}},"6.0.16":{"name":"@storybook/ui","version":"6.0.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.16","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"448d2286404554afb13e27fecd9efb0861fa9286","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.16.tgz","fileCount":224,"integrity":"sha512-4F21kwQVaMwgqoJmO+566j7MXmvPp+7jfWBMPAvyGsf5uIZ4q6V29h5mMLvTOFA4qHw0lHZk2k8V0g5gk/tjCA==","signatures":[{"sig":"MEUCIQD5h45v0xyl3yrRXDqryYIwE9YzWCS85g5M7JQkkgHVcgIgKPr/gtmgWfwlfWM6IiFOo8griN+EeeJCHJ5o02ycpsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPoVHCRA9TVsSAnZWagAA1VcP+wSyQ7UdnV1OyNbpulCW\nuVGqs7a7stw4wfdpZgJ/AwW76Xp78gnhtCYlWbsJqQcaFHZgnUKvi9o5eOSw\nyRJ/nuoK4f/68u8cmjeSnAhYnfsoWi89tCJkAElhCeD+Pw6zDaNLsvvhh4Fa\nzWOWVPSlTnRWOVdt1QzTSImloy3dd/B09RAbRv3l1WJiQ2M7EMJfdzxhiq5c\n9VLGA8dmnTEe0WPbPmxDNo0U5OZPX5lZ6/Enomm9faFOQhr2VZuZ7Rhcdv8Z\nc7SO9bCNqZ/hmUSWoY6klSCpcqik+sipR/a4V3bDUxgFS9foT/SFMF1xVI8m\nPaEXkXrGXSSrfEtdYtc7TrSecgA79Cta5Tsghmmbx1k5UWoItBj5YSqe3hUk\n4/3aVuSv9pmJOlZLpdiM1gX7oeZvvMX2ZK0SYl/dA1ttRXJS0+ttEiN1ikw5\n6pbyN5lnkcMEFfby1G1f/4GWgNFLnWboR83uKhM48sOQTm3rVSZ+iklNbUIP\nqpm8RViCqdJzKTzytEjXJGqz0rauQhRJyKYg6PSAKtW+4OtKcyCaeZMAtnLV\nT9hsKnrv/3H/OxR6eAYlyjp74EC16DOGyUfU4nzAyWd/2893uHNfMUUNbF5u\nVua7SIxElx6XHk/JuD6EqGK7ED10LaTqHjrt6DadvxA/ExCKWH6DPGMyrJAA\njy1i\r\n=q1ZM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"f01f03d7f756e32cf6f8cc8c9eff85799d36938c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.16","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.16","@storybook/router":"6.0.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.16","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.16","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.16","@storybook/core-events":"6.0.16","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.16"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.16","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.16","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.16"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.16_1597932870739_0.6565968293053712","host":"s3://npm-registry-packages"}},"6.0.17":{"name":"@storybook/ui","version":"6.0.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.17","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af5e5ada600d5fda449359869d39e8ebf6c74c3a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.17.tgz","fileCount":224,"integrity":"sha512-tIzBkjCFUYUm7pDtmZLyTMn72wZQREhJHOX/r0Zhzy1DtFmTiGBay+D4R8iwKbksKU5HbthRUUd0eg5LTA8fsw==","signatures":[{"sig":"MEQCIAxvV4iRVLcTh5ydNrUoXeA6Xe0/bmlsf305JpFbqsnSAiAgMigUBv0IF0ew3zYtDA7eDHEOfSf+0FiKJPahFAHolA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRFXfCRA9TVsSAnZWagAA7MQP/3dzywoz1XFX2tKLCaRq\n1uwBAMzst04usm2F8zDG//C8AElxZikKxCrGSCKeNBH9PDORLYqVX66sCoxG\naw3V3yVAsLBbKpx4vdtr8Zrd9rvEe2Fgei9ooZzKtOsp7EsqpG1lpDj3y47L\nM3vYOEYE6Ta/8luuAo0yrOdVmnipkCOpitYTIuCgWTx5RJaO3Cwl++Id0bpE\nJG+U5Q2UrdY+VuhqQWeeqh/YwE+bDwYFNdtxxn+wwMijWAcd9fa3ll/+/HKW\noIlW35w0i4mTcOVpRGnaCSwnSscIwCVONjjP/e5CuG2cBdXD1BdJPjC4D8rd\n6X+IHTGfqhNrSVeKGeW4wDyfEth8qigXzp33VfiwzLARvFBqRRMuM0GWdEAi\nJf47XMbtWo0INW7Vq9ThXrOUeeavLgKmwH5Y1mGh++45RBkvoKH7CYppia28\n5tHl/1aBk9C3cheEMjGpk95bWehpzxumWF1JlJIqF8nrZkRxaUEYpOKcgtuW\nebZncPmqP9pHPOPa1REFmDmpEu9V0GjJcIsLwFglTEDPHfCztxuB9AIrou6u\nFyAxOPaaSbljzFmmH0z6LoxuUUvNC0YcZbIqNTVRMjIHNrlewxejUiMuCKI7\nVxiRDBRUP+6zQVI7paSbWG4cVWX58JYwQD1Cy1WNu8wdeF9GGcjzjCIKYPoO\nWNBB\r\n=mxGk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"cfe34ef01268e3b1607c34da04efd3ed290f381c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.17","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.17","@storybook/router":"6.0.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.17","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.17","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.17","@storybook/core-events":"6.0.17","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.17"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.17","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.17","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.17"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.17_1598313951355_0.8115781564495905","host":"s3://npm-registry-packages"}},"6.0.18":{"name":"@storybook/ui","version":"6.0.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.18","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7bd834c77cb9998fa334fb0cd7aaff526fae9891","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.18.tgz","fileCount":224,"integrity":"sha512-7ABQ1uIZ/0viUZEbkaqVZXVwGxm3bPbH4B16tGIS7vEXZpwuqzEC1VjZNUDayOMtJEI+m/Tp3XWQn8GkxTekNQ==","signatures":[{"sig":"MEYCIQDfc6DuwxHP0PdUHNK0UAutf9r6ll2ZnKnTaQROKC5MAQIhAOO4XgsDp+AypXmRmMQN44J60ouSFarDGwvIRrNf8mU2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRT7xCRA9TVsSAnZWagAA2dEP/0F86QWgA82kfTXzyiY8\nPZrwBJXzQxBnpGrT1o4l0n+ISGTZX/kCV6F42A11NqXwHpszSvRVb/5t4xxL\nsG1/xlQzVwJfqJuDd2Jy06qxMZEnr95rhVofaF+kuY6dNU4Akxsdheh6aixk\nNuPeoNWV+54ChFqdp17MnCLcV0AbhdXIGpyXo9fN2JhBzYZBrD17uGbDoqhQ\n4SBonmXUu0KV5iGiP2QpGQcJE1w/+avvRbohNrqAsf01YphqsGp6ONUS/ixj\n0iBddQSEpTaPd/eqsXzCFcGeAeUIHru+DMhNtA0XQUHD+z1AoiTrcLOXnNjb\nBQAE0m5fgg1f0qNv/Ybg6DnPAtYIPNHAqCyrDh9XY+NPyU3Q8pOVDLHz02kd\nwbSoOjnE7AoiUZWy2Mh6cNCN1G0KwGVYU+LQmQ9yqYOm76mz3Hfksc6YSCD+\n0VHLQSF7HFJZT1vV4GUbP5z9Ih9DKEgb3YycnZ1L4C2NlAhbATktlomAhiXW\n9bXkR8X7W5bzHxN9R3tTsiJAugHu0CxDsZ1h5TjFcU0KQlJNavL4IvfF3LyZ\ng8Tt7wZdrkdateSEl5UeGLjS3fZKu0Xz1DfkOLiYFsntLe16taRX/1Xg4doS\nKC9IhPaExvzkL9V9sqYJqaQ63LCRrww53/ViIWgKcRei3I966JfdIh2Sjls/\nf5y8\r\n=c/yb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7d93439c4715f8b306b6cf2086358cee60d8e5c6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.18","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.18","@storybook/router":"6.0.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.18","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.18","@storybook/core-events":"6.0.18","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.18"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.18","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.18","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.18"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.18_1598373616979_0.36447531202691574","host":"s3://npm-registry-packages"}},"5.3.20":{"name":"@storybook/ui","version":"5.3.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5512f7d76e1bb3cf063d93f2f9f10af55fbd2f63","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.20.tgz","fileCount":104,"integrity":"sha512-jRW4nktEdZq3CbqEVCNaqDHpfpaLorz4hvzsR/SIXNraIF3KSeVjLk/EVZw2ptiKKS8K1F45SePJHNzP08kckQ==","signatures":[{"sig":"MEQCIHKxbtyJ9rBIZG68JiRgyjrahxZEvnnnXIWbznBXk5JJAiAPZM1J2RCmOpzppt/srgzPzaK3Pw7O+WlVDWSOnVMHlA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRpU/CRA9TVsSAnZWagAASrEP/ikXIhft7DvpD7hLrZUD\ndPOTp/kWUJJGVN/csY9rB/OmhaH/ofJHeCifjD+eboO4Oi+1WNhdQXdCU1Vx\nAISrqg6npKwHG+3a2AI0eT8N0/fiJAhDeHa/OOyTkRs2hjgvWK9LDYDstTXf\nXSrQxdnLCD5yBPv4/Y4UmiaLgLAvTKY7v+LNbyCnl020FbycMFKM14tHiCtY\n6D+z8BorCpa9SV5pnOzEv0dQBMbLQ/I9XZCJsi4Ok1aUfpl1CB1ubmcAu3S4\ntxnEhuyvG4BUW1u1wOQVP9UqpRIQgQH3GnOAMTfLxnePyxVY3Q7/6EfKM2ui\nJ1BKkS/L5aSSwISBYPrWEMk3+0k86EFGeOUyDSIQ9wz370w+cr1HyaTub7yQ\nwarM9kajgou5y59V2KZrHsRMdzu/rOGUhZ5L1sakfAIsf0sfIOqvH8pln2bk\nQsWLhngNYYgoj+CwyWBcBM8aAHYfic2UmcaFbhdcghZIsKVt2xXsk9BC1Gku\nkgeZ4DczA/67NzkVfAlmG/bt4op/Fh7BpEirllcS7APtLVMc6N/bbIvCoY7o\n+EDrCt8jyLGQOhhCGdAijCA2oX8kJ2AnhC9KC/AO5oU8p77sbtpSVWU/E9Pn\nCoCKyymDcWTc6/U+EBDVSN0awdQwwrKVtlhttVyB7N45mz2t2IpFHxeUXz87\nPx6Q\r\n=aLeC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"966a826ccaed39fd9d9e9ab629cd745cbdd56d98","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.20","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"5.3.20","@storybook/router":"5.3.20","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.20","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.20","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.20","@storybook/core-events":"5.3.20","@storybook/client-logger":"5.3.20"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.20","@storybook/addon-actions":"5.3.20","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.20_1598461246829_0.8229876677578134","host":"s3://npm-registry-packages"}},"6.0.19":{"name":"@storybook/ui","version":"6.0.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.19","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4746717ec50349905170f662134910b8c92f1f4d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.19.tgz","fileCount":224,"integrity":"sha512-bt9Se7FP6Imo4q076r8mSD5r4LDu/+XpW4gJBjmnrkslNWV32n5MbbWMdxGrcNNusJ+lv7XSi8ixYo1WotWlSQ==","signatures":[{"sig":"MEYCIQDZ5UYfQvRJJ+nzTa7VMbwndEeWGUAi2C+OC7NhnVTNYQIhAJg4AlDefSi0MZ1e1X38uVUag4UtNj7fEbF0ztmMLMst","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRpp3CRA9TVsSAnZWagAA0psP/1K7n78ny1ykiUR8xfrd\nuff8fA62jIwzEdGkJunGDkJPRw2ERmELXBMEPdSJjYu8yLwdJly9yHkBe6O8\nqw0p/o5Jlw2kX2zj7Ras3MskQlVel1m5s3iwOA2Bo9mW0mROzxlNlJaM+DBy\nXapDaZVOSAWcThobG8JUgqQkq3I6fpK5HTHjPOieHOzM4KlNKVP7x/NVWO6G\nQvIOaf4k5E88OS3SwnvyTSlkZqvDC7hJ1a4pzlItxtioYgxFXovgJqabvaCY\ngX+xWtU2JBKec0VUR1Y2SEi4lWaqMtlH2rX5/FkXDKk49y7aJemiL99Fb0Dv\nM1oX9+lcvgbp+EczCh19CBG7RGImrg8ZVE+Mz2mnOJTWZL78ZJpv0YWxC2H3\nxoDmf4bIY/X5ASW2ZW4cornn1biamp0fB2nV0h89bGG7mNgqaVUn7LsaKFh/\ncaR7uliZPgdysjtozsV9HNSfbEwF7g++qPgbm+n9Mcs5gNFPr2xgDIqSXANb\nXZyHnJuN9PYlWn0l4zuWBleKa4cBuMYkTKL95Gr8QtWi5G/DVcAhKHoSnSIt\nYlfPbzn0I9kxRcBYQ1IQBvePu1WGA+4E8m1r9/CNg0Q83yaYC3XzJMCeea8N\nI6LKfAgspfS5jhJp2lauUGAxsKpX/05KOlAr6fiMe30umE8/ReWtcu6fXGEd\nq2jj\r\n=SFdz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8cedc0f8a369ecf1f4af9d0a675dba934d685870","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.19","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.19","@storybook/router":"6.0.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.19","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.19","@storybook/core-events":"6.0.19","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.19"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.19","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.19","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.19"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.19_1598462582482_0.18591174240191521","host":"s3://npm-registry-packages"}},"5.3.21":{"name":"@storybook/ui","version":"5.3.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@5.3.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b42568e03353b47aaab1b6449311f38858585f81","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-5.3.21.tgz","fileCount":104,"integrity":"sha512-OUf8JYY9LN+XfzLSZE6KtboITGDL6C8Z0W9QOXM5LJwFLv4PkANK/f9qsB5vVHFm7vhoO96butFzs6SjTKhxkw==","signatures":[{"sig":"MEUCIQCyB7QXLwy3sbMR7f4lVJbgl5LKJNSGxJr4hOzj/pOQWgIgOifs2n7cONwlLgAL9Jt6erG02l3zj76Do6jD5eE/X8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":405161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSEwhCRA9TVsSAnZWagAAdtgP+wSGQW4amLwBbAYizJD7\nJbxk1CzkRTzzprnByDTXC87sO7Z0t5Tfyx5gTzoJxUjLm/MZDtIupciyGcnF\n9UnqBkWZFQGZTLYh3/4l0i/kZ/b2Sk3IjieOKJ2L2jMxhgUIY77dzGEPr62Z\nutGY3EIJgH+2/iVVuqeIK1IaWyJAK7j+Epu/4l5FT0K1tNKjfFttTyZzQ66O\nWnf5eFsSGSL7bBAH1XUgxvJlCWqMyDD6+9ra5e8vTqOyJTGOzgN8OKj5hPh2\nWAVm/3MjWDwM8lyIVh3qXW+yhU2i971IObcJM0F4FoOCZNnqrAhGlLFmGfnh\nN/+moOBukFP6FJjl7hjWqCWivD2xEaCNjqlRHganvkZJQGI0XIVdPjddxOLp\n10CJZlAVjawazTAYdtzB8a8abVoJHdB3FePQyUYKG5/EJjX7DXXpcwGgqPH8\nFZl203FPQg+YpYM7K0Oz8b8zwKPVTlLuiIYNIcuKSOeNAecXfzbKW7CQaGF1\ne/hFyaiM2SxaYiCuBGJzc41YbPv6wCIY3TfzIEPKZW8aRQVFfLwI5utoAlK6\n8DofGC7SHA/7sakJtTxGTS5bQcNSDEsN9AQfYcLE3Pu8WIrRFtpYaXcDWej4\nb4z/OPI69XLiRM3eFul7PVSvhl+JAqSeEtzcw/a94wLZkKlkMDjGmDnPWAj1\n/qKV\r\n=IoTA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"a939e7204a448e9d24e5431f1c9dba8dd7ec05e9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.20.2/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","semver":"^6.0.0","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.4.6","polished":"^3.3.1","telejson":"^3.2.0","react-dom":"^16.8.3","prop-types":"^15.7.2","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"5.3.21","util-deprecate":"^1.0.2","emotion-theming":"^10.0.19","fast-deep-equal":"^2.0.1","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"5.3.21","@storybook/router":"5.3.21","copy-to-clipboard":"^3.0.8","@storybook/theming":"5.3.21","react-helmet-async":"^1.0.2","@storybook/channels":"5.3.21","regenerator-runtime":"^0.13.2","@storybook/components":"5.3.21","@storybook/core-events":"5.3.21","@storybook/client-logger":"5.3.21"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^4.33.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^2.1.2","@storybook/addon-knobs":"5.3.21","@storybook/addon-actions":"5.3.21","corejs-upgrade-webpack-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_5.3.21_1598573601175_0.9933277330468007","host":"s3://npm-registry-packages"}},"6.0.20":{"name":"@storybook/ui","version":"6.0.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.20","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8e7f8d63c88714056993a484185a856b788fc3eb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.20.tgz","fileCount":224,"integrity":"sha512-VdOqMZDH0u4FxEnv0RLjezvKW7bRSzSiJwW0MUnp/8YTLXnRSr0l2O8uYEGVg24fY4tUMMM1kkUrtLYEA73sUQ==","signatures":[{"sig":"MEQCIA+birW8hWBPmA1toEDF4yJGouAj1Ewqn+TSA8JbofsKAiApL/ikdbL5DrhSfFTh1qR0TuZ5Qbi5Qnbj5dwTpMTHaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSFOBCRA9TVsSAnZWagAAbdEP/33H9Em0Q0ZXYc+kcpbs\nDRrGruxjg2L64DEWZSpZJ8gk+yhveWqHbPCzWo/s+agV/DzhBT08+UWA2prd\nhgDowhUUI+pTiQ4Yqbmcck+AvEDsb9qJF7t98i04H6iZYgp8kNarqs6ID1Sq\nAgBK2sQ5+0eLMhKreDm9Z/lmxQYW7u2nbzfUy/bSK/6HI2lxBVSxg8MKZiNI\n4Vti4s1i/3UsKsNUe/eBvozAtuZTfDBAZmtFY7vpDY9jwdCRVHTLjnWNaqz9\nmilZNTKKhGoXhOCByuLoA3XjTQo1VfR9LGXHhnObm1Kmg/anJ0acc3934AJv\nXLHv/r/cyPGqVWeEg1L4SQMtaq+C2iwdcngalyn0DkVhDXjykiGdlU7e0ppq\nxy+iYtH7WPwNelq6XWMJZqBD4/fKarOllefK2EpgE6t4E8TLc0GDOlpaAYSo\nIIf8gKZRyo2oAJK0zmdcgLtSK6tHEHzqUc4e6+FlCPhs97FgjNGCeanLt6BS\n7teFuepYrqFcsIU5YKeYs0NoMiyS2eY3svnbOfsPVo+r9+ZzLGGZkW9KCOTz\nlWhzf0YbqLq3X1w9XK/xU+VuwhWECpNWdqVE54/+pchhav8waQjMhV8A1V9J\nX8RZOZyAthym53UxG4eINrhCGRqwiVgpQ/jWdLR+veX9p6Paj5dzjz7GD0a7\nSuxM\r\n=FHf4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d8b9d25b69b8bee488265829beddbd0ebd38fe8f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.20","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.20","@storybook/router":"6.0.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.20","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.20","@storybook/core-events":"6.0.20","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.20"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.20","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.20","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.20"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.20_1598575489353_0.9462167595247339","host":"s3://npm-registry-packages"}},"6.0.21":{"name":"@storybook/ui","version":"6.0.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.21","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5dac2b68a30f5dba5457e0315f58977e07138968","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.21.tgz","fileCount":224,"integrity":"sha512-50QYF8tHUgpVq7B7PWp7kmyf79NySWJO0piQFjHv027vV8GfbXMWVswAXwo3IfCihPlnLKe01WbsigM/9T1HCQ==","signatures":[{"sig":"MEQCIC+XYmCbZUbbw34Mq37gc8kPYULS/a+ta1EG5eYDT8iCAiBz37YVoWPTGMoWk2hSkKdGeCYz/mrhwIv8hg5etAfLMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTOmGCRA9TVsSAnZWagAAwgUP/3LYx+EynWn6ZCapgzNk\npPZaWprGRUSsD/y4b9zeWGqnZGluAwGUAcvP3Qwg7gitf0p0hcuMOySP9xwS\n0T7akDCq4PtTu5OLHFcQkTzXWSo2odP2rv9680e7CoWG5bw0Sg//3NuDSVGa\nDvI/+kKrODeJ4G/sXAqOsGKmYnc1mO43WQ44tHj6F5Cw7ARCJZsz01h6+uUx\nf9f7W3MQxQQpQkpBFE1+9+CJPFejE7NKz4Db7QCEwY/X033alwNFQ2xcp5/d\nCAm55LYo0mLZoy1AJW+pSOCTjzq5VgtW69QxxFn9kA8H0elCeIfm8JQMvHtq\n0ut635J5nqRPt7JGmQbNPJa4ddCpLzNsKBGO7FSeUGo5iEqZ3A/f+8i8pu2K\nc8dGXrJr3VLOfFU4defkqZVEKgPjVJc07rlf+6A1qcvCKukaEjV5wHVuY4NX\nUnHe2HdzJvrPDus9jJTACqJr56K9D/xLPUT4tMPoJYJJlGs2yc4RcXvOCLGI\nFW0nlTEHBWahXJXzht3LRKp/Zw6qv55Oc2KGHc06ugRT+qhTrSgwniLs4yA+\nX3MBOZGbCy2UmnqglLWOxLOHN8b71sDhv8QrmhUZj1XlC2aaR/poxYGAcZWe\n3DkgoUII93irjLW4mlrFrQGLyvLPpP3as0VxHQaXh7rY5NxrnnXu4ZA6zSUw\nXWnp\r\n=TY6n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"fb14a86c1cbf5eb21023bf2021eecdea9c6df83d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.21","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.21","@storybook/router":"6.0.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.21","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.21","@storybook/core-events":"6.0.21","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.21"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.21","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.21","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.21"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.21_1598876038001_0.3656473549137407","host":"s3://npm-registry-packages"}},"6.1.0-alpha.0":{"name":"@storybook/ui","version":"6.1.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.0","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7139bcbbaac094fe6e0194d41a2f5c267399a279","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.0.tgz","fileCount":224,"integrity":"sha512-FjIPRxVtsxeQUY5sc2GJJnBjvo2BPl0Ekck5vHBk21qrP50j8/Zpx37hwf3kcRaKLIfoKyF+8rd4HnA1hPXiKw==","signatures":[{"sig":"MEUCIQDj3wibtR9I0hMh1vQqGY1pA7eYMoMDmOEeVjbS4pJ7fgIgO4gUD/XAaFsmnMt8DdIjgjIa1eUM5vApwdq/fhFeINU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTPN/CRA9TVsSAnZWagAArk0P/iLUPRv0BFGt5jev0SGi\n4+QNpUEH2EcRtb8y/GVFPWNjBUIsZrjpjTcjVoorxXFWOF9vFf1egGH7L1x2\nfHkGPjhN3zbDRhgTKuLVd0DRKO4uLbwGENHRlxB8TCiT8MM/8TJeqKkpKbuJ\n2JZsQ4FXv1i+yZdPHKwXiKPi0VgwhrsYI/ZQLY6a8IoJYqLkO9KpjS4RRMOW\nFY2YwRg7BZ/E1ySUippoHYPxE1OOBeyY3wIkyBrICYXjH7Ou+t7kKLEFi75S\n6wSE4QHNnoZ3kzdWkfLf8mGzvU72IhcLGOAHFX1weRFffw5bQY0E/gw05tMc\na67Ov6Wj7DmPt9G5wuhi10ooEUa7I9A7R2E5642kOH2ZX65Z5PUtYB+J3GSe\n+po5BG5cBK9/LYKnsMOwt3KGlEYPv+kl/N34V35R/K+PdE27ic7HftXJo+D2\nIC7U08AyzO6BMSf6zf72pIet7PCZ3JQ0fUTylgI5NnT+2OO8deUpBoQ92ABD\nx+Wqy6KldylBNC0Xx9NHwVOzsdtQBWv3CEVIl8qMmshPbtB5cJwUz0d//dfQ\nXZnDFAEQjn80HINn8Knh6f83vRB3jykZuDcVV+bjStwIMNFAdTuho/RFLSOg\n5WzkTMTe4uL0IsVUeX3zN0cFeEL6ZdGcbh/kHL0GEkkE9qOarXRB0By5gCni\nBNNY\r\n=PYhV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9049027832d9c84267cd720f2df8cda33192ebf8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.0","@storybook/router":"6.1.0-alpha.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.0","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.0","@storybook/core-events":"6.1.0-alpha.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.0_1598878591110_0.5042479255767991","host":"s3://npm-registry-packages"}},"6.1.0-alpha.1":{"name":"@storybook/ui","version":"6.1.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.1","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9fab05833b6c79131c0610a94a32050896db262e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.1.tgz","fileCount":224,"integrity":"sha512-mFlJsmWEXkZRGl0qBRrjEck0La55RaT6GJiTPuAO01QIVCQtkAvhBSXp8QKHRJ0Tw0ncnD+HL5woK/5FERtNoA==","signatures":[{"sig":"MEUCIQCW95HT2wWwk/m2PaUHVj7aUirDV4Iwfnr2ckMBRDC4AwIgBR1Gv0Ji85lVSsU+O6tASTk0Q8cczragzYNeQLP7ML8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTQjhCRA9TVsSAnZWagAAdWsQAJBX7zRmZcl59ADoJdv4\nZZ8ZZ6IXi4FKZUvE65WFbFyZSa5Ah49nISTx2jYhS0tfz8PbWaDllGut4HUh\nw7WUxYXajkGYj3XutFgw7T+lVMqEpoYvzx0a6Rs2aLKWoVo/EgMa5J4Ysz9/\nnbUZxdEReKeAV/Ev1DfiXUjiGTiKVlbrQ/KeZUHWwCylVkFCIP6UvCzqRdYg\nsEcNcZ574yLNexlw4iBHLLSGlOaZAuyhWgp2WduebEsEHWHNisDwiHrCDzhX\nf5cCfjO5C1bzll2k509bO1j/bD+sV9Y3qWySdcNtT4m4mmiHopl9O1YpfXKV\n4D+j7q/enLjW4l2iTV8HaHMQF4+0cdkJbATTD5QDKRXa0+aucFYRfuUrZzw9\n6mw1zM2r7FsM5Nzu7hmpGXQqvwxkP+4MwdT7gMJhjIzmaL5gWJgCQVVis3Aw\no7Jdjk59cxg7721PKFPq+FPugpM7LKv+HBL2pvpmkIty69IzeA+D3SeU4mO8\n81gohcbXELLqGLaa8nfcyNHu06OZOOLSGoU3AYb9e7aQVdf0H9ypbIkBvXaJ\nusXfQccDXnfndOllxDOp9+aBQECT5Mip4B98TWP8nDYfAxkO7sy5i6mMrVsw\ny4lBGw/3A+Blt8HX+7hRrpFxH5vwsSmYzNnVTyrH0PVawnCPLO4StgIWyPYu\naOTf\r\n=xfJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"238a06299305d9b52e868ec7791ea76675310ddd","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.1","@storybook/router":"6.1.0-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.1","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.1","@storybook/core-events":"6.1.0-alpha.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.1_1598884065019_0.2975916489530537","host":"s3://npm-registry-packages"}},"6.1.0-alpha.3":{"name":"@storybook/ui","version":"6.1.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.3","maintainers":[{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"regx@usul.su"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"056593141a1c16861e65ad628d81276fd899cd29","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.3.tgz","fileCount":224,"integrity":"sha512-ACuyKr7PxOpsymmd/BHLMedr9ZtHrDZ8PYTZzsaqebdhMd3ljKp4xkNtK9FeBRdRaR3tEN6ebvg0JgOTJmdxjQ==","signatures":[{"sig":"MEYCIQCqBBV76bDZL0LDD1M4IdfbyL0q+u+a/tQiIlgXq65jgQIhALAxYXvmr4kaBLLbMe6mw1ol95jPuyWJIppZZKVYlCsV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPfaCRA9TVsSAnZWagAA6gEP/2+elWSRd8fvEqqevovi\nZVfBrFb4KG6KYUvG5BDa7mjXxiFknMglEh5EHT1mbz81ou1tDQFjXUC8yHR9\nzYxWEyA6i65mvKOU5lWsSSg97lHskxQ+aXmYZcIqgc2CwFYysfprIPVVRzPx\nRmVPunxFLCq8X0KY1mnyjZPIBSy3QWiIFphcKytGmznwkOtq7T9aKirodo3G\nK16IDs0gr4HhbXxD2WVyZR03ILJ+CZHR0gSqE0Ib/9GhKstY0oppQp/FmV/h\n9UD4SgQXFYdPmlJBQPeqeEgtQYhTmuVU+axrdp7d8KXiD3/OV7OBtAXjHxrd\nVSw2hSouffAqJcM8nUkhfD+vFJJxBL+1Cptw6o91lKgKO4JeizYpM/skjiIz\n2CTPXx9iFr3UM5KMrW8p/JZkesj5HmD8tFgjugXbA4fHiyd3BJY/IjuN0DzE\nrVBVxFP6Ze5Ybwpu4f4IZ4jNTl5CdREZ9X8Nc/JBo7DVZ4a5ZuDv1zz/Y5JW\n1SRLkCaVpecxZII8+MErBd3Tmf16Ojlx2woouLf+t3ISHpqzKJO4XNRim6Eq\n53uFOlHWgmv+MvtWbtHEw0MKZfMVt2xpv/U9ivgYFTh5fgda7kPqW9JUZwm+\nLwMSG179GtXqWXAUbKWe/O+dpeM5fYvtfXS/bRgGpY8W15ebnauG7agYXbVq\nHtBb\r\n=vS+6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"677dc96dfcd7922bf1a6518882d4dc165d57501f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.3","@storybook/router":"6.1.0-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.3","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.3","@storybook/core-events":"6.1.0-alpha.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.3"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.3_1599141849671_0.15388126568761207","host":"s3://npm-registry-packages"}},"6.1.0-alpha.4":{"name":"@storybook/ui","version":"6.1.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.4","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"27ff12e9338f84b60bddb9b3e2cf22b9383e91ca","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.4.tgz","fileCount":224,"integrity":"sha512-ZQ4FSaaRAo0eqqg8qlg6eiS4Tj1vcikBcY3SLMinu8Z5axoPC3Ob3DuZSFVF3TuhQ26LXn/jCPguDxNV1lQISg==","signatures":[{"sig":"MEUCIH7OgRbVEwBz4S2EPBsatkKHNQQTVjgJBkkvrA9KnYy9AiEA5u0C9VBeCVjZtEXVcO/yykRbhMh9zRIea094tH+cP7k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfV2JqCRA9TVsSAnZWagAAw7IP/2M+BFMC0xS/vAjpkJ42\n1fVSdaCJ2YeO4u15iYzC/T10kSkx4PgHbTlkO8MTGmlSVVy9rKZflQ/hSy0r\nANZmb+Ija/V5caKkDGbPoJaY8+3Xr+ShRIF0Qrpcjz1dn62tEBr9IHh5FeOc\nNKV3Iz7BsjyQ9iAFGwibcu/YnuN3Y/ryorXzhPgpix/JBZNTQ66x5qOBhmCQ\ne/e9G6p3uRpkBhVWWnQdw1/Fpk1QHo9w5F4BTK0lCdrDnV2Sudl0T4gMuwOi\nGklU6Pr0kKNG0iY1aju2+PY/r1Q+HwJCngFYbPvacU+sJX7rNNuQL07Czq+e\ni4N0kD7K2UzFn3yjUkCaFEMUUiU7Mf9Uewc23Qmj13MqZGhTyVpJ36m+vfcJ\nJ0fLTlocHJnrJp91V7USprTVBD2U4O58FVNfu6PiScNoSV4/6a3s4to0IrdK\ntV+/T51aimCC7Nn2/sTzT9PjLeUQSKXLBl0tFnBofzt9LiojbUtpRBk+ALyX\n25wEqAdi12+H5zp1+D2E47bQz+Kd5e094zv/VEBeOWd1PYvljpwPu3nu188o\nPRDONAM0nrFq5uJH1CJyTNtqyrj7Iz+zOIiiW53UcRtGuaLabN2SzhEV7sRs\nRcgELwxwlL7dGftqfu+fQJYNuxOSlhkMNifJSzLQmMUOa5ISSbp/UgLTaNYl\npfjl\r\n=JE1w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d053c5c0c37db26f06fbec7f3ae3afd698fdac54","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.4","@storybook/router":"6.1.0-alpha.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.4","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.4","@storybook/core-events":"6.1.0-alpha.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.4"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.4"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.4_1599562346421_0.1414300609385697","host":"s3://npm-registry-packages"}},"6.1.0-alpha.6":{"name":"@storybook/ui","version":"6.1.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.6","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"866918bc2fa0019813e552b3d0d954cd66219e2a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.6.tgz","fileCount":224,"integrity":"sha512-nGBT5wtcMSlVluQFS0Klk5JvjsQfH1UMwQdYQPHyJ3lvJK6B1wYd5GqpcZ+QdmWx4ybMc7MUU673ucPbN/sgeA==","signatures":[{"sig":"MEUCIQD/CG8zsJheUMBjQD5fCq6nNecBu+CKd/+trTM7h9jx5AIgShcztiy9D3qegXP3bjDj/GgkR5hWlIUZyue79VV1ZVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWXRICRA9TVsSAnZWagAAnc4P/1xi7N5/qyCJIPFvNj2h\neFw9FnDCcqajqmKAaqHcrS2QUqbmq14jiy6ngEalJjnX/+B4z4Q7s4ZDLso3\nqn/dHbOZ1F9d0I9BhX/mjN2UIjkGNRloG0ZxreRYu7wmKiCHswXd0W8oDGfG\ncDONcYKsBaDPTBABJ4DPGnZMPiX7b/IRM7113Zr8Ru+32xBfWyY0DGDivBM2\nB1sFKmToIBk1PEd4p0Cye/zrgqvBZJIXPiOsu5NCs3O8l/Z/meHAofekSRfZ\nAUeNeILj4TpQPrGo0Ef3yosE6qtBFkoHVO28PT+uqazNoa8ZQs6khEmP582p\n+9DkJ4nmXiZbG1HcKkHg55lZPa27MJxvIGreV7tsuc7sb+t9FsIoHjpApEfL\n9vSLRxjWlIktlDAMgtbIoGY5hJbVmnledx/03av5felwS2cyVPO7ExIwqWoG\n0hYqWLZdA1NWUNE47XLlogMaO/fPSfi2cKOoEAkPUgFLaQ0P0NltB/qqLMuj\nUbYswMDaEYNKTpNGk437aawWQMMctziJaLYsf2qosPPdkmcJ0leQteTMEw5/\nsXzckjMFSRAlHJavsVXrTZMmQLeaSQTwZnCdydiLDqEAuCd/1IaFTRFlJQMT\nRlBtISAXm1flXgX22qhs5yehGzV1RYEXU8IZVdghioCWAPzG63PjGK7YMqjn\nolnF\r\n=Z51k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f488dd4c7e6f52965db0e54c7f072042765c6477","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.6","@storybook/router":"6.1.0-alpha.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.6","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.6","@storybook/core-events":"6.1.0-alpha.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.6"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.6"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.6_1599697992175_0.8911821673806677","host":"s3://npm-registry-packages"}},"6.1.0-alpha.7":{"name":"@storybook/ui","version":"6.1.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.7","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c18c389b14904633fa7ce1fd9272b837acc84596","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.7.tgz","fileCount":224,"integrity":"sha512-7Wpz925cFr0aOp2kZoUduJ4Zwecki7WdMhJKd8S4gekw5UBFXW7HOMFtWoKVop3n8LNm8ZK5L0Bz7S+od2oUqw==","signatures":[{"sig":"MEYCIQCbWRG8iAsg/w/+L48Yzcg0Slzsg2jlYtTImRyMbmaVXQIhALFZ+Qv8E7iHM+GEMZ+a79bY/8LHifexe4Yl52OV6vB6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWkksCRA9TVsSAnZWagAAvnIQAKKqBeOsXBdD/QTgY9Jc\nQnmnlJIO5CGIboIfXXHh5pl86xippY5C3pUi7uXsZD94F+DaCw3XD16mRXAH\nkjQoS63TpXJ3qtayB/z5AfxmuoZgNdKYOQaAINTPQ28JPwPSyQ15SnQ2PN8I\n7YrPZwf6pzOITeSDABSGZgoSgYxjKLHnvNuKCpglyplO74wNA+pDEQAbamrM\n5V39CCX95AoMFk1kEONnc+pX1AzASJ5GP4v3juothZKjdKMei1HliVEMQG74\n12ZZ1AfTCFVI7pymlYipf/+jkmx7CH+2wxo2RQCTd4M8je3Bwgmnn88qPXoj\nPWkijWYo+Z/9LWiLgdUUxVk0rdGDhHIqQekUy195SK2YpszpqMALO126yB6y\nJh65UtGNTStmKf9c9tHnbglavjrfiWKvDT6ULejvJoygncBdIqmMoOZW3ncB\nakAfSQgrWb/ZULpEhXpWfK59j3fgQK+pkT7ofr3tpwfCU3ASzdKPYOAOWt7w\nNy7F89zAuKhgnxHm9bA/SFLtNeTEWBEcB+A1rsMZPBglmCcj+nQ9r/Re9v7m\nGhVyegLEuUVlAzytdIcPXsxYk3WzXnYdpgklByEzVD3oUYZO/23brFvpHeUX\nFbb5/G0N3SsiKzpQ6k9EJ7KKSynpzPTyBjV4TzXG/ZZgzm+Ckbml5XDip9IM\nKoy9\r\n=9a0S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c63131f0325d039ec30fe244bfc43ee17ad4fe9e","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.7","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.7","@storybook/router":"6.1.0-alpha.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.7","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.7","@storybook/core-events":"6.1.0-alpha.7","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.7"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.7"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.7_1599752491857_0.2837864977737927","host":"s3://npm-registry-packages"}},"6.1.0-alpha.8":{"name":"@storybook/ui","version":"6.1.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.8","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f78512bcc383b8eb52a528bc9c441268fbb54cb9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.8.tgz","fileCount":224,"integrity":"sha512-ufFDL+yLmZZAjyeKEEtDDHvtcCUbfcKtV2kJmanLZvBB4n2CKzouIK7H1EU1cFfoZ7K3BpimZZEWSeDqpZPlgw==","signatures":[{"sig":"MEYCIQCNnzwieRc0S2eMlqIwDcgxiPJkLV8PSyANHz3Ds/nHfgIhAL9CBRldEmKYh3pkK5PZt7IN9TFEHV7G+HTAkHxoevnH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW6n4CRA9TVsSAnZWagAAEU0P/3T/ksxFMdqiARnlNXYo\nouc/GWPBqp//VKnve2+QCfnaN2zjOfvlOeWfKvTO0203uMJqXbO2yAGTNN8P\njTZQZuexPGtWzBN+OMjfpkMjCYEi4s1EAO2Yfy6Dov5Gj8FKjXin9sHDNEqA\nMXqGV/qJ/d8cnnJSQMrEUWZuPOMVC7YRUc7wVXABJ0iITZ55HaIlxMN8ig3v\n6QeJD2I1wWXN9UQpqXZ9hrs3SYp1lLkaExL/59ATYwFyreysPy18uuyZSaGr\nXwPOvzVyUMw4Bo1xUk21vFlW1Jy3iDt39/G2plogPwBi8HhHWXw8wC+2SeFU\n6nw8qHDET1GBKIxK9gnZwMJkDNdX4+Mna/z6M+wNr439dVXHTrtjezeGoiDD\nl5Mq86nNjmMsLXXmIvVLCMtD/shtmTakwXL6lz6gRFy/T20NIC/G+4ed4GE6\n4SDrx1izEfjQHvyJCLLZboML5JhqcpqkhUVUWB2BBaivt46YDYTV4FyjZ4Bc\nlxxlPHbv0ZdBRSPC4JiOPjMzb4ucByrMwGuGLHugV473v3L8mfuODLjmhJPV\nHTMcg8UFUJbD1WgSdIISPeE6rvTPwNCH5uRqg3eM8hrlfOhRFjJWRfohoaTw\nMVg89xM6rmkmqlNicCQs5chgf7tHQqDIxv6+y7AJvxx003GZNkg6PMLNd6NB\nlLkx\r\n=MLBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3a636538b7a15e4dcc07058d36b1dceb9b43335b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.8","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.8","@storybook/router":"6.1.0-alpha.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.8","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.8","@storybook/core-events":"6.1.0-alpha.8","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.8"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.8","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.8","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.8"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.8_1599842807738_0.39548193636401474","host":"s3://npm-registry-packages"}},"6.1.0-alpha.9":{"name":"@storybook/ui","version":"6.1.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.9","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d60d901a5f1ede6f387f3cd0b3a6667986de1ebc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.9.tgz","fileCount":224,"integrity":"sha512-PIpcs1mJU8it9WHYwM98Z7aA/CPC9JNEWYJYl8554tDMJ7OJhCGozwF/9PN4N4CVVcSQ7LSxZgzfeD1tAnh+Cg==","signatures":[{"sig":"MEQCIBAd7eF6LmBLziBlrlNHhfM6joy2jFGcG7c83fcv77rYAiAdTr9+AQSq3iRO8SZRYHtTxss/8KRQzLvkRyPj+N96pA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXQj6CRA9TVsSAnZWagAA7scP/j+EC9PMmZDXjvctqetr\ns5+rOa3M+0RfqfNvc82I6A3OTMh+bO/3IdH/PTQx+41ouHvpZStQLYtG1TRq\nc98bXC91yOvwfq0jaB9t2IaBJJcZodrcHzEQirzAKsl7GB+rF++94zGV9b9d\nmFUSecyeD+PWXFKzT0rgeXd0uBD3U+Uw8zvIg8d0QfMCkZlvEMzqgfXwVLqK\nUEZ+4ylbcvz7btozR10Qttn52hfgiNNEeV3Q+6zCzjuK1xTYVSlJmjQU2VND\ntbTbecYEjaEM6Rop5tw3y1UGkQHBJvXz4d6mUKdiJ6UuAk5ye/ta7IiJYvMm\nmxEBSngcPfRFlYExtrGheJ0VFezmQFm6SbT8nISYpHE79+sqfrO0dtIZhg6s\nrRbozz6Q8yPNhX3BbxlidXxqEn/df+qcfaptqna13Y7Ai68Bx5FSYFlmjWfx\nwpIVLlvFGq+6vtahaTa8toKbHY/h7ts8RFlwAsyivss5ZNiNcnaoewY4Vrwc\nKjQTqLnX0fZ9EaT1F+ygWJQDcy7Wst6OK2fspJQy1gCc5Vuj/+iFF/zKhwwS\nqy7rIBNl8E8QnqCvN3mclMtiGPoOhfHElqaMQ2lZhrzdhsByDopyCp7G6QfJ\nwEh7f/EE3tPh32AAT8TIWZEm8Wg6oCJUbbpNqjZNysQcNH/1zGGIJXdoZ/O9\n9NFl\r\n=WGph\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"91446c812d677e4aa2ff714d4c49015a7c8c9629","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.9","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.9","@storybook/router":"6.1.0-alpha.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.9","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.9","@storybook/core-events":"6.1.0-alpha.9","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.9"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.9"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.9_1599932666040_0.3831102263344852","host":"s3://npm-registry-packages"}},"6.1.0-alpha.10":{"name":"@storybook/ui","version":"6.1.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.10","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"87dbddf581517436748778ad93db148d8bb2441c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.10.tgz","fileCount":224,"integrity":"sha512-wBvExjPC00b9mqL+0+BulEXVi50Ue5BOAyek9lUEN4LLTkeghJPzmPiCoXZzNGscYk18i/dH4CcPRnjAOLNgBw==","signatures":[{"sig":"MEQCIBm7BkfkA3At1X69LkV5UnesYHER+GHRodLBGQu1nnSEAiAMkzYiumGQkR+dVraBl4KlR81T9KZbh4ZV2lMnEaYnSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYZsHCRA9TVsSAnZWagAAbzgP/j/7WJOsd8blKjo1fwBV\nRT2gw4jrk/CUuAl7vl+y8TfZ9146Fs6oGef7uTe+80Ftxjtzm2A/gRtDLXy2\nTbx1MP6cz3cpUwqoF9NZtl4CrqggqHm4Alu75uVAuHTVuI7gR7YaeNv0EEfC\n+iamb6LYJH1XkrcY6pwIz1uk5q4yZPGd31oWjRQfjvqwGsRgsk10e4EwkaVh\nyZrxmOKOLd1j/VqMuXA4ExHer66jJnQYJC5icocdLiy/UxWZZ27zLz2ZVjwl\nSGlCE1mf6CTmvIuRAr9kPjq6GyAnS4VDseOpaGQ7F6rgQ+Vhh17LgFfA40AC\nAweShhk/A4GW8qx0Ar1Jyd4D5mY/iR/mqYzCmn7/9AvVQDlxDaupLG9uwW1r\n0SzD5AN6lGYgjon075et07HRk3ngsMulC85xfff4pu2yy7Q+DrWlA3wGsRw0\nK1ObKIWtyooPJpiUmGFO5MWSRslZYnbnD8pJqZxMNfF0RMlLsq1CjbFNIaUw\nyj6esTKJfwLGFyr95CyZ3AWzQvyzxSXmklCvVXwZvhphqOntYyImDtNFIcS0\nlACMRodq+grUDhjdQt3GiXFRwaKWEWzFGy2O09VE9UpHELT0WbVSSuTQoJdN\nEXgJyg5zpFytkeZnNQXuKasOEEFNKtMBmQykdLliBrwqv34Agwl7p02QLD7M\n5nUi\r\n=jgSc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"57798a108e183d97f94fd4cc396e45e1d4b04d23","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.10","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.10","@storybook/router":"6.1.0-alpha.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.10","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.10","@storybook/core-events":"6.1.0-alpha.10","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.10"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.10","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.10","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.10"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.10_1600232199063_0.7068067234572712","host":"s3://npm-registry-packages"}},"6.1.0-alpha.11":{"name":"@storybook/ui","version":"6.1.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.11","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dcd5d5f4bced5cdbfcab99a6b6a316f894fa289f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.11.tgz","fileCount":224,"integrity":"sha512-f8JYhk0sSxJIBTOYBKfOzcQvJKAbSIm3FwOzOaaKBbevmiPPbyOIJvmhjLPf2wLd0/jWVEbw0HkAQdSpBJjpHw==","signatures":[{"sig":"MEYCIQCPNtMmxpOUrHNQry1g2d1f89rAd9991Al4NSxPvxNpdwIhAPrswGrhc0H8e82Jm5hRro46kX3hHJbYlFFc+o9BYspk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZiRhCRA9TVsSAnZWagAA4W4P/A9eeI/sD+ZbX9LGCvzI\nP/NzrCfsLIGhThFzi4kyuAC+pPPqGrMYdNQnGxNOhPN7bdgFxCAFDOUMKTss\nMOT7Uadnk4kr7Yno455le+s6Xo9lXH2bsCDejs90z1q4IPHbOPxSSPV2mP67\n5fPUFEMu7mtazusQ7EegXkmKqw0VSD0SXaxsXRaoAug5QaRIs4J0Qv9ozjPs\nJb0XBRQkKpax7fLpa0rMi4HCryir0k9YWbWMHhcdh9fTw2p6jnUwk+sRr3zE\nyKwpXxj7/0wPhWq5+NQggGUepuk1cyWtp6dBtCQMl11y4X0h+/y6tEGXB/bC\njV5BjMLYAfwEly62F/ug30W+eu9m7pj06/hwv1nPvFv/3hACC+DsJ2mlr7uO\n4vxeSPoBD1vP2Dv8Iokxt7/TOt+43w+zXhPMsnv22MNguEe3dJ4JjtK8gyyR\nLvYfmKw2gD1uVg0onP1lodO7Kd0fT37uuk2S5rtqLOHeX9OvxQaWG6cEbUNd\nzt4Ze/rZz6lN5Wdch6J9pTqfti8wO9VJ1cVrc8QADf8kLKYZ1xHXi5IPUqWc\n9Qsqlx/ViPQuvbl0Fq6kmcWdNSWfHO5prQwWsdqWA3Wv5lypadU7gKfKK0Ef\nGIswLqC0WV8UWbAjZcHX7D1qbc7zApGcUvcIITLujeoAvlr3x/HWx2En/gWv\nGikq\r\n=3Ttl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"38fc33bac608f870dea9215f5ac0657f90bc62ff","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.11","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.11","@storybook/router":"6.1.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.11","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.11","@storybook/core-events":"6.1.0-alpha.11","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.11"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.11"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.11_1600529505377_0.8992938607823644","host":"s3://npm-registry-packages"}},"6.1.0-alpha.12":{"name":"@storybook/ui","version":"6.1.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.12","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"71f755d678c143e88780329ed8fd79306e0f8412","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.12.tgz","fileCount":224,"integrity":"sha512-bGfDMB0F6NbDlH3JGwflH16Z1TMqsH6YM9Ptl+L5w4Y2XsFuWZOLRJKDWxDml0BFqPBtr1/pVLoqwv9csl+7vQ==","signatures":[{"sig":"MEUCIQDh9xpQlYA0nZ9K+0WuhSKOu5cvYKnt/iGHsKdpXU2xmgIgEpFxdVB9F6OMshobvYllXGpAuBTbQE4SbNoC+wprgIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ4KLCRA9TVsSAnZWagAAOIAP/j9CjaoBgoaW63E96GMm\nAEbf63f2XcHoNi+7YkOYJ41Abe3iKD1qKFH/hcMpgCmMOXN2Z9zLkOGXF20o\nBSMkB3w5A7eil+yqvj/SL8uMpKp5QMdqJCKpXo8oGaXrHy6X5HY8wLKCbAWc\nQZGxS+jSPrPwGrRPO/jvAI9Zpu6gCGwCSp+ZRGBN0MH8XTkyvuoEerLDvWM9\n7akjaheA9QlO1iUeETu85mKfsyagXOuqna+xPwWexmdUanTqt0te4zdcDQuy\n61dZz5lYJXFDj/eUVKIEksbtQWjhmsuTBfHo+0lz5qIUrq8vpW6zInVnnw6A\ndZ498N4k0GzJsOmnA5uY0i5HYF6Xz/6MFZGX5yGyXUszyQxnmFG84MhI62Eo\nV2U7QSTvXNBrwv0NjHlPXx+SLcpJtVYudfTHQLv30DSgaGaa4ayRRXCk3dNe\n9JuhM+luqXHDKmW5TEfFE1Sz0cJ6GBaaU5SQTKL/mJiNv39p5Kz4hWJjB28s\nSnUi41WQEdDgY8bGw15GVpS+zflBSTKHdz3BvS4AKfFLHObHnwd8ES9JDTCo\nW43ivHXON/Lb9BUXh9S0udLz9xRetmM7YfqsdPaguSY6GWU8uAtPdwLoDrIe\navUnDWUglko6uJQ1BXfeBDi3aLwwOuu3ntKiSbwIGDBjY5/Rjq9J+pFoTIkQ\nJ7WH\r\n=rX4t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"76ebd96c33a5c55a51e26273c4e78368e86f4e82","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.12","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.12","@storybook/router":"6.1.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.12","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.12","@storybook/core-events":"6.1.0-alpha.12","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.12"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.12_1600619147342_0.5708402499881122","host":"s3://npm-registry-packages"}},"6.1.0-alpha.14":{"name":"@storybook/ui","version":"6.1.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.14","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5055251659cf6f5143a14469947d11dd7c22f7c3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.14.tgz","fileCount":224,"integrity":"sha512-x9whxvmXcmb1C9hNbMDeuDGff7bowI8CsSo2mjxkLEWwj+Z78uUot757sjXUPzq/Tp+wRYf/Tk74zl57L5b14Q==","signatures":[{"sig":"MEUCIEdsg53z4uqjaRyQ37zvzs/KUOUCOyUXeBYftmG2UUu6AiEAtHCQSaClSyPXh+AVkr0PV+1HMhWAKbc1LpgDs/lHq4Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaNzPCRA9TVsSAnZWagAAAI0QAIwH+cAjhIL1JNiTD4KT\nZk3ew9IjMjR73ifXXIT5PJKloxd26SU2t0/GOti8IZWxnkFa38aeTcvYYC1/\nkD5F+m6BJumOOUfZWVPS++4oylq0aFexCR6Ng20/H4VD/tI2D0HNA0Gugdrd\n5ke0fpl6uM7WWKZ24Q8Z02jFbQv6By58VRr4aPRzqECDDaUIlGnX3lF/r5rl\n76/gnNXFsGKvslr404uNzupHGQxBnBqeZt+ZoBLQcFNmqdvekiVLUQ7Vpr7F\nFLQtMOIuD2buJkkh72dp9qXiWNfAZoYpKyV6Y8+/1VZAbgFkK/vhGQY1FE6m\n+mYgU3TQ1SeAVXU12mNq2yeSxTmaCD1Cuxsc2P1lB48A2f/khpQcwGfqqWby\nGRD6TnTVOuEZgqo65fK13aaJCPlBSqAvw6Xhwq2zYR3HfkOWgBHQXOC1bv9a\n4uginjbB56M4qhwBKelZrW7OqMi+BQHka3v8HxU26ZEtSdX9b8ICoTUnxfDi\nJn/617JaK7FIM5L8fOwEFwYrDkMm9AA9PqZPSMTAlqdKYyfigAiHvNpWsI3n\nW0HujlA3B8caxo1Hh5qvpg8sr+ObUDps8Adkac8nGeXkCIScfscxPBfeKhP8\n3wiypHAP0MTzmXhxgY+sHXR9Z9UMEfnCDRJu8eXUk9Gg9qEepTNnU+Tu9QwD\noMfc\r\n=+Up3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4571582a90b646e361cb37df525f62312486307a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.14","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.14","@storybook/router":"6.1.0-alpha.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.14","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.14","@storybook/core-events":"6.1.0-alpha.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.14"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.14_1600707791302_0.6233555373297859","host":"s3://npm-registry-packages"}},"6.1.0-alpha.15":{"name":"@storybook/ui","version":"6.1.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.15","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5072de3192849ec838d68f08545920523f0168c3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.15.tgz","fileCount":224,"integrity":"sha512-jIDMdD8Eh16SRx6qp6aSpKf/vIZer5NEeFPdI2DXz0Vo/t6732BQI2bc8Uf7A/68H5khwyImi/WSZJU4mJwiPQ==","signatures":[{"sig":"MEYCIQCs6/ogWUmjtnDJhFp4FG6lPerCWx96lzQfrqP7i+NGrgIhAIAdYjMMjbyoB8qbKSp9kOkxDEAtsGqPQT+9dWdNn7yo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbJbrCRA9TVsSAnZWagAAapEP/1YT4kILFqRZNDn4/XBk\nG6UDTS5BHcqSJ61HTLVgbzu659M+206uF/xkEnWlXMad1dc9xE1ajrG8HUh8\n72RD8cIWluHI63SiJuFw6zYmCAC3r6Nsp/jOjo4nFQA8EnvcyofWJFWwWejg\nqurxaBrKPqwoFN3yoEogpJFk/yY5B+MVeqfZVlTykH8tmB1RB6MfGouPgkFv\nP7RRrjJeMrGhBf4THoAkZjG4rn/tvixK3vSC4l0OxtUlEUfVXXi9Le3MOJsx\n53T7J/AJY3Y7H6Dlw2riYf8yswc+RNbP50Ngo2dwP9rP+V7pGncX0hiem7UY\ncyS34CefWiPycoe+suJ7ebBHNEssU8aIFcVd7GqcxWK25rV+BErVOGaz4abj\n2L4gpO90yA/bdnYLGUi/bmYbfLVGXb7tevjrI2/VmVSVwu4Gj4vDgYOc0emP\nQdUQc/c84WvJ5td5Vv4fW/SUmds5v85YnAT9R6SGtoAT4R9i+p67tjwyBzjX\nmV4c5V0/xP7lQVCyiMS0Hv45qRy+gvEiYwQac9zRf0PXOiR+kvPu0SlJUbEo\nEnk2YShZll5TKg5yGqPeQrHRbC8AO3TDAnOw5QHKJWUJKnkzs4t+Guq0FWBq\noBn40N4AAo/EpUIuonLY3IvCCXj/oPoPkoUKVwnJRL6RpR5Uwm17Qh070Dj3\nv9DQ\r\n=27Xq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0d994a5ce628fc9e1b1b1ec39e22ec35e4c72e9a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.15","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.15","@storybook/router":"6.1.0-alpha.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.15","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.15","@storybook/core-events":"6.1.0-alpha.15","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.15","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.15","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.15"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.15_1600952043065_0.4408381558489649","host":"s3://npm-registry-packages"}},"6.1.0-alpha.16":{"name":"@storybook/ui","version":"6.1.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.16","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7c592d0e1262250357fe995fec81076430dd6958","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.16.tgz","fileCount":224,"integrity":"sha512-bfw2raG14VVIs3kMrcWn2XluOoYYwkpNsIOzL9SHRxbIGe3xdj0fTXutcOts8dikIq8FfpY5d7g8pYVG4WIOig==","signatures":[{"sig":"MEUCID9wLQ//OdW4T4/prOHT4YA8qSwMaVgXYlA8xdLewj53AiEAzv6lXAuI66YJxB6kcLqKW1l5Xl/RlMoghtiXuyaiBJU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbboICRA9TVsSAnZWagAAxlcQAKLy+Bynykk3sRJDzQX4\ndBn7eSRlKJdPdBYTfRJjat8rI8B1v1hbEqoRnjf9ag+6tpdT3J3YGuhB0sV7\nTeRfXV7MUEpD4Ahux1pPrwhDPuDE/OjIS5QbLg9jYtih/dXjgQjxV/RP2z7n\nbuKD2i7bWuEYvguk0oc/SaFHH1E0F+5iW0i4dleXp0egdReja29WfJbPv5Ho\nf/o6gJe7oVsAyTjOvcwxZylht2jJII/JRgV/wVeuo7JFhw3juoQLXedQSFUm\n9yyrNXp8HX0HSiO7hKzXDOJqtG9wlMvGRkOd88qvnLYD+FaVu6r03rYgz74d\nGnwRDsyLORFky0vPNLriIzbhy1+jlJG7ywUfT0QqMhW7jw3/3FgbyUJzwj0P\nA+0f2q80dd9MX9JWb2MMOzfoHcNwEoyK9xO6JQ6IDg9o6Z/s/1gPMPSFcwK0\ntAObSwCjpyyfm/O3O/Mc3oCtoNfrloFuBZVl9ULfxs3u2w+uFxenLJCzFFQA\nWnZdb8tWrYCtZnRymnnSEdR1n1efMVbnSUiKFB21a6oTWoMCM2HD9lzGiZdG\nj35wGCIc2z9q8K4ColbOUkmF10WLUF23uESNjOE61uQCZUqjbpBTWq5XCV5l\noCpVIspMrxdAmE2D+H9ZW7A5X4pMX3jEB2vnKBkQLr8mgS4wzfVg7CP0dWfi\nWRz+\r\n=4iXw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"fe75aa718584338581793a032021a1850e1aed3f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.16","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.16","@storybook/router":"6.1.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.16","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.16","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.16","@storybook/core-events":"6.1.0-alpha.16","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.16","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.16","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.16"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.16_1601026568222_0.7012987728551223","host":"s3://npm-registry-packages"}},"6.0.22":{"name":"@storybook/ui","version":"6.0.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.22","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8aa93c66e66e99010d98a7344adf1c7a9839224","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.22.tgz","fileCount":224,"integrity":"sha512-iueyQ3EnLHhbV6xWQWMoN1aenEh3jLAXFmabxrf1s/l0JKn0u6qr7BHZcu3VZJ4EJCEsh6wDFNWjaUbTpfDU5g==","signatures":[{"sig":"MEUCIAEtQ/Ce4nQDVC2JgzBeUDjnXBAQwNfGUlSkLMOUGBPzAiEA72JCbiRRA4ZfXckbarL1vHT/UV2DNz/DXa7zj0GWLh0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbs4WCRA9TVsSAnZWagAAHvgQAIoMA34/sRu6PoWKRLY1\nJcDuOCcJaCRmdLQoVbL/XKoMdsaog3ZgyrDTdoLuzs3I4tvbq9NnPT3tcqyK\nfhL5KAneWaufo/ZBZlrQPBao/V7S2CJyuiG5vM5VE1vCwhE18WXTkMrvdD5D\nTOLGiIC3S1RFI7vuvWQitjnT4lxRj0F6ZxSdc6Y4Tx/xEHOHjYJlAhJ8WCix\nX+5DOB4/vSyshfvbgkpj0j41KiJUmy3YbdgFPCoZzMr80grpAOJ4MzEjb5Mw\neSlGKCUSsUtQK++bC3HbciciRxxvJA3HEilE4YccCCjZ3Gm2NMUJf0DRbYKH\nx5bBOEOqQgKBaAOyKoJnDFw/Dq3CsB28H1xVEC0gdA/3Lqpd17bb6LwS9LiB\n1bFBd6egrwEwlVbsqIR4h/5+lM0QRGaL8XL0iTzzYlCJDAzEO02L7bFo/k4x\ntbKsE93P3xC/D8L5NTQNSDy+ssczb9W6hFA0F4zrg7ORNM5WLGFRBLM1C95E\nQEs/qqZFwH2U8I2mxLZ8Ad7LHPm4oXRINAIKXPgCoreo3gCPph3xFDmD2rG2\n0qUVpwNM6E6+/FMqEdAp3IG1L/Itqln8Mh12xAxTTH4EEtCmdzn55JknSyWR\nZaMa1jLq29Plwxz5Su5OvpwNeVxVDQh7s7DhTwZp+pxe8hnnlE+j8Wrro8rw\nUZkI\r\n=lOIo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"f5fadd7970172906eb37ce48925822513638099d","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.22","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.22","@storybook/router":"6.0.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.22","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.22","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.22","@storybook/core-events":"6.0.22","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.22"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.22","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.22","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.22"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.22_1601097237916_0.53863315510074","host":"s3://npm-registry-packages"}},"6.1.0-alpha.17":{"name":"@storybook/ui","version":"6.1.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.17","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2a311ad08034593f23839ec3ab739aea54c28779","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.17.tgz","fileCount":224,"integrity":"sha512-df4knI6vG576CId1dMsLyRJa4CBRbZdeJj8C2pQoNYfHXoItNtW1zm8D2pevOCUEBalui2u1iAMWP5+c2ZpX9g==","signatures":[{"sig":"MEUCIQCxT5RE/ZNnhktQYmjU6Qcy49/LgCmn8SVgQagtFjpRewIgBSesZyoYvgyaH8b+MB0ZI9y8E7LdWxIkxLAKfAF+Cl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfby59CRA9TVsSAnZWagAAK7YQAJMTz5vmww/LJwhS1WVp\nV6a61lnTl8Xwau5IZkjuISxJX1G/nNCNu2M4luqBwY9D/SkigGLPVHiAWn2B\ntSMmky7XMJFslE3Q41VC3tjziqIzfwjwO8WpQbozQzPgeDAmaJ5lbbrguD6f\nAszirLdUOIDZ8/FZW+QFYyLar31uQkqy53SPx2eqM7R2/kpS0gYaudBVUGir\nVZdQRReBqgbuT3ReSQzUE93HNsAk/+1MUuaDnjL2PkUy8vhI1dqPjQIRmziV\nrOYJR5rqAtHhMgYNsyQ04XdYiVQOADw1XOBKsiOsL88oJkkch2o+M4ISII0M\nwbaFZ1MBLsYxWoNt6TO/Mkf930qO6ZhfRYNKKEAvAIjC4lHjcNd5ZYTXLlFe\nckJDpHm8WXyevLUrDJ+1QN/G9ERC3zMzu1xuLnWNfaxFxyKBG4KA6egGRbHA\ndbGU+BAfnrlqPjnM8wH8XB6xpW7FHT6+/T4/LPtQXc+3orFZ/yLKWW4ZV4Wh\no5Mv9RydPFPBZiJbJuDksqMI5diOgyZXzbdVYxPm7/sqidpwOpeJf88HUfmj\n7m9DwSPZE+9pNESu0GxfJTOa2UCrhxGE+fjNkVQWLW3b4qE4/9++E070YA/f\nPZvVxwZvXcPvfUB/ojzawOfzUmAiILkq5Qshu8rfFQez4OoQANeXxfPSfXL+\nbr2c\r\n=2EmU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"328283b5ccfa01c38eb2ca0b82ab60485b5eb903","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.17","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.17","@storybook/router":"6.1.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.17","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.17","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.17","@storybook/core-events":"6.1.0-alpha.17","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.17","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.17","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.17"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.17_1601121917312_0.1838557549850619","host":"s3://npm-registry-packages"}},"6.1.0-alpha.18":{"name":"@storybook/ui","version":"6.1.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.18","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"50e5e5592bd26a01d6afb3ee407e5fb2cf385520","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.18.tgz","fileCount":224,"integrity":"sha512-VMl9KAcPcoeh/7tpN0zEs28zoH83Ykpo6eLYkCXEtaQu1CUBluQ2Z1zma69EJdA67RZOlXaVd9m6NBkAAR7kQA==","signatures":[{"sig":"MEQCIC/L/h0noiEYeKaAQ+pZJ1bKoTilROOSrwjssqiXFxhEAiA2Xzq0TPwV8mcImf46dxrgx9w2P5LT/HDYRXkELifFLg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdGWsCRA9TVsSAnZWagAAOLQQAINevC419MMc0Xnc7/hj\nlgoJjYLguNf3N6OeVoKOYYl6bUgS0Yc1W3UJeK2MmaMUOIyrMYJk6Qjxvb+H\nx4HUkJrdo4ujBlYY8JmE8fDeb6xP7QnD+fd8MXRfODQMpReGndKpEe+3Dwnq\n3BmL3MhT7LMNUi7NLTLlhxi15ptBkX1PXqf9zXiRCEHAUcoK5aK2VmEOXSTh\n81hEc0nWw9jhujb7IVtKX36NhxN+f+9B3A4CxVkynF5cnT31PyGchJGnaU/7\niScg0rlkVJxqWBFJVyVRIlQUbFoKREtvIbpAi+f7mKHGx7Vw2FwGBpSDYfT0\nIT60nbqzNRXNAINTEltlR7IxzQKkis4ALB3jGcuc3Jbies053xjVCovo+5bP\nkVwcYiJFd7QluTXiCvNyUNS57F7M7w3s+w//ie7KD/ZyRKbuYp5rG0ATBlWh\n56kFBjG6/o12bL05TCUU5bBJMPy9tbEnf+EKIRrtCNYTDij0ILoMFD/2gAB/\nSKes8AlK22FUKUZafxGlfH+fKl5QZ+wItT+nYX50gGGzLTmdHleG9+gBTRmP\nBFR95JcgAwyjn8fZL649gk7Rcho4Q5C8Pe10vWB/ibh4Xq6RYHc1CCuMWTPi\n+pPu73z282JZ0U6/7STuuS3m+PP0rcoBDL+ZDldUleNttlew+xitOerJX1oZ\nkM9r\r\n=Hbz2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7bd08008b5a105726ddab6abc4478f46b5fda95b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.18","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.18","@storybook/router":"6.1.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.18","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.18","@storybook/core-events":"6.1.0-alpha.18","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.18","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.18","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.18"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.18_1601463723976_0.10830315919615385","host":"s3://npm-registry-packages"}},"6.1.0-alpha.19":{"name":"@storybook/ui","version":"6.1.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.19","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f9d6ecd3897744a672aa3c06451f460516c2e503","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.19.tgz","fileCount":224,"integrity":"sha512-ncx62ZjwRGopDVarYRRVgK8lK/LCkf5kNX+vlotr5A2FmO/W3W1rVrh19W25fq9jksH0wqshphI9YGSpaX5rTw==","signatures":[{"sig":"MEUCIQDTWnH55AZEvif4FT+TIDVfoLsIfRx7smND/cioiyZapAIgfFdkDdKV7elEnnCbE4Cr0V6UhBKD0mx6BeVwcxNAeYQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeIHDCRA9TVsSAnZWagAAjVkQAKQEgTj+SzFqNuBCjlj4\nV28JPjoVWPBkQ5GZ26UyFCz2MHFKknZ68X+SxrG16kkXNXp17Q6agZfTYGV8\nAuRU1LK5aoftuXJKyJzbIykUKLb3pkGhl/dZMVi9wfIPRU4SqdO16e+Jny9q\nGUSdtqUMh0WYdrHDDlVwwzJbIhduWbTyl4tSlWlT/3FjVZj4ijVrtyPVca0g\nvrSoon5ShrUIOs3WrcSUexGC7pEOESRovvEQEFL5yKW1sVLIhmv3irtI6jG3\noZTpEd4wJi1xBCrTyPmN7W8V9oP7Fq40kFN3nvmyA/94bPpH9dnwcMJI8jhn\npDcIeVZtPUekAQ5wCGcuLLnjsUUT9sDJl4LTcI0/1DWnm53XUvhEgaU+cqto\nfg3Qd7gAz3dckM+UHw2ZZHvN32QCrv4lRu3Rcb7KHjj6lBRsR8cfx3vH01yt\n/enNPh1Z1NDTFw60piFT38XaewjqIFKDOoq4VxZc1JxwJQ68BEAWBY57ORdf\nZoyVFZxrqZDYTVtT+3iq0/Q+j7WkRvUyHS0hZtkIojDwDvSd64EsKlz72DJZ\nCJrvvNiDfguZ+q+cL9Xg0bnYMwkwWyhQOdJsasCT02wD3kdx60g5uWUMxfbY\nWA0BVATcujvFyAyWGL5KlDvgX+mfClvK3PWGtsKl8otKG1Powj75jK7/YTZW\nAAzm\r\n=xrVz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6a3203004afecbcf8fa027d38a6088fd927714b1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.19","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.19","@storybook/router":"6.1.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.19","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.19","@storybook/core-events":"6.1.0-alpha.19","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.19","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.19","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.19"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.19_1601733059109_0.3793062172181141","host":"s3://npm-registry-packages"}},"6.0.23":{"name":"@storybook/ui","version":"6.0.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.23","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"966bd14773cf629de24dcd4c0ab25d7d63450967","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.23.tgz","fileCount":224,"integrity":"sha512-8GYXWdDerCGesJAw7xy/MOOXvCVM9fOmFdBhaWeZKBQFpvEyF3xFxtQgWtGWPQU6HHDhyh3fHTdYFLn7InjNRw==","signatures":[{"sig":"MEYCIQCZ9TmaPgcPyqh3KpwWjx3JMKF0PBR10OYZrDglc+AkUQIhAIW7WcRDD1sQ/mYDY+jJyqkHJdfCTlbhZOhc9TWgF7SV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeL1NCRA9TVsSAnZWagAALJYP/3G6cZ8//wG7dEZ5pn/S\nSFzkncmbdNUqWP9/l0MeQZLx+YqK27Rap9s9xBwpC+eSf5kqU4bs2N3ax2Rt\nRHvQ30jeaCJeBa8OmfSR9yOyPuz9zXz/ZBlCbjmvjpTW6ae86VQ9AnPq+Tnx\no2KcwFAemUG87N0mKjzwvsPZ4aiBCBsKX13PFmgUjSsdvTh13qUWEmzuwfav\naF08t0tYlmGMBR6/Ff+naccsgbCIEf+mLUfPJBNtYAYQHYCCBSFleC3fKQyz\nMqI7W9COXk/pqRMbXeEuVbPyrs5swS0SF6XoXwxJkg+hTy8+mnAhYW22Zqdh\n7QeFy7svCW33/SlwyqxG1x4RRVX7AFqqYbYSh+nVgd3dR/tQYStUEhTq8ua4\nO6fuilvTH0/jW/PNB/Ijt3Oh5G/uHtmWBOqGdfsJoRB+INfyKcAyc/H7DuRL\nwDbu1hkaACGO6tMekmiR4AvAfoho/XcONjuI3IW9pSJ/VQx5+ws3N4CFY7eD\nwI5VB69zJVZw6JuQ0ryxULMNRedMi8Swz2Fbf9A5NUPQG4Hv4UYQUnBAh4Wk\nTSQUKM4tS/ImpfFCCZhkJO6K/6dx9l+99463Yh+xah1Pg5u3O06BvuzfCWGL\nboUn0Gc3DM510ymCvvquscFT52ryPKvPAwIatUuYViBQm7dsh8H6UTQmwn5d\nNggo\r\n=Ud4d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7299b834c6ba4f3a8f6ab5a53d3f34ba982ca7f6","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.23","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.23","@storybook/router":"6.0.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.23","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.23","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.23","@storybook/core-events":"6.0.23","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.23"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.23","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.23","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.23"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.23_1601748300520_0.5125176623510295","host":"s3://npm-registry-packages"}},"6.0.24":{"name":"@storybook/ui","version":"6.0.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.24","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f0f01b0aa6345005c56f6945f5533452255f6cd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.24.tgz","fileCount":224,"integrity":"sha512-JySvDrS7YYhswVeHo1A7/mi/xPi2E/Aen8/zSRXCJxymRzh8hrB27PNX9/dvToDy3Zz13HsNOH/EYM/DnbAP1w==","signatures":[{"sig":"MEYCIQDdiVaaNTquOolv3StHzfEAxiwAO5SvFwpnd8zI2ysTdwIhAMl1ieDo3zyEeB9LiyrHDyeR+itzrjuKthBsEzSWz6F+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeMAfCRA9TVsSAnZWagAALwgP/Azx1W6OQU8Paf0zr0rK\n6TQXCYId6mmHVqTmyXNm2qoTIlBHIeE2MxfUTiBFKAj/5142yWYUb4PW+55w\nR2bk4V9rrI2UuESCaSql5Kz6vs2yobfBQnyeprmzHW5ADWXaaqH4l/srTSgj\nvKC3tomgdyCUnmsG5AlESvGFe8wshakFv2OZHsiQWpnNTziGGG7Wq11d91kk\n0JdPUbmA0DpoRAgj7+7oZi2mKzYad0LBdI+uDjS8iBZYV69mt/01jdOXYjUc\n7naCsPSroUkrg0KEPoZ7B/NVrvNLOehCOnh+x36a66cYonBGZkz4yWDXfHii\nDd37+kmB7FygjrrmjuKnB8pBTSpg1wo0Q21637jekdxZQs9LyFOfv1T/DCUv\n9eAwjMA6Q6y2suo+uk+jauvki0jl9AkACmXdSsdO6wuIUVKqDmlFaogGbUtl\n+9srQKa5p2M/0KQkjOSvFfBp/RPi5cJ/Ge7ARJGAw3eaE+xzO9Fxxus1/yfu\nTDRynYzcq7phg/NMXeRVH1ikErtPyGJDvVzNe7KpBCHbOop61fYE9+NP4iAa\nwzPVXnNuYUFzMgBuHj1twOqQHLWegvFRhkh6cfZw58A/5E36q0/0cfuFLAgo\nFcumHkrWQtlsu8TUeWwlwUmVLVMaUk9mnFfJ1ovkMbKfqoqsvWCFcg1M1y0+\nbTpP\r\n=RPD4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d474fa57602a50e2b072c9300ce8fb36cc4d8a9c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.24","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.24","@storybook/router":"6.0.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.24","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.24","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.24","@storybook/core-events":"6.0.24","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.24"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.24","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.24","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.24"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.24_1601749023053_0.6361126831534014","host":"s3://npm-registry-packages"}},"6.0.25":{"name":"@storybook/ui","version":"6.0.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.25","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f503785f0494d81c961e7b455ecc178b293d1016","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.25.tgz","fileCount":224,"integrity":"sha512-s/aRHLnmOSAH560erbN2uC3lXrkDQi1/YJJN3MhNcd7qxUCRewJ7olF3k0F6YNSj2vJtSBXyZOEXkNLu8kFCwA==","signatures":[{"sig":"MEUCIQDgVjQTmclf0IgfcwXjSKhIbO7k+fcHXYj4uorySJDHiQIgbKG+uZ+EerXFLlk3V5mRh7t+Yfl8qcNW4sWtiGbS1Eg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeMIKCRA9TVsSAnZWagAASLAQAImdTZR/sPNdscpQfz80\nR/Ew7Cv4D+sC2DoqPZ0CoURG6jeAolH62r8v+7S3G/GWCF3Ay4ihPpdGy4Pl\nsKzywBBCHCWGPpqjw3YWL8rryiQBCPso3XlvW2klLmPg/ncO4o4NndUG+KN5\n/Sg509dsHHJzXC2jFrs4KohoXnj+mU/fOcbYEmb/JxkKSdEbrSeUHe4oYTtQ\nPtAY7PC/Je4pxzrwqaIJYbzf8XpNvP9wXz9Af2GvKUd9T9AdVk2mp6IN14dr\na6SRquClzW6vS/5KN17s4o4DLUx4+HYTqasgwnLC9lWCAURN6jk69/tXCilO\ncauBJrV+6LL+SXtJ3+VUWyA0xSF7G4+ailwQK8RvWcuwAFiDUOOLGHsuqvxv\nYAW9R0YiteE4gDK9kQA3tB8u4CapRf+IOTTIHocH2Ttkqzz3mzNxqj6u4ren\nUkyRBgQuBYpbgpzK5fyIdXyhvOH9CuEAN00q6YDDwL/K8274jFZYtKjjbl5s\nOO0NgmwvLVyEKsoX8X6GqAPUi2GCqXGF5JVZ3E6s4IxiGDiyjN1ZDWnw3pPq\niHfBFZfPDiKjO4fVYoGQRVP3eX8FkQgOsT28lcG2pKOBk+c2Vkr1xyo2t1O3\nF9dWCQs2E2y9B/laoBb/q78K/9Xp11ItmGCF774cboZK/en1Uz/o4Gbsjgso\n8Mtg\r\n=p9J2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"89c936fa79fd0a26d5a92485fc95c8f147556700","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.25","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.25","@storybook/router":"6.0.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.25","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.25","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.25","@storybook/core-events":"6.0.25","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.25"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.25","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.25","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.25"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.25_1601749513658_0.07474868781245947","host":"s3://npm-registry-packages"}},"6.1.0-alpha.20":{"name":"@storybook/ui","version":"6.1.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.20","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"45c09250bca511f5315b94c1706e3b00676c92d9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.20.tgz","fileCount":224,"integrity":"sha512-D9kkoRn1PDqv7AsfLc5bwewChL3DZhJBSVtM2y3R1/hE2y/zQxV2f6ELkidM/Gg8xc91GFLwKc/i3NPRQy9seA==","signatures":[{"sig":"MEYCIQDEg63Bw+z0gLumaz/lvC7W4wOK/J6a2vCQ1R8WdTD1CAIhAKD+cSASoOHaUuWOq4FCcOfISHHw8qGEkWWhBOTeIsNn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeqyGCRA9TVsSAnZWagAA7oEQAKLdVnsyQYIgjNXPWnBd\nREhHTZRwS948hnyGbizXwKLNoIM3mIaDqkYUvgZGYrQ3IAMsVZehMPOTH4sT\nu6dN/tYSjRk6/RkUSulX+FwL2vIDWXid1i+ypp4/iKAXyICK/v7RtBEaECz9\nfgVvpfkrCC5CULPZRhBs6GMlCK/yKRVsGGfA11BpZ8S26qq3PJca1peboHDx\n7fBk4RID2yFr7R8++igr/BJFQbI7SxxKWrERnOVTYqUwO4NyM99+GGvt1SxU\nTx1AahUa7WJ9rP/yNVWk9UCgawH+KQ3x3mvUabjraUzdw2oeTze5frefCU2w\ndorx5pv00u0QUzyd1NipVonnmaZQQ4g+RafGrtnbzEmscWu87T0rfjctAoCT\nI31bRtIMzXLcP6itJ52JeXqx0fsN7ZpreZ0u5ngS72twrXMEi0Cu6EB2c/08\n8l+I0joIR2lwh1XqOSJ5oxkVHzMcTdYU9As5x3QrgIb5F+bmKgaLVMIGFHvq\nf3og/VOaDoBG+i2WOXYm1AyQbyTYlxNaHt2+i79fC8zXp7Xtw9UXe7JCEyCD\noIFA3YxzhQJmb62PRW8N1je/6vP1DE7jTcnAJLSOOrlolvThSMYNNnZXffWx\nPA+i9GPo5CEa32RbjlGBmNyB/+wKye4CqpohkucsvynDfeLaZD7qDBIfRfG+\nn2LD\r\n=OiFL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cc1c152e5452d28eabb24330f4ed693cd6782bc1","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.20","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.20","@storybook/router":"6.1.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.20","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.20","@storybook/core-events":"6.1.0-alpha.20","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.20","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.20","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.20"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.20_1601875078533_0.9947015542922559","host":"s3://npm-registry-packages"}},"6.0.26":{"name":"@storybook/ui","version":"6.0.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.26","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"60e97d2044a3f63b489d7ad0b0529d93373b71ee","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.26.tgz","fileCount":224,"integrity":"sha512-Jb7oUJs6uyW+rM4zA8xDn9T0/0XtUAOC/zBl6ofdhYU9rVjYKAQUJqmYgUHNOggq1NGS7BVp1RJIzDWGYEagsA==","signatures":[{"sig":"MEUCIQD1Icm5rkbFE6Z3eKawjHWOUloFxwzxe9lyb5Tkjd9CDAIgYbDVIqSzQcI+nt+QycxOYIC+kGKTeBglg8oWeEfaWV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeswOCRA9TVsSAnZWagAAA4gP/j0YhM+KCjeMFofrf4J1\nAQ5MogEn3Zdv/5fqy75Win6zzmuKvaX818g/U1UCL72m7Kojgfl79Ctu8FPn\nQ/6BQOfv7Hq5I8trdZ5EgvyvZyhxC5NrZlz6CUoZLHErr977qedK2vP3RLBt\nu+1mUC2fB5/3OMD3nsHPKMmUUb63X60uPWxLzUQy2IZKJgRZLYdNqFtj2FGp\nF7cEBUqL1ydmWeQs/96dQStBnOkSuKEogFcwAU2DpvBraiUrYcYmKM4UIAwR\nbV1uw+G+BGKZiRiDxsxnwSiiCPMdHBJ1d0DGFrk5q98BoElAMGywRCRxq5xM\nLZUYoV+Saiu0g/+j9hWtvbKd/3B2ye/BJaUeqlTltuGiddJtBomMJzG5+Fk2\nVTHqRPNZvjNtAiY0FBN/Gt1O9sMgSxVIezVVULSIGsuTyYOvzRIzciM/kxTr\nmoZaPJkAQ9xs2xZUvcN/w6TOfXAoHMF1zVj8zmWw6PeIIybpFZjEE+mQXBJp\nFBvS8fV8vXBaPwmHcNW74rXtYdv9djUYZMZ8cq4MbB8ublFE4cIZurYDLaUC\nOJTBgQbCOewNXnl8VLxjGhD3uJSt1Gg79vAux28Bdt6SgG9NYH0mjdGn8F6n\n2CjRZoL/e9zDHE0FiCGKbBjwuVB8mT0Yx8qTkprl9yGaIAkLlaqc4gCa+T+m\nSaKs\r\n=eupM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"748710ce10a4f16d599f183f215455e450e25d32","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.26","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.26","@storybook/router":"6.0.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.26","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.26","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.26","@storybook/core-events":"6.0.26","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.26"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.26","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.26","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.26"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.26_1601883150378_0.44340004720923654","host":"s3://npm-registry-packages"}},"6.1.0-alpha.21":{"name":"@storybook/ui","version":"6.1.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.21","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fbe8f99ef0d31ad3ef43b0184a9c8c82dad1963b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.21.tgz","fileCount":248,"integrity":"sha512-MYimwL//2ZrmyaePAaYYV7+7ReGaauOrqyb50oFddzAsyq9spB4yUIvZFffJfltbajIYiFYUFlHIMSCTV4NtgA==","signatures":[{"sig":"MEUCIQDkbtwhZ38Xp9fkpyl2N8MpFKEpDKhnNaDkk/ITtD2rIgIgUTqBbSsw49aq5/pW9T34rrMQYeNZKltOkIMpCkIfdsE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1498586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffy8+CRA9TVsSAnZWagAA62IP/A+DDfmDKBIw+wuv0NTA\nmw8WqDslvyzJhK3JzfTxuv2MOpmISjC2Pf/ajXiUhHdk666TJrPnesrr49Ed\nYBts8zXQT3yl3QNBw0fa1+xOjgRw/9e5YDKBdGaj7tedQZ8htbNeZvll/otI\nPCQWPyURPiyqG9OZqxOm8bUEi57BSpPYzy3SV+ZIjxJiBZ45X5X8YKUr93i4\nKNIf+BeopT8EKcj0LeviclljbVxilvex1F2MERbbFjQaz0os8d/2YZeUu7KF\nztJugfbWFQEZsTW/OA0FdLcBp0rRJUV5OFLEKjyMQl3CeqvcLeioKWZR/CS0\nEY9cxu4BIyD3JBNuA6B7qx3CCtYNM858HLMBhwkgXQo5C5RE5AKscELmtP22\ndKiC5m3HFS+oFJpkrKIluFaW1T0IUTA+moXWXjQ2waTMtNe17/AnMRoLXDwq\nKe1yrYiT4H76jrxjfMATu95YWYshi1/wSxIDrdAeICsAspGT+TDdDS9M8ZRA\n8U4SrhSIbV3rtL6KC9GV4UxDWpLZrF1miH2bwX7coQV49E44WKcWAvg2oIdR\nAgBz+4FjY+HeLlsLM0sNfnZkaRSdjYOFATy9oYowKBcHSUMTYaKxgXd9AqBV\nbxan6QJmqWHoU+59zz/H6t/fxmIv3UudFj5jCH3UuQ0r1E2vT96p4OorVcHD\n9zx4\r\n=/b7m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0ab71655be7c8fd199c9953ffb0b4509e9bf4ec8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.16.2+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.16.2","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.21","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.21","@storybook/router":"6.1.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.21","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.21","@storybook/core-events":"6.1.0-alpha.21","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.21","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.21","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.21"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.21_1602170685597_0.3100576939138917","host":"s3://npm-registry-packages"}},"6.1.0-alpha.22":{"name":"@storybook/ui","version":"6.1.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.22","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f99ebac314d620ee66aee9f1b588be20e0fe677","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.22.tgz","fileCount":248,"integrity":"sha512-Mwz4psfFifC8FyXep4LNJq2LE9doRnRLDGDkoblPJ+eLhetEbKqqf0niRqdJEab7vKX5vXCtzK+pJLH4MLq47w==","signatures":[{"sig":"MEYCIQDICeiL07DcqRohlGK9UGr1nWI41UprzqSG5d/5i45eyAIhAP6SDsrkDjk8Tn5YhwfpAyKbf1gl03lgh7Hg227q/ATc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1498586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgRw2CRA9TVsSAnZWagAAqMAP/0j+ncmJn5eqlkCOXrCt\nW5iHsb1sq113YqWGlzQiYnIBopFqjc94Zcnk52KFxHkBwjJEI9X++vcagPHR\nHESF8XaArtdJrljCBcT82vVaIxbsLoV1SssC/7NxJg9tVqf3WU8ShBumXoxq\nHQ+WD4pE2K4n5GysQnpmVKo/DS853k+FkK5Ew3c3pnwzWk1/RWTA2BrsWH5j\nCo4L3pVHLO6KXKWJz81MAuDoRxiJqcdQD7bgnIELtm5nEXWn9EP7d+4UzrR8\nGyT/I+o/tkW2zCfI8zM1KQoaN0QHgUxf6IKlHdzJv2729oGNpbVXX5PjgViF\nu03btiHNxQ4LFVZC5lfOCuF+Ovy5J+LaHY1YCdu2rZVREBBOzPNnpEzaatH8\n+6DnZXiRk83cjaDp2l70QIrduMGpD3mFfCAyrD0oZiEeCoZ8+4txLgZqvHML\nP5GAM7PFfK3X9XNJdwxMXKCXzD94+ZvD1HpNfEwgaKffOygvgAnQF12e0Xoq\nF7eQ6iFKBxealUJKIO2gSBSOxCZt3KW9xhQUs2fa13eY+vedkmMWjczNiXzj\nWzHMGa3UO4wDdpyTRP0XOs5Byq4oeoEUe+WQz9D1wvGbP5C7d9ovzxvBpi4A\n+kYjnoYsBT7sVosXiLWHulyrFkCeUAMVqH+2BcyMZLbqkVya5WX1KxVS48Bx\nUF2G\r\n=eWZb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"062478198c765be53467ac3fee581e9f8a7f851f","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.22","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.22","@storybook/router":"6.1.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.22","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.22","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.22","@storybook/core-events":"6.1.0-alpha.22","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.22","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.22","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.22"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.22_1602296885986_0.5901658876050735","host":"s3://npm-registry-packages"}},"6.1.0-alpha.23":{"name":"@storybook/ui","version":"6.1.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.23","maintainers":[{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6a92c3901933d511d3253f548b7811588eae8640","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.23.tgz","fileCount":248,"integrity":"sha512-J4yUTTKwdcZllL6iFPyRwjH8QFONexF0TInjfpCzrAnVe3ASP4sysKnoen4ClL4aGbZjRo/9k5ROLK1F1HJRvA==","signatures":[{"sig":"MEUCIQDEzgyLYwpfoZzWcnAh49GTSRVzT7Gpu9a8pnWi0moaLwIgTV71yFD/a5lVfDL9RNI3cEGyFxOjyIVMUbmSYqjbtYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1498586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhEGhCRA9TVsSAnZWagAAJNMP/2w+HUcwHKhWwlY8d+7n\nn33nhx5gTRvdwTK6qRYwup0vHeNKxYgYfPAX8Md81xpQMaOtu6G9P9XwvboM\nzXKu8XlByXYmkfw2OsgE4a/gGEzVGf+NZA30uCHM3zqGLPy8h6BxHgwYSN1G\nzjCmDBloDcKtngwayZSmoeuWM7QxHhx/dUa14k4YoKtBdSm3ZXDGqr4wxblY\nNolwlel2/RR4Q/PqddgIYOgyROlJW5sMLNEHl1uue4fYdN/aLsYWsDFVeOA4\namIx+OHSps7xqtfCUWkyBjSWUpRaKPWCHI0ihP2jQMglDkMMQUxV2v1NzFiq\n4SKM6beYVXi4qcV5raTFMeyW34rPmbBjXfBdjaH6laxxSrCYsEfXSaUcfeG7\nPGmie5Qr8AVu3B1Lx1U8Rk0u5T+FU1nqrnLsgEwCMvmkD4Cosmwn/vhZzEL/\n8N1YNYr2h2qHTwxFg9Iu57HNFppGC2rWKrL9XGPQk/ONK5FZC90UiwyA/vV6\nXvALVjWsky5tZ6VkXzoHxsCxSVLzIFX+XS9zjj4NY82WU9qKN+qnRDNUtRAr\nvgxis7dCzW+Nqu0L/SVgJ0DZ9NNVFYG/wSLr1AJY0KZq3qlgDR8sXiRF4ejj\nu8kS49r6cCPF1xUtEWPhqJXhZHIQZBkOsrBug7rSDxpfT74lfN6q1b79Se7o\n1rKu\r\n=8ipT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1ec9d957eefc851a8353ff46d16612ed98261abf","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.23","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.23","@storybook/router":"6.1.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.23","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.23","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.23","@storybook/core-events":"6.1.0-alpha.23","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.23","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.23","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.23"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.23_1602503073090_0.3554599548003019","host":"s3://npm-registry-packages"}},"6.1.0-alpha.24":{"name":"@storybook/ui","version":"6.1.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.24","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9adbf7319744c9aeb7fa848eb51325a15902a546","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.24.tgz","fileCount":248,"integrity":"sha512-soHmd7Anc4xSlh3ZswkEG3Ck6peN+dawlLDmC0xcc1ooeEncdwKfZeu7sGOW+sAGqvc8lhTXsIpU2ORAqlhtPA==","signatures":[{"sig":"MEYCIQCaOkvxSBObbZFvHp+PLP8WwWJ3++Y8E9aCD4vYKOBMywIhAIs2MY5WkRnJ7HHqIPua6Gv/9sQACLrl3/9wq2b/oDyI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1500245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiGHOCRA9TVsSAnZWagAAJj0P/1iYlc4wOVEVZs8uvqui\nm/m8avcf9UZjzqsOjjWSbW1KWnnbvNYYY7hqj3K/lArZsMspf9gnI5OrBJ97\ntFvhM/3TW8Xr1lSePNPj0FGmBzanTvL6fEuTPRlFoC6qmRxDWBDrQuXzWJ+Q\nD61QHYNLIhBBX38x3uhPWDcQwQ14qaYWhWYVZuMGTocFhqgEJ57kVqs1iU38\nNgFcPnE0OIvEWUjyHKKpc+VgTqa1SEr6PdISEq+dJggW2VBeG76VDv+eUKFO\nemhPqsaIuT7UJpRpBxphY11LumBMlqcZTDSwdOEx59N1PkZsIdOMyg4PZgzL\ncXt1c9DInWSBaXv1BE9B88M1Ly93WI0ThzsYYJ0/RIzCJhxaonL1hD5MLhAN\nq4gb9x5rqWWXle9WrhDhltvb69hYiyDKHASMoHQZlkFSpP1GcrJ5GzEqJ2ku\ndZZ5j33BpNX8FXt75F7508DQmnq6TNT6Nzg+nxVgK2KBmxuV87Imm5t0dqVO\n3cabpH/eu02BIUmoN54gv7ABWcZUK/7ernrfnr8TzjSy65ypz+/xKS5F2njs\nF+E0IUC6BCOWjFeWmiRJL5ZY1f5fcHwFyaZi8fAfxsmD3NzrxT28OJr2aquS\nl0lJt4eO418Thi+QlmeqEDx0A99s3cJv0vLO0ZvbV7MeeQ+nEb3apsObQ5qk\nt26L\r\n=2GiN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"da8ff0573a5923d1aa9f861309d0969973cd92b9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.24","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.24","@storybook/router":"6.1.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.24","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.24","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.24","@storybook/core-events":"6.1.0-alpha.24","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.24","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.24","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.24"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.24_1602773454318_0.7233721731042673","host":"s3://npm-registry-packages"}},"6.1.0-alpha.25":{"name":"@storybook/ui","version":"6.1.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.25","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"373f26fe1b83fa44b02b44a0659a1f90974cedd2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.25.tgz","fileCount":248,"integrity":"sha512-3HR60Q40ngHha7uMcNgTbvRIm0Mt/AW8xPy98IZkNKcJVX1EPdS15ijbh4KbGIX2imYH1LxNiiIqL/i6P3PwIw==","signatures":[{"sig":"MEUCIQCzdTCXw7IsBmxfoH3Gvl0BMRSKU76k/WQKHO5wRDgoxAIgUNvtjPu6aOqgjVw0RC304BQGwyFJ/HV7SlR6ECht3uM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1500245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiZvsCRA9TVsSAnZWagAAjvwP+wfv++QdjqB6AVWP4B7W\ndcrb4dMTJhq+boPv2E4gBgM71BduOED51bjKk1iDkEvJbchFannemtgx3QoN\ny8kb/TYqBah/IvGpAR5o8pDD1x1v/TVln0vQSgpfasWEAk6NPs1kVWxVr4Do\nhXCRhMiJrOcQgN3qD0r0Ga+K1VbuetSARWkM3kPEgrqJ6/iVpwnzKj84ALuL\nGQ+bXOw4RS9/CqQ0ODqPCLDg64Q2f9+95N7/m5e/LcjdjsBV2PgaYmbfZzDu\nwTU9Zx/5Mo8r6+/ZOo59uwSta8pY4pL6J2BHpTvWRoVy1cG6lUhxPOPPc6uG\n7MqAblHDKeDDTzUcZni8Ct5PMMmAKuePI/Pf6ol/KoxLfnq+81cxBOuwjXm0\njP+Iuxq5B//GFaTj3pt7N/wf6wZ+b0+InClsJ08Ta0hLg0rwRQLeN5ZmPVrv\nGT4DNISOpaTwnNas3ifgJ6Le2N8anv4AEHnzyvyVunE3Nl0v21U1uimCQetm\n4FYxX/r8soeab6Qr4ImRLzLZJmYqk6Rm/UMKM95zPyOmRMdyBWLgxfZYYsNj\nx3huidQJ+Fz6jAUa7EvVzkIphkLEXFOzdRM1hsDkj9PVi1M74FB2Ht9S8UWp\nj3rGs3ppAxIYbzqPbvD1usn6yBbpulONI4PBiCyNYV8R7DKRF8yS0N8HTWzi\n/pm/\r\n=wG+7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b061cc62a34e2ef348e5f23c71bee02ffdb132e8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.25","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.25","@storybook/router":"6.1.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.25","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.25","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.25","@storybook/core-events":"6.1.0-alpha.25","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.25","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.25","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.25"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.25_1602853868376_0.5756365641017396","host":"s3://npm-registry-packages"}},"6.1.0-alpha.26":{"name":"@storybook/ui","version":"6.1.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.26","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"17d204431709d130cc20107c6df6c497320b16f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.26.tgz","fileCount":248,"integrity":"sha512-F6a+gAGq4xFaFfh4c0AIHaiqoBZvfacL5aSvPuqql8VgS+CUHXx2z+1aMO9WcL6HxKMVfgo8gKK+mv1CfUdhnw==","signatures":[{"sig":"MEQCIAlIuuIYnXc2P+X3MzSdxIoTeaKWAJOrDuBekutGnsrMAiAF7qI8dMcy2KPZQ8AuvX6WyF4HYRIzvlrAqNwPGXh95Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1500245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjBuQCRA9TVsSAnZWagAAQWAQAJ7H5VR1V4ezAmVi9PGn\nA/G2ck2g3mHyiMQDFJ5lH1KKNXCClMxPy8BIOYLTnjSb5FnhbjFe8OXnu7VF\nmc6dlnuHhV63ZVX48xFo9nM9dCvzQXOQrTbuvNt5sKFIWcMYbXghTSXM1YdC\nfhIPdm6mnITUqr5MunXARamg28BWkXIm3waXvTdzpnimB6jSf8ODgtqjvQZS\nqplH0Ade7A89kkEH/mw3NSWxlOR05NGGO7Adgn4Mjm4XBdzV6F184drncGEI\ndja/b3asAbBLjf21F+iOw/Nz9KF7/uC7uyAG8afct8DQI4oFncpctyX0ewiW\ncQ8bU9gsXi35bWVRwJMeacKPbrin/N9mzKM+aWNd4XntGmsOVlqLrrisGhuO\nYstVKJw0uGKpSVPHkaGDKHD5hG+fmvdK8JRLgUvWQNeBkFGuwEGajhMVCpxB\n9NQ3NAvPt7QbOILdxL4t5h+gjygrXnSkf7lWesOQmzUTuNNghRiqOgbRxHCw\nXRRlXkf2OHiz0zcI4VDDW0GSDGCthyPd1bdLtnn1XrfwM8Y5IteBbsYtIQot\nfLOZfpZqnmg6gwrm5bxJBtMZdlYgHNau2qwOunqtCbi97XQkw6ntswxQf8s9\ng/6jPcqrHUaqqdigwzbHDQAlIPWwF6IXpGThZs+NnMRusM/XzzQUJIsuHQoI\nCq3J\r\n=7BEa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4a32476204e68ccba740d584230caaaac51e7762","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.26","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.26","@storybook/router":"6.1.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.26","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.26","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.26","@storybook/core-events":"6.1.0-alpha.26","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.26","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.26","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.26"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.26_1603017616483_0.3640660986291937","host":"s3://npm-registry-packages"}},"6.1.0-alpha.27":{"name":"@storybook/ui","version":"6.1.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.27","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2e15ff601495da43cfc1c4052c39cf5fd616358e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.27.tgz","fileCount":248,"integrity":"sha512-Q54zWPSydognNru+mUpt5aWYB15hWnKap+A8lM2Z46zrM0euNlhlK2348K4przUyhzalfnP6LYWAD/t5N4d6Yg==","signatures":[{"sig":"MEUCIEezuL6r6Xcad0HzriGFG6ntkiFLJNRF8LuX4sKpCmlJAiEAu+ONXdGDLI9OhZhfwgerf2hNnzrIklRy5aTxm3DjljA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1500245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjW8eCRA9TVsSAnZWagAAsUQP/iUKhfGhTq//e+J3rQcL\n14AZQgjAc3nS0jpPBvGlUtT+aNtxbcacsX6wtLYH9zW0lZoAyHooq+ORc2cM\nqCa8W18NdRuZRYn33mOduAPO8x/a2Di9+nauLopWqBU5F9LYoxdEIF9XHDRj\nDIg4n6z0Otdr0Ei9t1GhvdcdFRz2C5xbFi7DXl1p3WR0jQBILawM/7uU0LVB\nBfJRR4yWsfCvvwqR58zNqSPxojjorvUBDKDW6iWXVbsuCVT/yyqos9jW+Iz8\nqTj5sDrbz8Tyuly3Hw7y5Ny5eupUJr326bbG5NCImlxqeyTC7kQBISs4TLU1\nVPtOJJvzGKcITzTnraLS3LdGZUr0NNcs65Yoy838BvnmqjB2fMCn5327+Sdi\n46ENi6cOUj20whl6OCxTYSJ4W7/qvmXoRrLvQHSx4nX5PMAvDmSLtFvh1/vw\nbM+ywpQKyg3dTyDSxyPwgD1PoVlo2egfU9BL+07rMEYjdh3xai3DWKRXRS09\n0nKz3RSN7PONrrWFb/z52urdgC/L6nddoB/NB4zxX0lWAZyw9ogyJQy6iR+w\ngwztm/hhj0ZScosqMtqDHorQZGmr4lDqGHWRasKIAAafjeARMOnrEPxvZtAE\nc5oj9f+duA/Qp840ExjYWRb0T8qpmnYhzpM5G/g3wjd7G+qesx87biT8sgOu\neVIG\r\n=Ecbx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0bbd3237844572f749beb5ed845be83ccbbea85a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.27","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.27","@storybook/router":"6.1.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.27","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.27","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.27","@storybook/core-events":"6.1.0-alpha.27","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.27"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.27","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.27","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.27"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.27_1603104541713_0.42877813319499114","host":"s3://npm-registry-packages"}},"6.1.0-alpha.28":{"name":"@storybook/ui","version":"6.1.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.28","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"46ea8983e360a7d446765f725d744fa5ea1fe1f4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.28.tgz","fileCount":248,"integrity":"sha512-1vOvUbJyBUHXOzCXhSzbbMHd5GBzLKRD+1X3YTCndfSUlCiZXoY8/78CyDOXPYZua+azm+dmi4pEtSX/o5R5mw==","signatures":[{"sig":"MEYCIQD1N8Gh6ev0sbpCAbRkqExmGqGZoudU7rcxrZ4PnG/0SQIhALE4sv4zROGrseIV3F/9yCp/KjPm1aKSiJumVHJA50oc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1512009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkodSCRA9TVsSAnZWagAAr5EQAIJXx+zPhktIKH6PBBLk\n+6gA1LMe11iz0fRTyZ7Atld0pAjHyh9WcxfnvYhReKU96iw37/7UO5S8IofY\n7BFQcBKHMAI63uTelPYlJIFjMCbzz+QGMOVKOJsUcapG67t2FPUpHs4EFviT\nhBrjdJ6aWEtz/bQHl+BiITZW8wmg8s0WHqlAkRoJAspUJhkHStvv5JqC5Vn7\nEWoEf9Pkpdfu8OjvX1ihYqXrEg8zXOKyDC/dw16jAm0EM87FY4SiWXChVSg2\nzV2LGrOw5ZjxGFj23UN1CgyXfVH5az5wX0zNw1XgcZEFfuv2k8XZg9bCxvnx\n2fU6YQPxaR1zcgXTP4BkzrEOMfrKW2IYw5QwNg0gIzlIPxuVTQWLuyrl94R1\nCHYBBSZLScKr961HKICb4lCb17cWWNMRTHswwAdAGHydF00l8oMKBxPZCVDE\nUx59FgOwNtVl0TXd4/Y0sCRqOQPJ5scCAXClZ39z6Lp5YOeka12pc1+iHMj5\n+IDJHRHzDOFE5dVZAcRwKlhnJA0OWmPQpYC5YIZ7un2uyt7+lLO3RmMnKESK\nrqVe1weRxtjyNyOaSjm5phGfxFHQFz6jMqKmT1bWkrf7a7slVqqZgvG03OnD\nvYEffscee7/tF2HhQAUhZ0DyJGI7OSZRuXPxS2lf7xpDb3gZesCbGbNgtniN\nQWdr\r\n=UOYu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9f44d66ee89c9d9b1ec33afd42866673344078be","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.28","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.28","@storybook/router":"6.1.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.28","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.28","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.28","@storybook/core-events":"6.1.0-alpha.28","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.28","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.28","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.28"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.28_1603438417648_0.07680055670661945","host":"s3://npm-registry-packages"}},"6.0.27":{"name":"@storybook/ui","version":"6.0.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.27","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ae3321de6714bfba1913c8edc1a9338d8e301d38","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.27.tgz","fileCount":224,"integrity":"sha512-hxTeoe3QTSJ4P9EI8Kc8hroxem5OXEYq77zKq8XxgtOKhVzhQVaA+c4p/t6Z68+yK693CCp07+6QvGo++EQEHw==","signatures":[{"sig":"MEUCIQDfWAvyfeBzf6vBeEFWxW0N1XgJu9DB3/bQDYRcWzmYjwIgYaIjJzM2NsTsCatPsSduB9h+4iX9C7OCu92t1RUGgB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkq6vCRA9TVsSAnZWagAAVVIP/1umLEmh9CaXhFa0gG08\n7PEAnxajNfCYUjpfy0amt3310FfYizbnu1rutO4n5M/ZozSbSlrpQNcSGyxA\nsgIHGV/SX0B2LwZboHcNAxsKPor7/P8vLL/a4AkaOtRI1GzCWEzDC3YBGSSG\nvaKkPPlxRKZ3Hi0ObXTIJ4RyzqVj/tYOQI1eNrZeZwVyRuyXqz1ZjDdwGQwI\njJJZoLLdb5Dw62YZAtf+8khLz74lQtWg7nowMg48t4YiXwwXkQoL2JMy3jrJ\ntRDzhjmfRiB/MdyvQvghWxdTzjUtVowTinJAAGLcPjo+bhjlmAHINBR8ZfD+\nz7lcqeELmfTlORrvko/fGN8xFlLNuUg2j2MCkKl8j/CDVX6OLww+8e+iSeL5\nr5HFxSiTUKxORkZGyELvhs9A98qWuaeNIeRHxAHG5UcJliCJTt7lj63dVEZE\ndzSTRvzxXVk2N5dXP12Qfy9Behx91qAZ2Z1CPwOy0Z7QEtfm5w4EX7Bkcbp4\nMHjkJN+3+3BvIfnbd5d/IkuyLwhA6E2okKCI205wOMBHNHr7YVGayBArcCp7\nHSlc8dQBdEiEEMpON1BLdBUY9HyGTJpU7byHCc4xEzM5BA0b8WCcSUEJV9WG\nyKJOIjrESEAdeS2gaFUWZQPj0YRiVauGPtC4pmZXh7Sn+S2NAmuGTE/tKbGC\nVN4C\r\n=CqDs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"1aa25de4b1a9eb5570f3e4814780378810b6ca04","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.27","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.27","@storybook/router":"6.0.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.27","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.27","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.27","@storybook/core-events":"6.0.27","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.27"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.27","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.27","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.27"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.27_1603448495161_0.9199007813099056","host":"s3://npm-registry-packages"}},"6.1.0-alpha.29":{"name":"@storybook/ui","version":"6.1.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.29","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4ce8a6d866c6bf0d9bff77ec24cf70a17ee8f36d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.29.tgz","fileCount":248,"integrity":"sha512-dnjzYqJlW6D0lH9WPoVifn8KyB8ognjrF0i5Aw201OLu0qYi0F+J6zp+1j9OP8hzDxmsBmwqXLuntt0YdFxGfw==","signatures":[{"sig":"MEUCIQC9UJlnndO/g4+1FtpWQrYmdrG3N2a92bl3/CbfzF07+wIgLk0owNabt9r8l8HFKUu194KrIlAU8AyZv9bzsquoRN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1512009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkrQdCRA9TVsSAnZWagAA3H0P/3Y1JVvSA2Cit8KRgQlv\nE5J+mjpHnvTHOUuX8YSjZYTBBOaIXWb6/k8mFjHAUJWFH1mjfWQNC5pBkgUG\nGnYKULTueSsnuIhIKrKv6Ilx6pL+FgQr7BiR90cnh8gc+HtQYURU+F2bTOLZ\n5pKvSDyQTHlxIcU6qsQGryD5lBWJKZuxgC6/0Dvn4Fqmbe2J7LGDzZxJhyDQ\nH8Au8XEEdCtcPREcYr4UQLU/01tVyFlBgh68Wi1+0PiW+CdQo4qlh9cPxiwO\ntgg1riA/ZptZnGVzZ29L0vXYzEHooc0gZELgz681AVsTBgTGBsaF/oX5IQhq\nPF01aZI8Al3Fcdc0mO/i+6oA8bFmrgs9KNBQfWn8HrEot32u9ILJvX7yh5kn\nqIOLZklqSIXGXzEd4O81IfncP2+J6cokY8G0fDKxStNKiNrLVbOwVKxBISVP\nZqtit2PyMKI7Nc2iajRrkImTYuY+Rryl8uXtcUkF+Z319TLd2F8fYA0WkGo1\npcaf9P38lJcDxL1dg2GapK3sZg3p+AHDpnHpfwv4tmK/4J2N6FYH3Tu3Mrtr\n1ysFlQslTlZlHAbTYzkQdcZaOCfjVPumwo0eD3FX4+seBRXrUsNLE7kNBU1A\nkhxcyBvkR//2Vy9g9D4LZyCdJ59lGeeXAyDDr4KAFdyebfSFNZ9HxKmbq12E\nU6Aq\r\n=C10f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c4c9f9bf50f9280bcaba9825156a43372350cdb9","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.29","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.29","@storybook/router":"6.1.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.29","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.29","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.29","@storybook/core-events":"6.1.0-alpha.29","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.11.5","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.29","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.29","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.29"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.29_1603449884614_0.5486880740006308","host":"s3://npm-registry-packages"}},"6.1.0-alpha.30":{"name":"@storybook/ui","version":"6.1.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.30","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3f4befee026684dbdc02f9cfca393af15d22625f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.30.tgz","fileCount":248,"integrity":"sha512-lMDSe8Bf0IbK9UbfQbgg0mAeaoMejaaGngvQuNJmT3SQFf0iDf6wUSz+K3V1lc8fWzUiRdbmSwfrh1UFJDe8XA==","signatures":[{"sig":"MEQCIGYdDU4VHNS+2ffm2oqaIAZjtn3FUiftWmu46JM0dvDYAiAoWt14INwTG323c0RyTJAb3JJWG6FY5ckhcuZr45oNJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1512020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflu5JCRA9TVsSAnZWagAAqfoP/RNEN6FEw7q8G2pvj3uN\nSXaopxjFTU4/ozfxZOUS37FTrPlW7R/Dhx75cxuITPPRcpvVBW7UjjwZxuQq\nMOvlt3AZ+GDlEjdd6NTE/zwOgbBgyh7vu+4q9vdQQCac9ZxP+CkRPuqDZmpC\nLNmwWUP+OQQa+aakR+1tQktK96JaqoKmsPmNRHlg6eOEsgy0BlAYUVNjSGN9\ncl6XJRou8INai67NW9+iQu8YQsUexGzOZ/XJ70Y7rK0oh5hbt30zcxnK0j9f\n+/oJXDZr++niwY5fKT98szo9ybSIG/PTham9YAApwVVv2l8lTc5TZYLKr4EI\nDDROOLuUgy7wEHv8vGr8rl9OuBeRI7pBfLXC2lbEJ14wikuHwrp5x+KRiNit\nphuJCnHKyxCk7NsndyyVEE2Z09WgKuiXz9fmbcGz40n2lHnSlbiQtrGZ/dd2\n/one4RfNdlf61w0BrG4RAXYGj1r4AUCX223+6ZbcSePmh2ZrSChqHQdboP4Z\n0nchTBlJZH0AXRMwHfNvMOK0sYNgVc9uw3rO5jNHsLufxqoiGiUS+tYsrC9u\neyiS4ZIaG/7OobP6fljTt8ba1rEYt/NkTQYELdoO7qirQok7f7N6zg6CdQxH\nDh4ulLZw/6hs0+Dnbbcbaxqdw1f4EMNUb4gfuaXus0A5Z9Expz+jlYBrvYFi\nGup9\r\n=ao3H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f883f080f23e6cd3900bc3de7950180ee5e8b226","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.30","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.30","@storybook/router":"6.1.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.30","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.30","regenerator-runtime":"^0.13.3","@storybook/components":"6.1.0-alpha.30","@storybook/core-events":"6.1.0-alpha.30","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.30","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.30","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.30"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.30_1603726920708_0.8551832671716069","host":"s3://npm-registry-packages"}},"6.1.0-alpha.31":{"name":"@storybook/ui","version":"6.1.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.31","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2d7262e3f5b8f85791cf8a7a3fd123895274ca53","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.31.tgz","fileCount":248,"integrity":"sha512-TTfjBjCxRjlxUOdfkfbKGmqb6E55vgqWaB6KspBBTZBX4Y6nI3TYlBSq5rZOfyA9oYvQpcYUwxZTEoMkjxzI9A==","signatures":[{"sig":"MEYCIQD5HSzl4txCr7mFXLSc7LnFHdfPWE9knMgusrym+5g4zgIhAO46hcWhYcYhlDGNnZK1m4R/mkJiSPmOI59jsOPtZm1P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1513178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmAH3CRA9TVsSAnZWagAAH6MP/1vBew3wXzgfwEsNXoSf\nOTN9jestAERWxAFOIPB4l7JybPBccxee+VgjYkSnlsEP0NhJSjLEDtTIJ7qV\nWLX7lmpARhgH25umKYr3o0x5zFkBfVJEKHfSRwJZKNvLLmVWl3G718QS1Z4e\n2MGknHnkwYglSygQS9gX2uzDcc/HhdqUixDeFlSTNk66HlTf57HlOY8/4cXB\nP9W4YHR+OaaNAp51l6beRnDWa9Lvil9lbUAj77v/yZYgj7bzkIK6xYzBTbjj\nZTkVrzCLZu67NhIpshY1bwQHpZ7k08KVx7c9FlTOYaaHFndCp3j0AYjDOJgo\nSvuAkvLLWLR7je1KNEdCGqeVE7Kcu/9+Gt6e0SaRHMLRoWxTyB2nENxksgbR\nC0JKc6suBMM0522mcxHRGTQwzGjOcIGO6XKY2MmKi7EfwVyw/GEwen1mW0lQ\nq+jDfR1VvkwHu21aPCpeQhFYOEQdF4+sZDyy+pbGFBRcuTRXovX141ROvGii\n5QBTu57UuiESoC7UgaSwhjiftKDDsIec2+i94qmTz5JnBq5OSRlmghJxFqys\ni08E//UoNod+THCzZvHzUl9Z/Wo+bjKF/G+ca5lZO0ECa/qeApn7Ih7az+Jk\n+g+Np3sXoHW0+2OVgzJzfI5Z6eANByxOM1px+ZTE1hVlQmTUjJj72ZMTfauA\nsN+2\r\n=D3NK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"f45b4c6fedf0994f7950ee1661592060894d7272","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.31","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.31","@storybook/router":"6.1.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.31","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-alpha.31","@storybook/core-events":"6.1.0-alpha.31","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.31","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.31","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.31"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.31_1603797494412_0.3836955998666196","host":"s3://npm-registry-packages"}},"6.0.28-alpha.0":{"name":"@storybook/ui","version":"6.0.28-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.28-alpha.0","maintainers":[{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"79001d81cdd46c6d65ab13fc8ee4e208f4e7adf0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.28-alpha.0.tgz","fileCount":224,"integrity":"sha512-Ac1MvOKF1CN0pu4w67ZWRAni0SnRpJ9nQcnFnHVX+lxZ8F3qx+k8NRxQiXw9Rh38YWr5VN80LHFD1S8luqws4g==","signatures":[{"sig":"MEQCIF5mxBY7zlwm2KZVsWTV6zeYnyYO5HVyxPD2tWfER60RAiAI/NPWsV9pi686K6WGClVmqYsSGTMziqOcWMDCl4qLZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmMVGCRA9TVsSAnZWagAAnB4P/i1xHo5eTmJfoBDZCGLI\nX9DIL9QaNUgw54tOsP5A8RBW6baboVhbomztzLt2lDxCamN39E9GspOImOJ1\ncvLOlG7TugaxWSzKoquTBBUcmOBmoa9dnjoEh7/FpaQPPQx6x7PnPYu7iyK+\n6pnOk52bmyolyn2FVf6B5cE0flNSBaDKxpfs/e5uAfLqYwQB9/S2NtKk3ahB\nxDbHJrI7DG6hIo0Fvn+5dzdsIo8qfCAlzc5P7nrNzQt3cPWFGA+py1Hohl4E\nSip8trV0qswhcEmwU//jEmVSH3MkAtynfY2capvdxWepyXVJv1RZ1vAPzvT0\n6DK1UZKmTYyFk7R3Mxl+zUiEePzGPdIO4MZ0cjf7soduEXXu8K5KkHn20Upo\nNH4y5wF4JO8+dhhSy0qgktk9GmKxQFeORD55ilHBvZTscl39WdLbU2rhq0ko\nKonRQ1ApkTSdap3Etq3GQad0JYLvgDHkuPGEj0tzPlifXv1A4M4kdo1gDxO4\nbuDryclMwkAbaehfRub0sMo9UsbpO+HKNpHhiOCPNDaDfvp0dpcd0oWz9dov\nm6XeqVMKp0Plwt2TlI+xT5o+pcFgcCkTn/eDMfG4DlsiJrSwFfbAfOqJZS8P\nyYV+JM7LFYDlaSjAnn616mFylk+nT1UjY5xQWajM9Z9NWzOTsyp6LsQaaAHj\neSyF\r\n=maWJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"3a6f8edce0f774ec5030eb006aa4f70af71a557a","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.28-alpha.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.28-alpha.0","@storybook/router":"6.0.28-alpha.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.28-alpha.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.28-alpha.0","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.28-alpha.0","@storybook/core-events":"6.0.28-alpha.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.28-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.28-alpha.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.28-alpha.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.28-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.28-alpha.0_1603847493891_0.18571927839872693","host":"s3://npm-registry-packages"}},"6.0.28-alpha.1":{"name":"@storybook/ui","version":"6.0.28-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.28-alpha.1","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b04752c8b077949ef18909f8357a2bf698dc0058","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.28-alpha.1.tgz","fileCount":224,"integrity":"sha512-DtQPhGWFWaIh4ulqKIjItSYJx6EedAQ5lgkR3ICy8oVunRKZgket4SJvJd/212CNdgMii7BwjQOy7pDkPbhupg==","signatures":[{"sig":"MEUCIGFSvsJWZ6br6kqEsYGtRx7o6b+1OC+HP9kzZRTWxx3/AiEAjTx8YcYNnLdO8rukobOBgZS4In1vjMrioRz3Ee9pb2I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmhyaCRA9TVsSAnZWagAAReMP/j5v1hzeXSbomombeiUA\nqsjxzC4rNu9PELdW3ZZcWQJlEEz7Gy6mFmarbrj24f0MFLzJc4CFGj+Cl+uB\nu4BFLb0qYkHAF5fdRxFl8grg5aEm8Jb5Ccs74jckmZWkYD8LiLbk8XaM5KSQ\nLZKDsKoau/Zh5b9Ub+CX8PqDK8HeoEz62/Vb8xjceo841bdSgRpDmPEoWsp9\nWHxEZz09cm1gP2RsnOH5R1lNDc2UnvMv9+7GtXa6KivVnEcdB6C9iLusO9/i\nQSwbiwprGmutVBWGAlrgLiQ4aiK+HHt6Dj3wZR6Gk/fHJX5XTOxDfa+kdKwZ\nurm5ht3B/N8N0Iv/yL4XDZ8kX/57DTKgGTUzyuJWM+CbpE9aF/fk62fKD7ev\nhDKWtht37EUqH+Nhg7AFIFYGe+OFQ8kAreWIDNkSZvrDnknNEcYo8FkKH2pr\nSx2iRo63nVB4cbnf+HyKU4f1tsNm7BjE/pFo8NYEuU9bs9OoptbHh2trLPon\ntVuHQkmQoSJmjZ248JbAf1f0q+w77gSX5+JxNq5Pxplktaz10MuzlWtWEMOy\ncs75HZLo9xyPAzMHO7fakfMsg9WiQqp/cT2L0i1VsdjPK3KSc59+x1/NXjl3\nsXed5utY+7VYSlqiOhFMggeoyXzQ4XddtkSR3BMkp1GcZRsqZq8dZZleu19b\ngfLC\r\n=bUpM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d20615d3537287949de70c847c63510e91f5263c","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.28-alpha.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.28-alpha.1","@storybook/router":"6.0.28-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.28-alpha.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.28-alpha.1","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.28-alpha.1","@storybook/core-events":"6.0.28-alpha.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.28-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.28-alpha.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.28-alpha.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.28-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.28-alpha.1_1603935386467_0.4548710822804889","host":"s3://npm-registry-packages"}},"6.0.28-alpha.2":{"name":"@storybook/ui","version":"6.0.28-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.28-alpha.2","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f4ca38dbf4edb31e6eee0676be5f2ea441655098","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.28-alpha.2.tgz","fileCount":224,"integrity":"sha512-tIvkcvkHFc1upQ3q/JgDj7F5akiZ/ONAt2iqI+Au9iZ93BP+4tfXxKRNoC8zjsyMHI+lGbjRksu+vd9hWu8M1w==","signatures":[{"sig":"MEUCIArEae85Wc17LvP4ZESFYPHJVdIZoGs8i7ZTQEOWznS9AiEA5dW2OG7vpeRcBijGM+qaglo91B6wNFAQZ+M6xKIF9RM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmiG2CRA9TVsSAnZWagAA0QwQAIVPO1l3XQKV86VhjjB8\nY8HPQ57xx0fVmywUBjL0T++yU3qVyPZaBO1COk876x+oVXaNP8FsThOet86R\niCLkd+VMOeYuoaVs+2U1dpNqNRYgYLXlczOvOdsz9UPaDYnkz+YtyEKfgMmd\ny7cVXXVj/BJhMGWWpF8EFIDgzDDjNFSmqq4VP62C99pjRs/AQlPi/3TkcA1s\nHLH5vROPdjkz3Etsjq3uZpTIU2JHbOyGKDN+KCxHAeRHfw3neTKypLBPmDTW\nP8QNZAvgpPVIw+KarIS2wlz/zAlY1YKs4U7N0vuRDaG+nLoDxbqo5Lf5rHay\nY21BYUTgrwM0A9kImtU1kj6lfYcmR08XE9cUZFihoMsI0qwy0JKktQgzCyo0\n75l9nKJ792jLtNaGK3iWr3wNQyO6itEjQdsXQrK5aeGqLqCwVWAI7JHutD5F\nc76IWrgFM+WD320WThg2SG/RqgVoyhfpKe1ykkdgXjq7t0+7coY3YZjzygyk\nUtSJ+KksfR2YxP9PKIHmwXOPNLK7Pd/kEcjKnjdSquu4qC0hO51wq6TIzBdz\nLFKHy9DXY5oH3gAm28lZrHacnBCzATE6Xho7HAHnZCuflbz0CnlHdqIVVMc1\n4AZ9SA+w/CcLhRRge68XQzz2CqRpZAod6iZDPEq5s6T18EFLa7JEc3aPwH9j\nICwZ\r\n=yI9t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8fff3dcec793b8b6b998416d48bd3b075ad44527","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.28-alpha.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.28-alpha.2","@storybook/router":"6.0.28-alpha.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.28-alpha.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.28-alpha.2","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.28-alpha.2","@storybook/core-events":"6.0.28-alpha.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.28-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.28-alpha.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.28-alpha.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.28-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.28-alpha.2_1603936693902_0.39396522334101536","host":"s3://npm-registry-packages"}},"6.0.28-alpha.3":{"name":"@storybook/ui","version":"6.0.28-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.28-alpha.3","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"de6de844dab0b79fa259a988c55f1468b32736df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.28-alpha.3.tgz","fileCount":224,"integrity":"sha512-VjHhhRW2BhtV6G6/Hpph6MmpqKCVazeGwhg+Hg27WLQ5dbWuLXZr3lW5+UHbDJcmJ+6SZD3hDNr/ugBJ9aCnZQ==","signatures":[{"sig":"MEUCIQDJTTiWElx0JZE6OmrrJMKXQ19AoOXDPKcWpfBL5WE6/wIgPJNpbLLh9hbovhjpqbxEsOQBR0okaPSMhkQoHRlfrrg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmikTCRA9TVsSAnZWagAAsfoQAI5+xxnaf+KklRlEMrLh\nEPSEqQOcDisXEBY+gkLgM7rdtwoILN8m2GSYokdiCRUxMqXz5H6SkfFmUQRw\n3fS5x6dawWgOjARrnItf39zR4GhH4zKukhaFxAMKzKJH+ISiOXAPRd1FrXwn\nUrnETagmTI5tbeZ9T4ZS1Xkt/FHcquGW0HLZ6RvXJsZaPpMNuQR8M2rCPGfc\n0S8Jws+xoc5TV3oXI38Q2pkKnjjQrt/dE0UgFVJO3+/5Ua9Ksl2kkjFdS7ES\nkG6OYarssIVOvuML6LUhaNXoFWKElHVt+uPB4vXbk95TPLpadj/4gArt/0qk\nhqynHQC98NZnp5LG91sujJPqdwPUdDp9kwACIIRRb13gl3E1lj0P2Y66ETqE\n08U44EMrSI/5n5/iaO5HwLPmUJzfnXxEQE+9TrVnbzS39yjeo4c+NNDHhrqg\n4jb2JWSIMiigUzBVm59l4ZWRsd7Nt8H49CBuHLebsPQ7cBNtZE3dLfR5yDal\n9ggz/T0YFlZNaUkDqXUwAFLWpL8z3Mvg/35tcHQLKZ3Y+N7vy4sX4auoMM3p\ntkgNryyBtiMOscRQz3Pg9MT/pHLI3+WroNecD/orpFHRxsmfESLBZqFdv3N+\nQOUDgjRkOL1miY5W5Qazxou/q/NmLI6irb/fQcIh9GymboTECQ8icfkj+UBP\n98KN\r\n=esgS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b0d900146b8146ecb446d29083f95cf2a37a445b","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.28-alpha.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.28-alpha.3","@storybook/router":"6.0.28-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.28-alpha.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.28-alpha.3","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.28-alpha.3","@storybook/core-events":"6.0.28-alpha.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.28-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.28-alpha.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.28-alpha.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.28-alpha.3"},"peerDependencies":{"react":"^16.8.3 || ^17.0.0","react-dom":"^16.8.3 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.28-alpha.3_1603938578804_0.32645637187555065","host":"s3://npm-registry-packages"}},"6.1.0-alpha.32":{"name":"@storybook/ui","version":"6.1.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.32","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2234666f19e49b1b6a27f196fddf1ed3d2a3f2d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.32.tgz","fileCount":248,"integrity":"sha512-tMdy0dACKrITEnPwVmNIOID1gG3vVGdqedN7yBPnJr9qsLQZ3sLqjLoG37cXxj8AQjpxE/6WFHDNGykgHBT/kA==","signatures":[{"sig":"MEUCIGm5EgtARiI98gd9mNdNfoIJ39uyBIHKrmcyV86LLlqwAiEAx80fPqGLUZj2Z7/4dKLFAsu3vKgip+8wt7MPldgMCa0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1513178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm5PxCRA9TVsSAnZWagAAcjgP/05+YPUkweJ3Htn1LD/Q\nxvnMyvYmBzRrQj0TOiQez7czAvhxHF0qaQq5zIeyMfQNMwdykgmH7ojGwz6r\nxuj/O9JdzTwhPHZGk8fMzFoH3VgDoTx3mH542fzDi32QW2g5myk3BVBqHUB/\n23dN9a22GC84tZlZIstGta0tdWii42VAYm02excNGx4uoT1PSukO0rsooG7l\nwEjz9PpGwWAU6OJqp2F+6IQXeD9ixQqiObOuTwTuaJ9jtfyRvlrUKiOv9qgW\nFbBd3P+7WAv1UxWwBpGJbakGgFPSjPIe/FrzvnVI8biOOQ8sHcEypkPyssQa\nofWTByor96iJ00s4KMe65VbmSMrwlH9x2jNFzjPYNeNI1sdOWUl9e8Hv9YUy\nibLfxZfdgr/7VtnrU4m5FNLW1vOHo0IKJ+tL8IqUcCrP3xoTkWJJt95YhLfa\nHJ3RW5eQF/4rzxNcwCvcOJgBjJuDdfCaZJMyHO6+WybjB3JgsdskiBZfIopn\niENVrweBKCKMXR+5CYwibP3ZqKO8LPwWglPEwsWltUfnHkymQ+Lm0wGwWxPQ\nSRjcOcxS3WbE36k1x0t5MjnYR+fW9CyY7LHleqwJP6bwW+kVyfnfdo36bmwP\nWB4rrTLAVt4/tdsXCvqOU6TM526NYOovJy8hLNXenMLzwEr+ualiW8+L4UYt\nN35q\r\n=f+OA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1ee337594e1da7751c34fce9131c357f4b4e4aa8","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.32","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.32","@storybook/router":"6.1.0-alpha.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.32","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.32","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-alpha.32","@storybook/core-events":"6.1.0-alpha.32","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.32"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.32","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.32","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.32"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.32_1604031472643_0.21948973110101666","host":"s3://npm-registry-packages"}},"6.0.28":{"name":"@storybook/ui","version":"6.0.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.0.28","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9b07d11c648b26d9fe20db0436bfbb65634a1930","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.0.28.tgz","fileCount":224,"integrity":"sha512-LGYW+hGiRu+5QRrZXamEt7aoHWQMfYWAaSO8hJldD5lfIXUXcoWUm0Mx7CRpUhw22LzmidrwZijyxlTnuTRZyw==","signatures":[{"sig":"MEUCIQDSf3qbTHpLRsHbq1fW5VRwE9xaEROpYB4yfj+hV7N52AIgTqvRs4MxLH2Z29gK0yYhd/ZuzliVtPHtoEOTqo6yH5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm/VmCRA9TVsSAnZWagAADTAP/3FJbwPGlZP6EdSglVVK\nK95sD0tJ+KeRhfRdAt0TZ3gWhZWxGR0MM1AcXgFWlcMdpFGRcYSxAF+VQpJE\nhzBUfD4196sqVYg1dyLrbgGRKs035nRjmv/9tj3Y5mWtwZoXylJ7R10E3rbM\nDv8E4aV2c2sGm9B25iflupweEIjqGZ3a5fLyD9bGzT3kpIoSRFgC9becpAl2\n8QkyPAdS5I5fycGzilClntKGzbkaulsfTVMKJD+cP0IWJ8nfIxyb0TwscLSQ\nH2VXQwKo+SzmsMKQ5We/hZy3Y5SIvsKzE8rB59+7z6IPwtBT5NdAyRcIks4U\nyBrUyQfCMa0SOeR1pYu9iI2lMPIzKNaHkzKovV+v7jpbMw8+X/VceUWkTmvc\nklha9zGj04JnuMtRHNLeRn9qGhG0/RjcfTMd/ZsR66eVIF93f8J0OxwDnUZx\n4QkBdaehOS1rp+WwNp59LIDbJSaySGzeB9oaDLkKFKsQy9NWDFsy4xdURMMf\n4tKoeuLAdrQwzEYCNbV8NZpcsZ2sRuF8X0N1/ebetLev6smVHs0s7cCRcjoz\nedCrxEAVGipLcw+USWFUooTlJntAv3X8m3hJ0u95WxIjYREYbTtKWFohqaGn\nYXNnlYU4eTC0u0u8DJsYTBY5ZlZX82vpqjoDu/6mMTBqwqYtJYLzMz26NQcM\nFClc\r\n=U7wM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8c2fb30856de06a7076960cd1421a859923d92d3","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","react-dom":"^16.8.3","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.0.28","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.0.28","@storybook/router":"6.0.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.0.28","react-helmet-async":"^1.0.2","@storybook/channels":"6.0.28","regenerator-runtime":"^0.13.3","@storybook/components":"6.0.28","@storybook/core-events":"6.0.28","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.0.28"},"publishConfig":{"access":"public"},"typesVersions":{"<=3.5":{"*":["ts3.5/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.9.6","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.0.28","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.0.28","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.0.28"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.0.28_1604056421953_0.3155848821809448","host":"s3://npm-registry-packages"}},"6.1.0-alpha.33":{"name":"@storybook/ui","version":"6.1.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.33","maintainers":[{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"172a76c79af5b67032ac26fb921dd7bb8f508f60","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.33.tgz","fileCount":248,"integrity":"sha512-o1YuxNUsUiL2sCF2pHMPXymG7YfBUxuJynFKWYp5makBLxspFCKFbo3s1pJtGlqLKo/C05s7tvK7uqzSkmJUkg==","signatures":[{"sig":"MEYCIQCctsUsCXiFx39nqWWPF2tqfcKcEMko6hz+GCB53S3ofAIhAN2VCvKkK4QdelzBrpmjE5Ma0c+CVP/BbNjD8Ow/WXK0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnDaxCRA9TVsSAnZWagAAhGQQAICQr/YQki1sZ41bLVhF\nf6pMVTaDbWK3/alqngsmheqcHxFAtIkRErFDyNr6/FRF4p8MIMaDaVCjuAMG\nWJXamBk0kFHcn+f1I4fEj235WG3m+dMo4HbV34ssRV+j7Hxd74NU/J4aY5P+\nF6Pgwry/G0R34Cbuschdju1gZCtZZYb6dncFOEWeNkjXpgvWWSzmqh3aQsZ0\nb5n8M6YVR2TuncQpXTJ76GCrSNOpL2uomRaTrBzVwRx759wmXIc0JlsYWKNU\n3P7m9ztBcz66cRgQdgpW54ggaOUYL+3y2ygV/7iMJIPNdDAOQNu5j2INPnza\n5tQKniUt3eFGRHqDOBCrT9i1nSsqsMI5LvUNojOjnEhn/AQz8fiw+qb3dg71\n3suVxfcWESWYNTZd08VwI6uwd1mg/JhJM6C2GeWiVJtEz5uARC4CglvUkgDR\nJc8gv1J43VPMsnAWlKxJDpWQwIjmvVtduPEdF1x/1Lk4UARUDNBE6sSYDUTk\naZ/sMaOr8n3JZsNYykipH0ns60fVLcq2j5t42MGcJk04XwaEpsI4tHE47kXM\n4V6PG7+AVT9awSSD6ClMPyvAXyl5sd92wD6P++sgns2yDsh85SwSMGlZrWaJ\nvAv3HCVD58W9Ts9L6VL5U9ufO2U2fQRTfiErdTVREwlF1F0SvEr2pfq7a7OK\nkpSY\r\n=a+lS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a5ee924e01e4e5c9d0170e2a70f8fc8a5825cfbb","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.33","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.33","@storybook/router":"6.1.0-alpha.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.33","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.33","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-alpha.33","@storybook/core-events":"6.1.0-alpha.33","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.33","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.33","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.33"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.33_1604073137010_0.46259995669743104","host":"s3://npm-registry-packages"}},"6.1.0-alpha.34":{"name":"@storybook/ui","version":"6.1.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.34","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"acb6cc2afecdc408a6982967fa31b090b91000dc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.34.tgz","fileCount":248,"integrity":"sha512-ke7fKvX+/2xNEH2nwvaKtY4U8SwCuC2cD4yJBo24Nu/ynqhXR3sVdFxdy3gCsJst33E5j2Y7irDEHEPwi3+Xtw==","signatures":[{"sig":"MEQCIHDStzcTKycU8oHazmTgdLky0CaYd7s10gw7+bzeh4WQAiBW84sMaLXtx+UZBCSrOtXyQ9l4rk1e+iAvG3KgJK+yAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnmBrCRA9TVsSAnZWagAAkI0P/3E6geG8jmPIn3cVAI4v\nH+5xsFMh8eM42agEQZwSuSaK8yqV70sbZnkxxmhlxDDV2nmNcwqp1y5oi2CK\nQjTy3TGPZHRLTrjzc0bzhNuJCCdIsHuRt9Y0Ld68ABMrkG0dtdWrq0/PZSFr\nEJbYHsfjBjajVTsEuqFcjWKDIIAJUxcGjTFCq7ER18xiqPwZ3U2m01fnuA5s\nYVB1ozN8twkUvZnDss038jEY2SgCCynwJGjhs/bSs/8E4wZ8DOIrxCoti7kE\nL6anNwcYzs+4cxlNILrQBckkNfXpM9C/y7kwC6pJnDrK5Q6boDtBaV91UEyr\nueN61WViQyUzLIQVbz0HMuXPrp9nmT16IUmazMcU8rTerGWcokWzSrz9aRBP\nA3u/dR9Mta6BSllXKVlNAoabBgHWbd4k7uO3ZRSM3wIdm2yVQgc7MS/fZRZ6\ny5BHFuowUEylb0i0s98PfdPC9Vfx9ZZvVjgSECn9Mr/XJs6S0YjSUMDySOtN\nSuJzDbf97qdJmmNaHE0fBcOkA2C1TBGLu/OujO7s/m/8bdfThoUcUiJJ7ZqD\nMB8GGXNbPgd3GthtIGazixdd2I7OfN78f2xNOzRPCMowTchxtTFWnOD7YYUI\ntyoImyuPL28davM/aWTeLioWrEm37AZLZEWDaAp/OwKOOeGQC7yz/mUeyuWV\nDb+R\r\n=s6+N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4a4c98997fe9b0f791f30fd168d867423ffcf730","scripts":{"prepare":"node ../../scripts/prepare.js","createDlls":"node -r esm ./scripts/createDlls.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.34","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.34","@storybook/router":"6.1.0-alpha.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.34","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.34","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-alpha.34","@storybook/core-events":"6.1.0-alpha.34","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.34","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.34","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.34"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.34_1604214891025_0.6068472764255222","host":"s3://npm-registry-packages"}},"6.1.0-alpha.35":{"name":"@storybook/ui","version":"6.1.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-alpha.35","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2c6cb5efceb53acc9776b86d33f65ea5f1cca789","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-alpha.35.tgz","fileCount":248,"integrity":"sha512-0R7bzPcUzci3JO4kG6y0l4mYu20qcj563R/LdUBV+bIlmrttEUNNf38XvicEtPlFLhkmNuT3b6FTU3zoPJHm/g==","signatures":[{"sig":"MEQCIFuSBavDEyCrQx/vn2BW/G4j/y+LF0PJnfqy/3RTJEktAiAMTBpwkccXtS6gxB66okuXuCa/wwCPFYx0PTFkAX8TXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn6tGCRA9TVsSAnZWagAAxB4QAIz/lgxE9Z5votXmCkdB\nnTCwzJ7VgvOalZuKM5N6oyWItmbiWhJbZC9x4vHAV8jxP6qMeQhBud9apE+Z\n/yMUKvSOwPie+SBtqz/28T2ct89FWkduZay3E9e8iRvpNX0wePOytfUKfQqf\nXTyliYmSRmwbnJB2KrSYhfTtIEMpSxEs1VmTPS5miNzjTl+0V7uYJuviVCGn\nO4RQNdnAVlqI//dSv3bqxD2UeLEKzfq0lnKtlorpL+85EZyLFHUENqGO81RI\n3+CBrgGyboLLV1NVo2Z/C1Kv3LNKbRYMwZ+UrDCgugHrX8C+xq/26aZl2wO1\n/AL4f9mNsE4b7BsFHfmIk7l5I6oVBX+T9XNDNPQx6hENz5viGmiWYMNBlgZ/\nhiQIyyAxO90Nq0r7/rm6ArO0Ins8VD7tM6oOCjSZZLJLNiidd/LBpIVWle/8\nIEjEtZSdMaUpP/S941MK3kaIvRQqU71dY94RBBFwwH50WG8Qp9HeXf90S4zi\nYv3W21IgK7/XEQqPbpPaGfbQD+ylI2MPn70GYhAU/h67fjDKDMVi/prGngsg\nzj6DKk/JCOwW4Jun5qbW63txSLRkBG05NO8b4nSSMQtDFrVEAZrGU7O1GPb+\nONepawq6HhWCYG6O8gVGUxW5sugoE5KJONEzA0vqXMIsZHGmU312t3iylHWe\nUgoW\r\n=f32N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"76bb5211363a4259b9962590a3a5e62a00921b91","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-alpha.35","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-alpha.35","@storybook/router":"6.1.0-alpha.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-alpha.35","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-alpha.35","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-alpha.35","@storybook/core-events":"6.1.0-alpha.35","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-alpha.35","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-alpha.35","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-alpha.35"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-alpha.35_1604299589996_0.7715640679426206","host":"s3://npm-registry-packages"}},"6.1.0-beta.0":{"name":"@storybook/ui","version":"6.1.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.0","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"611416b64010eab3071a6dafbf059d655468d31e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.0.tgz","fileCount":248,"integrity":"sha512-7OgyhczghnDG73m6DUP0hVuDsZB4aOKYjvZkXjW1aJQnssrphko0ys19jZqyTGCqI/Z0D1Y7qdK+bkSI6kLbTQ==","signatures":[{"sig":"MEQCICRAJy9aTxRZ+6SGy66cuapRPS9kZEeZWs5dHHDDn68+AiBIqrCOcqKFgeTpe2BPl6J3/QBnOZD3Hxr/fBD1dLCRSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoFCHCRA9TVsSAnZWagAA4HsQAInuD9YiEFZR1C5oNo/A\nzFhAwo+QsAJ0zYcRKHRi5vKvB9xo0UaDcP0sRsVVOT/C+SmMpZVloNJi5at0\nO8dQg0wdfP+mGGdMkrFgVA3NyVj6FMAx7g8JV440kpOykpUembwQwt/nMWhP\np5spA8nanWj6ALRVG2SFzp8pseixr41uK9Br4YVJ9Ux9Qxc6AgqeKEzfHOBv\nxklHepT/aF+8Nk3VFuCDvfPYw+2PEBAIcddUKQL/atNgbdKx45Oq304MYoV/\n/WRWjJ0b/TZFRF4XMgw/0l1rfNhxXJ7kDMFlfJlT1WWHgACYQghUbW1RhR8E\nvgMQOlu3JJIfGG4PjOoLYfiWe9ZUJYOOQNvJcjMf7Y4IH8eE5svHv8KBlYQP\nRG7fsGS+FLcswlZ+ajq1ue0j6yWLZV0DMkLJAjKQglNGgRtFT0/1mD+3Q7fC\nxUI4FSVlMWZcif35oNqHTHVZnTSFFsIzVohFdozvDFmfq3Mxjelar4XdLoJa\nCX0apWYpe4p/XpNMoi9GIT2UC1SUPTVG1dltkJZ/ebY+R4Y65rKTJXtwymM0\nJHZmYEwtc0mtaCLX67gNQzK28j2+5BNrWs7L0L22Htst1h7g0s0lVuKb3pEc\ntyVO+uahNutaGlrERF5UmokCwtoO7+2ljExmbbCFntFxf2R4LtnFiXuZ5aSN\nz7ky\r\n=jCNS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"807eccd6055990db31a8c80c64e502d4f3990be9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","react":"^16.8.3 || ^17.0.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","react-dom":"^16.8.3 || ^17.0.0","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.0","@storybook/router":"6.1.0-beta.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.0","@storybook/core-events":"6.1.0-beta.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.0_1604341895060_0.030627186141196194","host":"s3://npm-registry-packages"}},"6.1.0-beta.1":{"name":"@storybook/ui","version":"6.1.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.1","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fdaef4526a725d5f573b43aa956286331e6ed397","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.1.tgz","fileCount":248,"integrity":"sha512-hym010qAhr0WIoDOzEl6no/hdsyVvUxLc291239aNsMMjYO5AQyVytDuuggQviN2WsvGAIo1mDN60s1IjvWRRw==","signatures":[{"sig":"MEYCIQCYtNC1qy3sJ1Jc+xDnisMIJn/ye/TxHXOvJ7i6obVDqAIhAIjwrZCJOSrtzRXh/4YBPImhnnqUM2tC2x0Vq2fLDJ2H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoQcVCRA9TVsSAnZWagAAzy0P/3/a5IwPQ8vdqZYzPZw7\n4bcKyDT6ChpskOwc2inDPV1nhbNcDtrNUkd2+wK2V6+ASupbge0oDQZud4I6\nuhBUFHoi8pD4JrE1gXLBrIme9TphxRLAUG+6K7t9/QarPD3VZx6qVpSKbTZd\n1P6n5aYXBVGOQ+d0xqzeW487MsBM5cypdeC5lBEpRe54UEZFBPcRm6pTFd5u\nzcFRDmNc2GPznHxUI2rXHdvXsGm/LC/5kimXJ532Snvez58qMMShGYqbPSUO\nSILkUXp1jWl7Mi7uqIFMweSXIQcn8iIzZybAcJfAToVVs6Trzxce9u1eZN1e\nlUZQxeWi+snCBRqe+a3+XgJKNzozktVoVEpqmkZ6v7tpVusKB9scdohw52Zo\nBj4KhXB9k2ec9e0c+f4OT/XFvmMfW/muYOzvDUh6E85+duve7GoJqITUhdk+\nu12NkIZ7aNpEp0vdcFfcSQ13tAFGnlKyJ5ipNfMy/yCBOXna0tMqh2yk2Y+e\nAYs83iFqJmeSJqDPnUi8v4krTc+UN88zMG7lpqO/nm5l2bJNval9dcKWhKn8\nsCCPeGV1/LmWHHT4vl5sHFfqefLNPlxztQQh5vPuqQvU0Y52BFvWHRbwGL7S\n2t8+Pu+Lg4XnujRIhm+k0zeQS1EnXKNVGWTglqVLScfSWjXWB2lF9fqeBgJg\ncluQ\r\n=btYr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"763c233efc86849979db1c4c795035bd58f1ced9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.1","@storybook/router":"6.1.0-beta.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.1","@storybook/core-events":"6.1.0-beta.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.1_1604388629046_0.41195031310430985","host":"s3://npm-registry-packages"}},"6.1.0-beta.2":{"name":"@storybook/ui","version":"6.1.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.2","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"376a023b73296792b18a4b524450e4727868298d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.2.tgz","fileCount":248,"integrity":"sha512-F6ilQs+RB88owVfy4D8UKHFsGbUbIcS3uXtwxFt6hpM8FdLPHukp5P9MvwhOqt8EpAd9falkIm0ZMeN35TURhA==","signatures":[{"sig":"MEUCIHUZMFqFScKR2QLNOBsnGqvafRUSi4wj/0TqVHU//DvdAiEA78eZxsPvNUchRoE/ksNRrijRW3FR3YUBLBp9e4ix4rQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfom9KCRA9TVsSAnZWagAAzZAP/10KykDPXvacwmkLtLAk\nUzvYx2AAcVUeGvzEuyPDzKuFJYJ2kwefhsqCXGDxIO2iM7Rf9tINZIsDtco2\nnYWGqGZgCP7QHSuW7apnwi6b6TNinveVe1ILdj5vZKd18eHWnh8nCpVq8y5K\nG+DztjAaFeIw6ibGc/Xe6P0ifiUez0bjvH6ZvdfwsdRF9dUWlm7rkwy17518\nve1/5+fXKt1uyJA40wRMhZyJRWCzXhc3XU9+ucM8deUD1MCMI1z6Kut4tgAJ\nfrrE5ktQIQDfjhwT/zTU3cLVDwOJz2HJ8vLk6qn6D7WL5raTCoOspd4Xj8hf\nni6VKncg2dAgWwfF0TDwYei+/yH9xuivryqlLTZaEEi7+Nc8YBXyX8V+EMkt\nZpT2Q5VE/YAvMbK4xjiu19y1gfGEYwkjJ3YPuGBIG4eTu7D2f8xp2IkZlHT4\nbygsVPXmWy5npCW/Vb5zpIv5ZHxtc2luvT85mqYz1lLJPY1qmWHHzUtv6O6f\nbD5qGoa4EvmyMJSpqf5C6bdXbnUJ75NvpeCQsevNVMIuySVTvg0v8qJjEitK\n53AqUyC255Xz4efdaAUAxCGp9wsT8PjZhDZXpnkwSGv5eK+yD//IaY6XZFQe\nubAJwdnCtgXCBu4ZEgqJuW7G83Y4aDi3499o+KtIanm3gnvfZKCrtXFZq/V1\nyMlQ\r\n=Tm/r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c67dac2e088847d96e3cfa427432a1b04d4c4389","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.2","@storybook/router":"6.1.0-beta.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.2","@storybook/core-events":"6.1.0-beta.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.33.0","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.2_1604480842187_0.5468713421213167","host":"s3://npm-registry-packages"}},"6.1.0-beta.3":{"name":"@storybook/ui","version":"6.1.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.3","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f0e30c053a550374060c747482351a8c1cc74b3b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.3.tgz","fileCount":248,"integrity":"sha512-bXKGOdpJ8XJ5obEGnNdDttPIR8yds1KymRkZ33A7SwnpFX2F3rnAA2GXDHFRMZvhoT/Fg+Owatq53Cl9QGsEMA==","signatures":[{"sig":"MEYCIQDuZ7hhSIvHKDCUcaX7WDfbfE0BpoAc51atlx6qciSrmgIhAIYr8iE/znctGI8jlD1DSsemFTNLM6X4C08Bed29DJDr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1514818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpKH1CRA9TVsSAnZWagAA3DoQAJUmhf7wzla4PSxqDaCS\nQXnygLT+x9wk+Fr8Q9DXZtmY4uQGQSK/yo+evu6gf2RI07UNVwo1BfU6xG1T\nAujuwUiJdOe+UsFk6HwKMx2mkfYVQbVoBTak0SmBvWwgtLEiuXM4mkakFsmZ\nkeWfBC57cUFW4cvnxK8QUXVRHCrrREpGcMFjwO5I0acLJQJsmys0gHVwH7XA\nwkieYRpOJEM8IEAgXjIVHmHmHWCnDnAOflg2kgAJy1U+gZruUmdZUjjiUUUN\n+iHqS4qUa6CGEdjGaCmA9hAH9p7/tvc7KMoRrEjIrFasaKhvVp3pNV1bcwf+\nU6sTGLXNSebnYxAzpkw4y3MV3+MODVnh62TYsb5YDKUcMUg10OOHXUrVmdYe\nakJZuZRgRwjEhI8dMueeec3Y7HnZLVVQpOXQ8HTcu+UksnCYiAPok5fiQxrE\nk2Onu1OQatt0EQDT85wG4QeYH3//LgqPZAVgza6zyzIXT899nZdbq7VPb5R6\nN4G1nLHJcG37RHWCBcKvXTfeKdetn6cH3jkf+k4U68Jwxb/G3jTLmJlfWIYN\n6aNCXKjVH9+sWVcgcVc4crQ9HJIETKYFUoVI1fiZ0BSOcEtK3Kx64Thy9RQR\naaysAS7+DEoOlb180VYBbZmJ3hIxaNfGUfzuaKS9u+luaYnwamPddx5dF9Gt\n+gH2\r\n=6lif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2e11de30450cb6443661568bec770f36b20c42d2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.3","@storybook/router":"6.1.0-beta.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.3","@storybook/core-events":"6.1.0-beta.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.3"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.3_1604624884586_0.10284753155234072","host":"s3://npm-registry-packages"}},"6.1.0-beta.4":{"name":"@storybook/ui","version":"6.1.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.4","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ecca6d1d8e36657b4e61caad6aed096d027fdf0a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.4.tgz","fileCount":248,"integrity":"sha512-sB2XLbjeMENl+tVjC0ismo/hoU2VS1/IZBkpnJ8XrPesx0f6um2/+0Z++QJb7ILKv9YNmBMTeEEPke+sR/uYtg==","signatures":[{"sig":"MEUCIFFCFwSZSzPT+3IzICURygjL1l32BHCgUjhrS7w7rMjFAiEAwahTOdiuDBnfNkYIeeO+OT3NkKEF3ZiwSyFXMsAuJCs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1521743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpVIXCRA9TVsSAnZWagAAiw4QAI54iaUpJT01XUdUsUkP\nvdn631GYAVGg9Y0Iena1ia4q7ZNQknaB0SohQWODLFdB8ySX+QA0a96bQiyO\n8f/HiEeDP10DtpcwC+vkJsi2FRfr2UgBWYfUicuklVW2FdyWf191fMPci/Xt\nnysVHeosNbuwcXTKfr5y88rtUSUTNUT0VAwWoBaQV0eRPndco+tQX5d4c9kT\nQYE1QaVtY1XKkoZCOHbQDhwC9T48850M4iLOYhjkPDxTiK6l5vKhpNAdm/TY\nC3SXlK5sE0Qo7ETp2Zc4Xtb7NN+azB6KSnFzNHBI27H7pyaEjHhOhoorXao4\nCFeqACIxi2wxAgrBAd3VYuspQerA7rPWS8eDAidtgOJKHuYcp3w58bAzJb31\nHTwDKe7LgK72isdEC+0gNglOtGnFYOuQPXAY9bSJfM4epzFeYlRRYCR3MnPT\n0rCop1CyW0R2kY64byMiQTTQca9r9hcKcZb+8KKu8KYlao7X6Kkv4z1cj5Cl\n0yb3hu6XSIpCsIIduFSRY+0GNb1XN7qYK8lClp3wA6etTz5Fvrs9yu4JVEUI\nyrzleVO6kEEo/A0DjhP2CvFvWu7GU+sjCG8k/USNULcnEgrFDWdquPmN0QGa\nN5eZnRGZ6T48m5D3X96ET2mAgpwRQDkbBHZZCpDbToCvGN/bGMEBwypBwX1D\nFfLC\r\n=9AJi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7caa9a57243c1377d8275682f2f9591df4811b8d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.4","@storybook/router":"6.1.0-beta.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.4","@storybook/core-events":"6.1.0-beta.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.4"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.4_1604669975135_0.6837578590015381","host":"s3://npm-registry-packages"}},"6.1.0-beta.5":{"name":"@storybook/ui","version":"6.1.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.5","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e573387316d68db180d6c10fbc0a3dd823ac2459","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.5.tgz","fileCount":248,"integrity":"sha512-eEkWJ7XsKlC7eDo8t5BgYHO1hP6Ox+3BoIrTn2xtH3Aa+Ya07ZaojoQxKPzCKB+IOvcKtwGh4XgjLYUmlSwqNw==","signatures":[{"sig":"MEYCIQCOjd+8F7S0Urk6Z9+dCYCu7ff3TBMWwZPeCEjtjuhPaAIhAKv5+6M/QhZkhdP+WaD0alo6j+5asImwLT7sKydoJ7X1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1525343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpsvsCRA9TVsSAnZWagAAxrgP/R1Grb2DGKvW6dNeE9ZV\n8B33LaHCm9p5HgZ8umOS6Nq10R6pupL1yPPMvLS9D66eh7KBajtduYc8TOHO\nExktAoWtNMFR1UaIZ0q11KEoZhL42kli6UiEWq82VzC5ZPByyB+rvAdHnjb1\nJlqdeVOt23yhGwFLNNnH7X8EsWSkXqW/vR04Hx97NGBLR0OMkmRLUWEYaIir\nZC4m/QE1dMUTz5LV0c5k5U74+t+c8bHX97LNMdZx28mWtwT3PI4RhLr9IRln\ncP85FYHWLPAEQjUrgICTsjJHFLKOtzN1AzCs4Bu+W2nV7dVo4IhtrPFy5mF9\nEPpA6CySaX4tdOPr/+/RDCwS79bgZaKXh23iMm6zGH4F6MF9auNLVAWi5gGE\nrblADfgzRxKLVZ+akONVmraphA9r7E+8sXuDM0RQx8zTM60CLVxzuN0EU+uX\nZZEerVogil+MdP/Hq5JAhhAeDoHIL9eq7xII+6hZUecj4jGR6CYB1LJlxsKT\nYX4eV016qE4E87fnics40HQ5jk6iDvxdhtuPzjqK0L5ln9o5Spa1PQ29YkGq\nEYXDnJkQP9Wn/daxn4j9dDvN8XALsIWBxgKy4q24DlIGTXyMATeZQeG8wt61\nN5qovi8mDmLU59Pj9r1uoHsnyqjXCTPLhkmBokW3j/70mmzviPv65aizbphA\nNkqe\r\n=QHT4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7bd2ae048222c2cc249775a3271b5b7dbe638038","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.5","@storybook/router":"6.1.0-beta.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.5","@storybook/core-events":"6.1.0-beta.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.5"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.5_1604766699419_0.05595843602526629","host":"s3://npm-registry-packages"}},"6.1.0-beta.6":{"name":"@storybook/ui","version":"6.1.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.6","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"66d93a886bb1d2b73846386c4d36e8f6916ad187","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.6.tgz","fileCount":248,"integrity":"sha512-PPrrdS/WK/GWdMuWxJoVGtN7kODOQD+QfLXtjyzlZgOj0VtVSX1vE60WqSE/bQs+iCPtJLh4spUNe33FS1CXtQ==","signatures":[{"sig":"MEYCIQDDMLC5KWVvUx1G94lfobMLMQI/PEANzGbaRdoS249QiQIhAMF+xYzQV/lLebjmZyp3nYZHfgpp54m0Xe9MMuNqdjKd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1525434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqVuYCRA9TVsSAnZWagAAzWEP/2y7qhIAzbK5hNh4l2qK\n5tESZsxqH6JTMNNOcuameN1ISv7mwaNiOMx0ZuQ3Rwr5MH95wU8uSm7kII6c\nVX9W/Ovc+1zapR7X5S1q2BcYLoJUOSIIxFrfk5+s2bWMOl/vC2I3DJnc5v1I\n8xJrtYdKHnMyeuq/3b08BgK/0K5X7MpfjTM6Ngzyp/ZB+ngwmVy1Mm/LYQd9\nHxISG4HLx6jTJ3WPTp1yM9IGXWrqH0Si/ix1HWZ5uSSipUpNWfjhxYfyT3iV\niH7cz3xLpVYmT56WMSAMxPUwg5LcO3hQkS236etNG8EVndBI3FXp3Oyufgbx\nzKclxxTbF+04zjLBx52pqlszZco/tXv87mVjquqlqlIXZtbDWvTJQAHcEWwL\nWanJeS4b4Ly205/E3MQYPpJ9cSIdy2cdHy3DyXaWIASgyWCGxkCNoxzzg2JJ\nWHz0Zc5BEQrnwwnL9m0IqlYiToyIlJZ2872ay0OciOqMdiMXIQ8wTmGoJx3g\n17Gft6WSyYVRy/Cp8W3MaqlQImyeZ5q9sfV/M6WM6ca0YkX6UnNz52ORrtXM\n85VMugbrGcuHCnfUC5fDph9LB7/2CNLaX3CbncSFo/JSexGSHzmRTyTAHybi\nCp9rMHYhm/5TjSFP0GS1SF/l6ybxuKxzlgmfFGClEr2qx0TeESD8cqm+IIdv\nU3pD\r\n=2sQK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"08dbe0ffd978f79e72824b04c1c037efecc3d779","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.6","@storybook/router":"6.1.0-beta.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.6","@storybook/core-events":"6.1.0-beta.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.6"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.6_1604934551672_0.5219217301514858","host":"s3://npm-registry-packages"}},"6.1.0-beta.7":{"name":"@storybook/ui","version":"6.1.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-beta.7","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5ca0f9adddb87688484ae0a8f9e2d709e8efcc67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-beta.7.tgz","fileCount":248,"integrity":"sha512-yW39F5zn8itc3zMTUnitLp8vOns8nUMi9L8rr0JtFMQCiufa0sCj+3Q9iwqDLuqQhysSKcg+UNCvqbjDYrk/Xg==","signatures":[{"sig":"MEUCIBW+frjSqN8dDWZn28MQVWJ5Tnl2AcPa3MSNpi1m0gGzAiEAk6p5vyMjgIiPadu8JOML45AoVC22stVGCOvwkUP+9nw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqyWXCRA9TVsSAnZWagAAC/sQAKPABXNxaq2Hidz+/8zE\n4HBqdYX1E5Nkjcoem7ePjSryS7JYTGTQZcmh/bVXEb884wYrgtiUDBobpu4f\ne/etIZifGhMtVcZBlRy2OXnJoL2VKGXymau42VKNFjS/3uL2JcdFipNB/V5R\nzNTW1eEaV69xnlIFVT202A9nf1vB3dgxzT80+FYA1nUFjNbFI79pOTAGgIxw\nY3xQLDdnOgJsIgaCfyaeBQzcNWQFPjBhqghDZPM6TCok1pmZbMxj8XH3jaoH\nEmcfbykQcji2RPrTeHvGsQySubHWfP7R1kJzWfPqcLVUolkVBiplSpoz10Ks\nXQdT1QGvgKsne1yHCXZoyu1jaXDFZ4vGcnuknn2ct/6KN9vnQPsrxas3vsSC\n5G74zwVmd6AWcLt+4vJVzxpPTc/rDWiwAA5GRwEEgFY1/xN6061uMjuie2vs\nASsXcGSp1Okpwv/WHELCK8NV1TxYoebmwGYLkWoFyu5igNo79v1lssXY5Ljs\nGmTFadP97U62j5Sg85ceTA95ptF6EaOaoygZkN5jSp9dc2YNxyY5IDqUMwcx\nyIZExC915+eItSV+U/ARqwYruFNU81lekm6EBDn2aYqsbg/bWPWw5KxoPBKv\nKozikhd8Dsxb7P7evXiy/mOr9Ouv5LFd8ZZzAoMAVBaObFR2cGE4U0uDXx5i\nANnQ\r\n=QxuC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"640fdeed830ccf70b8f68597e7bdd43e991d9969","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-beta.7","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-beta.7","@storybook/router":"6.1.0-beta.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-beta.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-beta.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-beta.7","@storybook/core-events":"6.1.0-beta.7","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-beta.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-beta.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-beta.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-beta.7"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-beta.7_1605051798425_0.24438582158324196","host":"s3://npm-registry-packages"}},"6.1.0-rc.0":{"name":"@storybook/ui","version":"6.1.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.0","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cd22ce9f1a9e71286d182b804d491f9660e9ed4e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.0.tgz","fileCount":248,"integrity":"sha512-7hv8HiV9BXAAcQ+G5Wof6D/qtoRgs6X/+5B+BuLqGutLew1BfXmBwaloGNgcgYba+gaegQyB+Y2KhR/1jTcRzA==","signatures":[{"sig":"MEUCIQDu1lBDhkbYExZSQIFLEzYnQ974yz8+9y3f3ZKZBcF+kwIgZs/yBNn9R4NNmfjj6bFYmJyf+sYzKAnQILKh8DLzcFk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrQ3jCRA9TVsSAnZWagAAeIoP/ibowzNszbUV8EHSP0zS\n0xEkciX+ynYmSNYpAhjdqD352T8S6vxcwwJVOEGLgRe96ISZs52NpIfP1dFS\nExRLyF1eJ6kg1+0ariPKLYCaz7Ce+fDhbnZYEk0c6HXKiwI8g+j7QP5ADGBC\nN3oNN9bcx0EFoPHziAe9UyRPt+6X2FO+tvzdyF++sAyUKjUoZ/Smtq/WfP6s\nkb75y5rNMupW/UPprkGunGhQxhM1ncZWDqsZut0nl1xH2lhUEjgEwCuyDu6X\nawEF4jYdazQWbT19evE3i9raCH9QzNZsK/D/B6IMPK90S/3xnn8YYR/fl6Io\nv/VKbkt6krWM79sC/pK0bHUajkX0xkIsWOICNgEqP/8/OrIEEZyPAkH6KywL\nBauavz2h9fRfnXkk9465opMLAHXJ9fsEojswzPLDdBwyE8Zqx8rcUHJ62AaE\nziLQEU9BNTeCzXUqyrGBpX9RYGrXvdjcCIDwBHKSOja9pjc8TK8tYb/7q4X5\nPWG0CN1iGEy8ubpYYuhhamkXEMP7M2G8Ym1zONrOkCuCIS3gVNgpcfRgNgJT\nMCi02u3hJS5WBg4n+CFICodBpBotbJGVNoCac5EAj7YlMhlnqKdHC/uXMXHi\nOS24lElj33FDRX3swSjL4nD7VfrZz6iC3OuoBM6VQIillXfANwUUaZAQbIcJ\nZIwJ\r\n=g+GB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"90977d37f4f988766fb5dcbaa309e3d9298c9fd4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.0","@storybook/router":"6.1.0-rc.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.0","@storybook/core-events":"6.1.0-rc.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.0"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.0_1605176803302_0.5535144221033284","host":"s3://npm-registry-packages"}},"6.1.0-rc.1":{"name":"@storybook/ui","version":"6.1.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.1","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"08bef6a2eee82b2eab18ae9ad45f2e8bad5bc700","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.1.tgz","fileCount":251,"integrity":"sha512-SK4WkQPsCwcU3ZA1sMP5j1izVw31FO9cbFPTSq/R2sYyMOZJMz5Ci6XeYlsAgESH/qDxRqZfELTPot+rD3pwlg==","signatures":[{"sig":"MEUCICqQII0dkIyQseNr70ZGtrm96SsknlVNfhuNvQ/IP+bIAiEAwdxMfi/v3uSw5OuxkV7a4znNenvGegJr5h8shs9PRYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrdTdCRA9TVsSAnZWagAAewAQAJPcvdNDHp1kQlj0HQac\neaZOrBWol+pgujQCuNYJlexHFaswOdesWQdRlwspxRPjsvoufxxYdqV7zG0q\nhjETLgyL6mbK0wvZL5o50fXP6w3T9337OJDA6VFRYLmBeZxvVlZ4auOGQkY4\nwXvr0vVJSzFpTO0A1ozTsgIj+1LOlyS27uYj58crfuRSiY2W8EAju1hAEYy9\nADU1PS/y4pYFjuG0y03tR5p12qWrG03ZZ8zV7R9+CbBNVnOab4pq/KGl1tAP\nC5sB5MxY7d6d7MYijhYYkHcWVguiC450ZYFOz6iLaJw0Im9mb2J8u6r6H/Aq\nqxlMCY38A1Ljd79OMES4YF0hzT4S31VuTYQ30K7FlqYZM0/kp6fBw0Kx3+Tu\nlbjWcSJmz+s6M18doDQVgcLlkqfH4eZtF48vEck2iVOSHFpwbvpSXWp7j//Y\n1kfxGyZG77uRrQXORs/YH5bQICtroHqgZ9pM+/sKg1R2lQbYMwlJs6hgh7CH\nX+hoOAIh3bzClK46Uje3LJR/Xd9SGDVL2lPggnsKiaor60UHpWL9OtaSA2os\n8enmuYp0u2rK2zn9uGgqNs72DyU39tfL5bLAWiDWVfuDqcqSoGRr3n2G8tAb\n9o7xgEPCDz1LUa8GDrMZjeHGj+/NIfecY+iWlqpMRrfNr16PrTN7jz5kY7Ho\nUlhH\r\n=kcvi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c717124a7c86f6302a3f8b33d3e391c0f33d71ca","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.0.20","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.1","@storybook/router":"6.1.0-rc.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.1","@storybook/core-events":"6.1.0-rc.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.1_1605227741221_0.17916522295498916","host":"s3://npm-registry-packages"}},"6.1.0-rc.2":{"name":"@storybook/ui","version":"6.1.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.2","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"aaa8ca5c6a4bad2ff3db9b0c9784bb014891d020","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.2.tgz","fileCount":251,"integrity":"sha512-WDTeYaxGevfXtgNeW1sLvMqoxqsXUSoBVrkaP6M/pRZgDMaF+YzBuD0dQpCznAIK/ALiHwdb/ajO6WFDNdbfZw==","signatures":[{"sig":"MEYCIQCxFMUMxenJG+0Wh/7aoPG/vqZ5PemEnzLzszrAkAFrsgIhAJsJiOKgBcFUfYfDECTYtRVnoQG7yTSj+9U+sJfpOWwK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrkdSCRA9TVsSAnZWagAA20UP/RMe7D/4LxpPvG1rYeZQ\neidZ0t+ueMk/MkBHXwE6Q8f6afi2Ijf1mHox9ENzbbcjbksr/NEzXt581oZJ\nU0OVPAWQTeV6xpcR8Lx6mhoHw+RcGSwlnwuDWilc5PRJAc1y/n0voTlydx7g\ngy1W56SYn52kUmo1Vk/PBz7zMzTT27usb546TN+vGe0DKZHqrURmOSDXwegl\nXdZwTD7hhgU1bPY4KF+2a+TyF881wp5xmi3ASJks2nNF7NvhMe7H/etnIAV1\nN+3nx/wFA/nSdht6RMSg4ZMSN+drTxPM4neETgYn5V2wjhYunPMl0Ux23Chc\ndZePYW4qmrMBu0Bte6bkaUCHbgAyROGQUCuGIefDlgvhDktEwuiQ8ILNWLC4\n07PIu74ubLGO6lV35ug+hmmK6YybKmOIW16s8Pi+E3l5PzHKLWLqIEqk1OpA\nhXNcCblDCQ6h0YmCXknQ0Ui80oCC1kAxe+J5HjMWiMv9oNJGfjF/PPVPpLhq\nW5MwVo8mQ9VcRwaqScKi+UxSfwvF0b6x18pfdTuC2a1d4A7mZuiAkR8ny/rA\nPKu/IoHiiahC0jf+2BHDWh9kgoC3Tgz/XgJ8WLLXRUvsNuea4qG5qUKFE1s/\ntxC6bvQk/9N7Ev0gILL6ZvchqUMS03yC0deDmmNqyoYND8mB4wMzncXtGiZf\ngXE8\r\n=RRay\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"38bb07161a72720766a1e9b2c9a1661bd3d819b0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.2","@storybook/router":"6.1.0-rc.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.2","@storybook/core-events":"6.1.0-rc.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.2_1605257042149_0.5570620609691259","host":"s3://npm-registry-packages"}},"6.1.0-rc.3":{"name":"@storybook/ui","version":"6.1.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.3","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e7d342c2ed0fbdc435ae8539565af08a56478ff2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.3.tgz","fileCount":251,"integrity":"sha512-W4OUxk/2ZgS7mUyDZs5Ghm2de01Wg3z22DJCHspkvkHY2cm909GlBqnr5gLqGVSR2c3YF5snnFLIwwdG+3b+dw==","signatures":[{"sig":"MEQCIHkwssesj0p3x06Q4r8dFoNrKs0uxk/F+E2/qNMtRayzAiB58brdECaGlUhPBTwmK86mC19/wT7bB4FMQVyZkA2KMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfskK7CRA9TVsSAnZWagAAk4UP/iXeJyJJJ0HeXBqGNiNI\n2Mu+wTq812V47w1N4th2igKaoq3XYm49klj2aVjB5ezwqr4cVDdd4Z4gPPzI\nBCOBiBGC7zX6WVUIPAQ9s9FdxEJbFoG16W5SnKfYDVT/XgjG713piBk3gx4r\nHzv/FOcGCJwRM+NEmVQC1Seuh6yfNjjQvewU0V2zavwcgqB9uqnQfP2Crf2Z\nGS77T2+3Dmg30B1ydb+j9EUhblXnUXVZWJgRmHdQ8kFioyxL/CpBKJZO42OF\n+zn6SL4wWDKeVfj7GgpgxLlUwkyB1vrNzEH7BtprPcwdQTlhgJM2odHWaUlE\ny97PlpcWAaKnpOArSt5rq5LDAEejbUMYdijg9avMWheKjXm4Ah1gmRsDCHhe\nttnZiWuyfa3YGZBb9UerQmQYazFwifjsNQ9jAzPPj3ns6/7Qb94WyfhCzzs5\nBUWBCYhl07fBjf1kJcJyTJu4dntVM5Bgirk5wUfPZZKu3cw0Lyr8KlTZOAjM\nBFXrIwDeLoeNe66F/jPJQSPbrGRem33ZpP5yWccHEw+Mi1GqWkUa7eS6IOfA\niy90wsu3dErXgLAAxg8OPpZEKbq0X+1PQosJuYSDoeATPo/8DOqv+OSCA+mx\nLQH/kNc0LRh+yEF9+6OisLJnLwZTm1RVjnNrXWEsLr94i0cZH2Z4RocR6GxA\nG58G\r\n=HazI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c8cd3cc9e6b21ca651e4e3d8f39123f38a28be5c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.3","@storybook/router":"6.1.0-rc.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.3","@storybook/core-events":"6.1.0-rc.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.3"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.3_1605518010624_0.8914444208393604","host":"s3://npm-registry-packages"}},"6.1.0-rc.4":{"name":"@storybook/ui","version":"6.1.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.4","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9c93e23dcb4d732a3c9414dd162359aaa15458db","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.4.tgz","fileCount":251,"integrity":"sha512-9E+5Jytz1Wd7/RjyKzw6MVHIh9qoubaOvsvXPPaLzs4ow+Tv9zrrPuEMiI/vNrA+ZSzz37RiWxpU4frR1lG1yQ==","signatures":[{"sig":"MEYCIQCaydh0joX9MbaHwTZN2HFtuyIdRy/28EValMHFYJyfGAIhAK5gIh4upd0eC9oynNVDrsmkiDuZbt4RWihL1KDJ2+5w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1532872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfswaVCRA9TVsSAnZWagAAvGIQAKKTTQcSwAa9CIxt//yv\nYCrgUZKe60VRe/9SLRq6K3LIZa23sojZxK3uSeS9BVbfjLCAWfvi5IoWVB+D\nrVMkqOGswusi+qALoSoeTfOrsp3yttK5mAJKndeW3a//NfkdEO5aQnDYKwX1\noubdjwjjhdIdCPidmdjgWQSVz1CQclqfwpkpes+NOKUExRLcTiMfuTaMN8yE\nSXQ5nF0Nj38xha9yhBtapg/6F5MrmzDE5zUzK6d5vW6sJlLYJ0r6jyE/ldoR\ngYEHbGdh2qX0gFJsPSszoHlud5wctwTe87r4ZKePTJS6BLk8kW86+YVa2m6/\nVo4QrwhQnUVwjL6GN712MPhGX6xgRCFuWh78AvJzJwi0Ud87S27D5IOaHh8W\nr1l0W2latnl9BKYraI4Wvz5K3RIFnjmBoh4nMi5xAZuOyJ12Y1TsxR+5KPjn\nul3FNMhhpbazC/6hgEEw3iZzMdjxObwRNIYlHcXtYIw/ppbLPmgHn72Kug9o\nGPm0vdy4luHOGF/1E/0Ov9ryXCrMi/BrbWR6NEKjdnTtcsFpaSS3npbFYnsQ\npcM3hHIi1+KgsnWQulQS6jOtM0/ZGYYXCLxQFofNRd5b60317Sk7/LLClTj5\nRd4SiPtBiFL49kb1+nT4ckipIQShYLd8GVCM06oHtnV7Ksyl+eMOTl2BCuq4\niHVn\r\n=xp+l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c174d7429c2593e051cc2dd1361bb28bff71f75b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.4","@storybook/router":"6.1.0-rc.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.4","@storybook/core-events":"6.1.0-rc.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.4"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.4_1605568148637_0.5083707348858932","host":"s3://npm-registry-packages"}},"6.1.0-rc.5":{"name":"@storybook/ui","version":"6.1.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.5","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2b8489b1d1b68a9ae2bc3f23a1f0ba66ac4ab6e9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.5.tgz","fileCount":251,"integrity":"sha512-r24TTyP1hyrOgvW/ZZB3u7hAN84oJnXCk3212MQODeBbcJCiKybRKZdIG3+fFrxuPmGc4JC/yF6C/6zVhTElpQ==","signatures":[{"sig":"MEQCIDmMcYycrnJOp8jKolRF+3DAVYUxwren8UhQSoOxwPo6AiB98zov80rGVExhApugtUCdB6TxVOSRJz3By92Vqe1nhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1533946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftXOXCRA9TVsSAnZWagAAzOQQAJ/AtiqQ5/noXh5WMJCu\nzMqrQEdLn2RxMUtjuY0AW60XpU5BjKaFb/SrFHEOk0tgdNMstPlvxgYt5EPD\n0nyj8tjuzykpTExbaVHEj6BkG7Ynq3AJcGoZAUQQDl4GmPOcgEW2L0VLnSic\n/er4dKMGYUmGAL6ur56PBe/b/yAx6zdys/29SRoI21P82jeEeOyMRZZf0Huh\ngzNo6ld5KrBwHQy/MR2/jt5IAWgGC5vxeWlh6Cri2b4dbcWlS+9F0JdQPF94\nXKIwbVBhZH4l2uqX8E/mihtnuU4GT4TO25n3QtI81DJjW/8OawFgOdel3LY1\nmiWgpqgrx1WvBvTquUD0vi7xk/XwDLxqeTTkLugzYDgM8nE9hAQKkJem3aiD\nTIY2ApJDWg6m7Jx0mR7De14WmxCGddFPVYiAepCpGseZjPrRt7AkuqUftz+I\nvD0gZJWSbyINJlANFOp4I/P5kn492CuG1CbLJG4gCnkIibSPRDj6f8vYbVyA\naFNASi+HnYaSWRvKMpfCWQuCF8I2r8tbxc1Yq3w0xJAATFzts9w9jdXdpWOq\nchm1jrcAeZupTzHO++R+V0t6Q7jN0EaBLTeMG/7Qdpxfkw3GiDTK06RQC7cY\nb9+WumwOqOEsx3NSXkWDBUEOTsta9KszxwvfznkPjYZo730V+6TvUg3Vu4oE\nf6oy\r\n=JIOt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a8822ed2a1f513f71bf8efeb9e2874d9f16e5343","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.5","@storybook/router":"6.1.0-rc.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.5","@storybook/core-events":"6.1.0-rc.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.5"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.5_1605727126476_0.7536925837908843","host":"s3://npm-registry-packages"}},"6.1.0-rc.6":{"name":"@storybook/ui","version":"6.1.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0-rc.6","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fcba2dd2473fc59f906e0ee243750d4e2c0a1d54","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0-rc.6.tgz","fileCount":251,"integrity":"sha512-2/HAGVCn+qmKqUQRYVi31LP0GBIZieQjGxooIlA4O3GuNNjP0VxpQCCZoSzdzQnpb6tBRlGbQkyqY2cLFEyskg==","signatures":[{"sig":"MEUCICOhaQqZ+VSS5nnrwaTcR8nfnDCataxRiv7cLBSxf/tuAiEA0j1jlByq/7KTCsa/PjFRdWzZ8AsxZUE5PEJJOOtImY4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftdCUCRA9TVsSAnZWagAA1PgP/iBMyAUcp/pHKudmOy+z\n9awrBjxPC8y2E//RjsXhf0klG9bcN7UDbeRtF6bhmr+/LZBTBMFFZEjonqZc\nHFQbCd6dzs+HSaAw3ay7A9K/MqhBowNWHT9pjvWSQllgJMpAueY/ocHyvOFz\nCf0aWOAw9/js+rFtAF/e1bNym7++Zjln+44w9sytR/I4RNeScWqYLbpz/IAD\n1HYP9uJTtRm4G29szH9Td9LuD6zRYS6olwpN8RXNQ60lmMn/MW01RZqLILy/\nDvkCNzS4IwamPZpmJvbqe10KCduibemWQGeva6MKkPm8MFXDhlBMn7WJmZrG\n2aWB23MoMaiYsJ51MAsSHXwUK8LWYOjDZBRB9KCD4E4A2qecge0URuy6Pjwl\nB2Pde+T0wFn+fkTW6NI+1aQmKzrDsKzNPa1L2I2GnHpjXBtKhXpr+qA8AbXL\nUa/aWnszHB61OTcA+l083F1wg+a9TW1ixARALDDBeDSx3M9b1Qrl9Jttdvb1\nmN3huYnfdVcNozKWd3v2EPeS+NM338+D2ZwnTwXvCGWumuguO5CRMtanl2Y3\nRg+q6w6teoPvZbPtKQW0Co/gf/jdFw67TfAk+Jo3eo2dUid80WX7OTG5tqQe\nzGosJrx8QlMA7Pp+99Wp7e6MEAFZRaTCtOG0y4xDZ/o8pmGQPdMlhe/vq6id\n6Kaq\r\n=ks6f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9009e5399d5fa470689e5f2457ea9132ec1c1b34","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0-rc.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0-rc.6","@storybook/router":"6.1.0-rc.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0-rc.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0-rc.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0-rc.6","@storybook/core-events":"6.1.0-rc.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0-rc.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0-rc.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0-rc.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0-rc.6"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0-rc.6_1605750932085_0.9611091935556832","host":"s3://npm-registry-packages"}},"6.1.0":{"name":"@storybook/ui","version":"6.1.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.0","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2429c0936960ebccbe5919b4eb89cc6aea98122a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.0.tgz","fileCount":251,"integrity":"sha512-xlqQeGzNtg8Fi0Q/cU9Sbo+pVIDcyL/JMX1P53IAOYYHhI2SdxsjoRfNvWmO5DsskYsZeao+zjHBvmyp6CQh6A==","signatures":[{"sig":"MEQCIGvTyzIUb/BPaxr68+/oV/OPwpFcTUlLRu3+ML/obm+OAiBrR0PWp4V4UswCNHj8DHHUeVBGeDp2iHaTr72syJM3HA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftddjCRA9TVsSAnZWagAA0ucP/ijKdRdVa6188sy1W+pF\nebbYZ1zoUdThsaEeB4mCaUidjzHNrQVDkzb34sq5dS03eYEN4ZLIvRwvZMy5\ny9ujDXK/Tz8pQFEhTl9eTgt6KWJcWO2cmJ8kZala1MCmz3w1Pp7sUbcZEKvi\nDXoWDOsHGoRFYOdTy/c4bvnhhkrO3DakVbxJE6Zw4rF92i47WA8MUxOY/ruB\nKF/bSAnF3Bp6DQt6BGKSAC4CK8V39XJazruHyQYEbpJu/oFk4JyJPzkHhoPf\nbgDxDUHF7WqD2hBxLfR2CURk+TPcJjRxF7Pc8HkJTFqnmjkTKYxmN8PckjgM\nK5M/3LML9t2QP8NOe6InzOIq0llmNHNJ0rh5Ebqd58MElQCLSMNLW6w+/wya\nBV4ALOgLWID7tOKguFJ6DnmLFc2FrOkvsrExQUhw9I2wanXkhMARMCxmQCaL\nDWr2xPLiHkPS2lDKapOirSuN0e4O+ArPtkyhkHxdiebVjvl0z5KccOImXhWd\nwZXtF0zpKuNVonzC71GGeu8oq5biARM/CbcHEnNTimPRx0sug923eKlErUsL\n+kh6j3nuPuKZ16or+GzNMIY99jMByPyByrvXFn4UA/7OlXNFMsO9EYLF1X51\ntSzkRLx+9iC/5vKHXGKjyMvM50AvFpYjZTEo22FyNApKMfhHOqgyFK4NyqCj\nvZ6h\r\n=8BoO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"e89e51ad5d422dbaa83b6e2e5342fa1ad362b2e4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.0","@storybook/router":"6.1.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.0","@storybook/core-events":"6.1.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.0"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.0_1605752675394_0.6489734595615295","host":"s3://npm-registry-packages"}},"6.1.1":{"name":"@storybook/ui","version":"6.1.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.1","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3594a2d5a2c1ff488447bca9f4932578eec4000f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.1.tgz","fileCount":251,"integrity":"sha512-ioAMq/Vu0KlFMFmsUu8Fcuf9DYDXILmW4waRyK1h3X6Ed0dQwJFU0DBe5TQW1VHshCACntQzB8nPivvEaAckrQ==","signatures":[{"sig":"MEQCIGWEDWMkVvxDKd+E3tyJ2baQXErvqPN6E49SCF9LzGUbAiAd3u1RzeeUJbu24a5KaR3g4pgUSmkVmzIr4aZmkkc0EQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftqiVCRA9TVsSAnZWagAAKp4QAIf7asHcW9y6c05aJGYF\nYuQaDiKP6JYwJmDPvtnKOzIAloXd43/HmbMKTm/u27g3OkWXlGgNpMt/psto\nSEj5BRUkv3LI/5xlysq2dwePiAW54mmrM3U05yWaHUWIvsDFB3xavjUt2rzG\nbKLhDXdpXqBhuyWGDtZ4GhFhygbE4PuDKGbh2VMrfV3vQiCyZ9Ygzfde2gMl\nJ1qdDDXDblF7zQK/OzZg1Y7pd9dDw1ykUctVvNLeZ+lVW56pxQGQLHMqDWI1\nF4sYinLyI1WkPmOnD+TiC7KyJcYTbSw/HILJD1s/Ji31a/JEavxDBIDXrjXQ\nxdzogodWQPPFegycZepmzPKGm0vIk+THOxUXOE/UuZ1yvkfeTrBl3sv769tc\nzNVYASUwF2f6AHVTzBN+hrFU5VF7m9djEnlS4uw1uszkX5UwEDyw8cHLKSNs\n//7860LBZsapYLFWBo0dK53COdlonNHm8EYHZepEghHdsd+3Z+7iEfhnN04r\nbDny8P7CfgnM/29/6DPogZ2ZtzJb6mk3U7ZzJRO7rz+89PQvt7pEMimdhysl\neFTrgQuKS4ugJP5QeRJzIa4tc0g+jQzdIUd2EILBRNLy2b0lqpOFzC7Oggru\nbrYchCb8UlJcdODtzbPzOQQQ6Q3+7JY/Xg3DIaxOR2N61EhtVWizfAPRIQQG\nc9M1\r\n=ti9c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"3622cb7d2c4adf44a643ecba51afb39c576f4d1c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.1","@storybook/router":"6.1.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.1","@storybook/core-events":"6.1.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.1_1605806229083_0.7204859054429158","host":"s3://npm-registry-packages"}},"6.1.2":{"name":"@storybook/ui","version":"6.1.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.2","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee288141b70f908a8dcea646cb2ec52cf69a2483","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.2.tgz","fileCount":251,"integrity":"sha512-ZBfL4x+E43DR+GnC/wjJ9QYP0sdXyZxxKWLQoDkNPIdDnNtFGyKFQyElo9GgtyGxIukssO0sW6fwWWpnErKTyw==","signatures":[{"sig":"MEYCIQDjbZDMV/SWWvxbUGhFysQoggtGCShMrhBuC35zZOb6NgIhAN29f2NvYAITlq+JJDWiOvKx9flvItSFCqjfU0+0+4+S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuKqzCRA9TVsSAnZWagAArZ8P/A7UM95lJ+haw4byUwNs\nODUZZ8OYXXxATcXu6L0rk3YN4YmTOfSNjLl0w17j2LVwhxmVVgeMHyyjSzAW\nrXcxFzrEPjjfYF5ksTV/gFw0HoWAmh3WgEdEIP9GATapwqqenjUS1u1wcF4R\nSqrQhZRPmiH5SGFhdeWgX+UrZiOu87lfSK8O7RVsp1+SxAnKs+uktU7PEeiJ\nV2Qs1eEOvpmqgMD3659hMwa1ovJAWMoG1B4St5ygwKsm6hYqqyPH0u156ZFu\ntP7PDyL1fAKvukZXZg1+IznkYo1Yz8A5OVHpHUA49eN4qaxilYZhhEnFXiuF\n6eugWhGz1uujVXb4PG6FLoGt3w0t53Uhczs3NNRz7zSBalhMnNg0UTnAIuaX\n1pJ3PpJYX1/hBvadfBppxZftSG/6YgyaHZ2yWZGFFMInRYKXtzTJexwxGCWm\nU502xz0oyI+NroHr/RR3m1YWXY0MXTA9nsrfGl5QL008tH4iUGpDrB/MSGBy\nx4wOjs1G+bPud9IlmDE98lZhY7hrJrJZaKhdpqEt3frxVQO6qXsbcQSmlDv5\nxEI0uUEI5SBNiT9utD6t63bW+ciEAOWieF5q3X1msIRuxuud86uBG5ujcrDZ\nt+0OpKDr/G8R31HNvST3X4yfyIiEA+0OwuGQDNrlQ4phwnvxl+CC9AF6N/Bf\n5U2O\r\n=sSoh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"47d0eac6db5423648c3039e0d5c8c3bcc1d8aceb","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.2","@storybook/router":"6.1.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.2","@storybook/core-events":"6.1.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.2_1605937842642_0.3118954549575621","host":"s3://npm-registry-packages"}},"6.1.3":{"name":"@storybook/ui","version":"6.1.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.3","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a6275cbe534b625d63bd1225689498fad6745d6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.3.tgz","fileCount":251,"integrity":"sha512-hV4eaDeu58ah7qkDzpk1eVvVsc+pgE3CmHwwHU/gBG2ob8Z2EkFH+tG1SOe/FQanm0ovqWBGUnX+iSaEr+Y4qA==","signatures":[{"sig":"MEYCIQCdtPH7rRa7IJwLZeAOQRU7UkLT/T9YtzKg/dw/oDUDgAIhAOohEa0dVYJC5pVIn/05A/FRz0h6zpCzIMXeBn+wERp+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu9nwCRA9TVsSAnZWagAAuzcQAKNmnZavptP/4VGQOVj4\n5ySTYUzw/LBs1fdidNhn1TYcbTIOAEIblkAiMTWcSrmUbghOxRXZJ9m3dehQ\nbHPLI6HhBsdzyfUDL8RVl4SzRZKotRGmTNFFg8bxItCg2BTnRPi6zZ0aREEb\nMa3OQsiPxWv2hw8ImX3Em/RmZOQpAGCAEegR1Jg2iRBO7BwGMQoA2Pl9u/tD\ncV5ZCocJF8OVkqCKe5c8KHBBsh7UyxB5TZiY+YYndcnAwhKFiFC8KzvSnrkF\nAMEk1TpUMMBO9OTjdmNmiXXV9/4HkZj15oIx+YdSXkB1i+RKhC3yApFbqW3S\nf10b2NMnUQ3qHnVX2v7cCi5VboUp+oUv0PYNMwXohRB+AOEmlLjUU0FmJ6aU\njJm87azY1YEPMSa6EE13rIMil7mlwRyXdEyBcMPLoc4AV/DqKo7Trvz8YGfs\nbhDC8adNnZXvBvVik8wJpbl82If/lK/PZizGWE4kYV6xYjDGAM/ZcEsfBOPM\nC569/5WGYtqe2ClL4B8j9No5HojcJsGY/5vUjsAZCCzfsYOVTntAn+Z48iEE\nLQZESYQWixs8Ckf9oDl89Slf/W3gNsJmWoKh2FnyK9c17kil1phmz5k73gps\nZjGlkvtNCaLLdl0luWrTrFBWyp+/nOla9N2mfMeVYIoOfP9hbmdmhNomRoFV\njJqp\r\n=3Yj7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"fc7dd4f63be1df7cff830a813dda8ff97e10d30b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.3","@storybook/router":"6.1.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.3","@storybook/core-events":"6.1.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.3"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.3_1606146543451_0.4361545618242628","host":"s3://npm-registry-packages"}},"6.1.4":{"name":"@storybook/ui","version":"6.1.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.4","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"74f98fbf63bbe5d55e03f005df5867d77f2f1d11","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.4.tgz","fileCount":251,"integrity":"sha512-kpI9tCXllC7oUnpwbZ9pVta5FWkF8RJGDxvIfjYaTmlaOKwN3siVVbYQLMHdCqyknYXPWdvT5GWzkyQlTCjI0w==","signatures":[{"sig":"MEQCIQCC7W6ay/MTdkx2tQ8R51CHYIXgTllPNY3ha6FN/ihjiQIfQ7Fetwl9Trd86iWC7eRFywVfcq7vbg5Y9KWif4pl4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvEyoCRA9TVsSAnZWagAAFigP/1/MCY/c001lh8uJ0dXQ\nUYISmL68PF9fwBlTm9CSAfdxEsPTfHpW3OyQsutkInVpSPT2Y+JmZDuSS7X/\n+/sRHD0wmzDwu+AxUq6kW49G69LK7EVQfgbcfbXt38DvknrJm6zE+fDHbwFp\nacwWuBONzgjhG9KpDbk0tEgrbOzVh6XmE8yXiXcj+LFkkNaCOgls4dsKW/mj\nxw2FiooVh05X99fPrTtb9OVY2AO8K64WYQtCErdyyhIBQ9pcRp0jNSvfa7Np\nUifxeBbixLIrurZKYiiaqZk+jzjMn6vGMTu6k5dpeg58YwDkWhJ1bhWr9Li2\nnDHqQiuwgVCMtUCZO9ZsqYtnU+DRvZtabg6E1Tf0tF7YOOgSBzJ0UIHFeNGO\nW+SkeaclyLlxMQQanUA0+ie5Fxgw08Q/lDg5xz28jUOO9vTHBDwSsQYTq7oL\nTaFj1SGj4dMsDm5stjbwooThjzPRzqS++9OLsd/Ux1KZy/sCRYoTQCHe5rSJ\nh3bAX4ZDr8bg1OKLljpp829PzlKYX+kU6S7O2beI07Ka1WR7bdIxfYhLbRGA\najnuyGtvylA4Ce6eUMHlnO9Bcp8rSsh0cz4ubfrymFAskokV+fcal8t92fo/\ni34gX5Y1EsnbG4gBItsmjMA+lfSJfu2O8egQDA975sNsLzjg7EKL4tRGwVBx\n73/i\r\n=WPCc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"2f61725dfe6f67fe1c5bef5b917715930ed0d7f3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.4","@storybook/router":"6.1.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.4","@storybook/core-events":"6.1.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.4"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.4_1606175911713_0.7423108937128382","host":"s3://npm-registry-packages"}},"6.1.5":{"name":"@storybook/ui","version":"6.1.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.5","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b9ab737d3e3e06d0bd0284298fd9e3dd8edce33b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.5.tgz","fileCount":251,"integrity":"sha512-6LND+VEGN6mbFZ/zc1AvnzLs2ISXN2oSnoceVv1L17sIhEkd5ThqsKUqBA8RoWXJuuJ5Plkz0/X2fTtpcL0urA==","signatures":[{"sig":"MEUCIQCrozvMRDSbsb9j8e5qO4bxFLfX1o4eWdCrbNp0touCxQIgMg/dKY0UMgA0i6SCVRKUVCA+sHYY8fwN2YRcKiaRcwg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvNCGCRA9TVsSAnZWagAAXpUQAIM+5zodcV4yuJAmxbbi\nAFIpe4rc2dI5QEFZq6DMo0LpvqWQz6cu4dc0Q0I4CldO3qhS313CWX2KjlCs\nyOTVKKNfox3UeNKTjpJkQj9uxHT8jFNXPPjgHO5QAvTj99Uwl3WoEDsjezXn\nQu71vsq9ehVabjarvKXOZ+9wBc4dz7oOmsl7t95FDTdqGIHDm89xmcvPA20I\njub7xaS3YB6yxnc45EeU136QP5xAp9ffn9F4JFE4f6EiPm9TvNrhNqi95xt8\nCFIyKhlRHyMQyQnXVIk/uPmlHpRBlVq481diKu9oP4eoA3WF4miBdSjHQEmb\n+OsBNve97QXx8lmwIlA8rACdRu5YarcQO9PHI4iphyMzcc7ngZTYtLq9tPOv\nTJJL2UHvGNBnvCaQahFr1dEcmz6KLwP8p/YWs+DV+MSJzl1e10Ov0zjgMXJU\nKJJGK1C02+H/rUUQgpwvEndDAe9FDiuyaJkYI5a3QRqRCVnYxNdxQGG7489e\nGXEgwKAS8X03cBBq46A6KX5r29R7i8JovlP+/MASBm/yteB3iHt6gW+FErL1\nQi0JW5dwqef7h/E7vwhKdc7J/CEJDUq2iQdif9ApPbZSm218DxpbhfuECWyr\nvg2jeORxu1AIzL4xl7qtfhLXft6A6mIqHVYMqFvmxVV+iUy7cN65Svn5gCcX\nbv35\r\n=w5d2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"2622d8aa6d8ba207a4b03d2ee1d7d9f083fba48d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.5","@storybook/router":"6.1.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.5","@storybook/core-events":"6.1.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.5"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.5_1606209670018_0.5576546128092963","host":"s3://npm-registry-packages"}},"6.1.6":{"name":"@storybook/ui","version":"6.1.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.6","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"66744ac613902525c0219103afa43c513d18335e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.6.tgz","fileCount":251,"integrity":"sha512-YR3Q9FVCf2ao6f1L3F2w1z5EYZQx/ljmyWNBfaKicD6a65u0KwgCMOiTl0KrpRniVl6yKhBBkPUbTt5sgewUxw==","signatures":[{"sig":"MEQCIHKw78umIg6+BteCxMcHpDVPWdh5/jE1FntZQiUVW98hAiAjGwS6yHYu73VWPWR4rJ6XbDeGDXwk0xZ3pJFv+nx/NA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvaNECRA9TVsSAnZWagAAm4EQAJ0BybjneUysNgWuaCdQ\nST/bTThe1eOYJ9O999nVhbBZMRBRNZCgyzKYaoKwr5GL7s5htCk7BDtNho/t\nihRXOLRXbTH0dlYCDuN8ykIiZnCW49+i9N/EXDxOCBfNRf/qquKjLFpsaJZU\nNYyz9ce1OnHe9F6OxDATwsJYRZZCqBrqJRXsJm8kFQXvu2q65Qm91X6AUyCz\nz9jgraYs5VhKjt92vhBNmpm/CmPeC40HirSlvAwZ9XxkT6DQ57Se6necQe0R\nxHghq/3lqmP024sqzlTcuOLqL9WuIS5SEe+adMiEcwfPyLSZWjtnRzxgdXqI\n6q3sOYOlkjPyigYRpdWFexRKSxBEjp5i8rBTBnwX4v7jjFanV4WVP7csw09W\nPKXz3/A2gLV4219wiyDrS3QC6Y/tZpjICwtdsjr3n6kzHK0bkblP9rHPzKd/\n6WnE9GnHIDwG80d4RB4H6gQ58MHJcKJNhmQUVVR8/7Azl2muMzLGvBrZ0qGc\nv1z7b25Uw0morkonznoIOgoUWXp8UWnN0G2OYm+94X/jGJ/dUahsXOHZTaUX\nAkuYJI8MIdLrl7TpEdeiNCZfbCa/KXM0tOpu+wR3N6tuoelfnUmRVv9h5r8O\n80dNcF+pFvwrDynnflZFk0dw/3EIMcEtLUJroWHhwrKYcVNoBRPBIxhjdS/G\nt2UZ\r\n=mKIK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"1f89b5b967974abd3badb3b63d88303dfee4467b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.6","@storybook/router":"6.1.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.6","@storybook/core-events":"6.1.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.6"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.6_1606263620033_0.1848157721592134","host":"s3://npm-registry-packages"}},"6.1.7":{"name":"@storybook/ui","version":"6.1.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.7","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a42332aad8688394d92bd2cc3bcc6fe599127642","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.7.tgz","fileCount":251,"integrity":"sha512-HfZmrhrdtm1WdbH5rj4i4tfPutgEWUADPeo12zrnlsKF2BJpmHQtHQ8cUN3ZZNBoGbHgYf3zmb1reL+n4yBoyg==","signatures":[{"sig":"MEQCIDGuqrBqljqrndiy8CBvJhtxpp+GJmDj0IwtKRkMnTpeAiBnkv1mzncL3ICsz+ODkqbsg5unQt4Lk19hFTAkh09aBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv+K4CRA9TVsSAnZWagAApfoP/1A3/z9/a1uhZru0I6cM\n131j+975EJ7o+23YheS+jcmCAPelJRYflVOadXVxjvW57YJFUM6IeMh1Fwt0\nsv/OpKy7C8KLYVgzOFygm+4qz6adIB10XEYe1KHbRMNQUB1IrSR+oEw3ucnQ\nOAVXPipVItjdh+fA12MImi0zgJuobCMjS+Ni7N8Ap5CZak6shRDMAL1uqSk9\n3czV2xT85DFQf+BUYzAUDY1Q07gZnivj16jgq34Id6jgR6C6kUH6opBfr3Eh\nsrN8GZszYUCcW8UOSg258FhlVR7ro1KziYc9wxiIfpMdfZaoB1ujiPOZHo5L\nKXT9+kImpToH2juqG9Cw8IrQRGj+oqauJCjKnX8Jw+Pw9S0zjE23ZDI/J4rG\nxxSKdXWKC+bjUctlNH12htXP574h+/6I+DNRBBmbQXEgh9vIYdSgD6NyTPy5\nVTe9qmJXr9X1JeisB8ItatSsuoIZXM8vw/GkfGNyL47iV36JBK7VxM5Rop+b\nHCcqBgMkOoCQx/emkN7kA4Z8tYtXGnjVfusJQKmQ/KQY6ubHjkT1n6dGor5j\nbCEBWjQ7s97QrKsPXSiMM+7HOuMxTmfG1tDh49rHqUqiwkIKEAoKTjAvsy1O\noLcAI48rlBHsEoyDR9XWO5CLFXVegb4ZJyxk+e2v1pxH714eBGHpgh1K2+DJ\nejnQ\r\n=kJyo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"303d951f9ae4aa2241c9823e1cb6edbfd50fb093","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.7","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.7","@storybook/router":"6.1.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.7","@storybook/core-events":"6.1.7","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.7"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.7_1606410935946_0.6230680472571009","host":"s3://npm-registry-packages"}},"6.1.8":{"name":"@storybook/ui","version":"6.1.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.8","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"196390b9330d7d1959e3f2f681210b647980a4e9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.8.tgz","fileCount":251,"integrity":"sha512-2UTXj2a7nB9dk0Hz4jTKTWP3EXEZ13Ae1/i3jRstMG7DcDM3BZcbM/ueqTpgI2usDJKPWXlxIK0K2j49y3T9nA==","signatures":[{"sig":"MEUCIFMR0ip1c21zl1ZboJDEwQiB5gXCtSC/qnXxm6PvuqoxAiEAj6ELQF/EQUbUMJ7wcGi0yxPLkPFTTnlx5UeqqGXVVqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1526436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwQ0kCRA9TVsSAnZWagAACEAP/0iVJcXRo16Oys/C73B4\nM6mjiFVUdd4voF1oVuw+s6c5cjbxG4Zfy/hUwHrOkBEV7qMzUu/1o4LgtLmB\nwH3CYjDrhUWsFpuaEzFTT7GDxVNacD0GnLdqZ5yNhvgwEZbRDcbvnCfG6akg\npGj4eeWwyyY0hCvMMrkTiWigRgBlF0DhD8EyAFgjtRwRPcPwhzt9XeeS8XTs\n3zwaxkaaoWTXWpbsIVF7GyWrJIQnAo8S0n1oj0xIp4E+KSOvmkNeD+QzPy+m\noqomqc2IUUObzkm5Sr9d6+W2+UUCnyCtnEdhbvVoROuWo8E4jPFrlBOGq/2B\n73IHcq40jTdF3VhW2a7UdCgzP+vFp0sdvu+D2fAaZRa59/JiIlmfxgpkIs+w\nBFXJjpq9pBz/aQtD21XRiplS4RayXX027tq1BWrKYaGqb6Eg197yfMx8b1Ci\nu6GbtERASM2i8DVLhj4tT2TwHOZA9fKgfKZysZZWzs8K9ColcS2JMHBsbNE5\n9gLrkuwObOjnMCIjsKpxuugR/0o6ry+kGrbUecQa+LLf528MzgLWPR4wpcs0\ncvVkBvbb/hiiTUP5KKB00XyhxiNgh8vFT/WQ8hqKfdVCqJw+1W+kmYi56gqF\nTn0L68pGYHNehig0hzyqBp0TgJynX6+ko41jkt1EO/4vmOnY/wpeuueaCjNz\nxEtB\r\n=M/Hq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"6c4d0ed4beea726a121cddd365cc5258d6828be9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.8","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.8","@storybook/router":"6.1.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.8","@storybook/core-events":"6.1.8","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.8","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.8","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.8"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.8_1606487331573_0.37578985007188215","host":"s3://npm-registry-packages"}},"6.1.9":{"name":"@storybook/ui","version":"6.1.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.9","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1ed3168d9fe5827285c13d8507dd1fd872830542","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.9.tgz","fileCount":254,"integrity":"sha512-4MK5iTf7kI5DYVeWRiD6lkXdd0S6eiQJu9lvWqMOQJLOH5Bq77g0Ejo+38RTEQpV6we7hCPWWnRXQBjmJ2+19w==","signatures":[{"sig":"MEUCIG6FAIJUromBDsOAJ0Q9H1+t9Zd1tXdFaNlLApr5/MEIAiEA3Xhpwb1icj5NCgc/QN8EyGZgkuyVYIg1pZOG55091ZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1529395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfw5tZCRA9TVsSAnZWagAA2zUP+gLOpFRV0v0q6vnavw++\nhWaM7hCqdRA4Xk8fwxrWZ6URUoDMk/WW5Dk2ndoX2U55jiucRA7SYsGSpWKv\nspwY1lFdJTRpsk8ClpHCWztIqSm/AIDAoyLK2mOV2OYt+CYef698IsgxUAno\nB4NB90VUyaCZb8jUAtDI+P/phoZgEJfACA17i23H2rhzJmDj/2NtObkgWEhd\ndKElVMRyDInIG33yO4afYRALDFgefZ3BBA/aBGXhFqupEX5odYPUkIoyR3wC\nz/Zw0wq9xpCc5/4SFq84mYHogeSqVLF++I07OVyqUg/VeXzZrVjtKeY9ku21\nRWa2H8HPxux+gaOqAEtJIZJPS7yuOLlLinNfinyPpUzP4X8J4hadyKy0NC9l\nTVVHVTHoij6/SWc7iBIc/ugkk5nhnc0+bhSm8GKYQfRSVlTGqV2H+l+jjF1S\nqb82QgaInbqAKIDxWlHTNtFQZ4IhT70rUXy/6Nzc7xhnEGl24XcjO+NuDZ2n\nx2xgnvLHdjlwe9az671TRZDVRCLFRhJD3tzQigVX555Lcb86XBFuN8KzduOa\nTjxw5/Za7mGsqQ/MYuaX3WLWpBisBGepUQbvAE92uOv+olmyyzcWcC1ejCeG\nHBO0PR4BPwmGFP4By9ZF4gEasNWe4CBaT/ONb9b9RE5xm8n31kBZzQeB9b6B\nPxVS\r\n=cASl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"495a468d5eccaac706b6b8b52e9dbc5a484027a4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.9","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.9","@storybook/router":"6.1.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.9","@storybook/core-events":"6.1.9","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.9"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.9_1606654808986_0.3733430072975923","host":"s3://npm-registry-packages"}},"6.2.0-alpha.0":{"name":"@storybook/ui","version":"6.2.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.0","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4bdc335ea69392c9f7923831c872b73860ab5998","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.0.tgz","fileCount":254,"integrity":"sha512-2RjnOmzsLkEwX6zKkt4OtVEzSII6SmGP1bcIfwxITQRIRPJizWcAhjQ9V1NTusdMQ6z0n4fFT9LrxCdSIas1HA==","signatures":[{"sig":"MEQCIDD4xQt18a96GNIbXHSFzDvxl2sXr3ptY28MiqRX0cENAiBUnmphFo5GQncJaWGdftnDkFn5xgpJeKmA1WafWEFz9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1529491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxb03CRA9TVsSAnZWagAAwSQP/3bWmd9iMq83YLfjz7Wu\nfjcT6OPr2d7RypRiZwW7q1FPcZbylK0p4IsdH1nE3i7oYPJir9f0AXnM77Oy\nvk5z/XsBFzZ4bAHpeM/u1HSAKL53AKo0gSU76xY4YCSzDc15yUlMX9Fbqvz/\n1SDDJ1dVgg5k7k2N68I7WgaRzX0dj++jSZUS49zVCe9PZ6VpvbPlvpRKJuHd\nQNm75H4cN0TyJF1KKH2OzXCEGR1cp9L7kM5aLxbzn8V0dkeEMRgR9hDt9vOa\nKj3ORW34YwyecCjvfIP1zfIipC+q65YGqg66eHwhzkcJ+03FZ1LkO8dYBkRo\nghgpkybX5l0DwoOLm0N+EmGQ/1pXoRMaa/ujYWMIsHvgyiuA7mVWa4Co2LQw\nBPPYM5gqRjngK2RZNEH7pRhMSPA/adi1BKD223xr14Vjf/hkW0eu3xtTYP08\nvT98FWiUbCnLZ9PnffPLafyLB/VBBMnf+TsJy7qRsdnu8vZ/HgpgzDLLBjJ5\nperuZEhG3/gdpjg76MV1pDJsTISOvJqi/VthxbQBUlkimvCWEOrHI6BmUFaB\ntNNQPPyzxTAnElEovnrAUmEbqiHh8iTeygZflc7ntsEra9tGwSoAXnmwVQGt\nEDUMd/IouRDxR5gVZqfYjKJAy/sIFMoom0Npg7WKK1GgBcZMm1j+UKmequQZ\n9aui\r\n=I67g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c44dc96274577a6f1c4006c88b0f9db524e821c4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.0","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.0","@storybook/router":"6.2.0-alpha.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.0","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.0","@storybook/core-events":"6.2.0-alpha.0","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.0","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.0","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.0"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.0_1606794550833_0.6847377149814997","host":"s3://npm-registry-packages"}},"6.2.0-alpha.1":{"name":"@storybook/ui","version":"6.2.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.1","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5a492c09dc2a18f4a73246aa2c4456924842602b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.1.tgz","fileCount":254,"integrity":"sha512-PDzyt0HWCM2LxaT67RS9Zo/B4HWJ98xyRuAfPDcyN8Lx/IhWNpyAcgjwu6F9+zsNhcDqbQ3gzzRqK+5zNXusWg==","signatures":[{"sig":"MEYCIQC2ZoIDj562Qwehtdf83xk7zOUt26TrC8s7WVoUBx0ARQIhAN8rUPgTQO+HKZJVt79RIKDP6vS6khdVn+YUeiwePAyM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1519900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxkTTCRA9TVsSAnZWagAASW4P/iEO602P/cmLYC/TbV4w\nNOB9R+PDo3mCuLws8TcIHRAe8ZEE9USgGN9k7Zq2JVmcKhhZnhB3cUnmXcEI\nMG1OXn6wYNiY+pazGMASoofyyYa2SIQXWxkg63r9eq6r4eiqDXcwz2eyG1hX\nVSq2nnRhR8YjZGeNzVubkN9Bpcb5W+SSgstgavNI2Y+wCwNHPkyzaL3vYSdB\nFguiJu6EA/sVbPRuhCa15K3Z3DL48FMxnZh6VVUF9ex+VO2cMjJCfdRaXXjM\n1Ui/0g2N/x1RtWY6h/TaxKqOuDUCDvpKxuGWPfxsS32Hi0Wibw+GnndS4XLB\nPWtkF6I3xIDgBbt0v1MNOTKd0kOcD90ia7pJRlO7wViF4yaIdd+CbyMejqhi\nIV0Bttsk1SEuOWSZpZfEeLeUM4W51i7q0z3QZeIAemngmuTHbcLmZNB8N1qs\nBZ/xuRAxpxESEeYFuSFkMVc/2L3saEY+UmBI2i7NzlN4CZS2hXRKkC09e3mn\nX6NFpsJ2ESL454hzqdWXdv1s94x0uJKwIEawODu6BBaO14UMFoueVDcoX+I0\n8gQkibCyCrNPTq0UGTYTe1ZnnEORA2SAPfvVNLXwsHlNax8F0TeTkHMVQcZI\nggUxbyAKQo/W3ZZYuQck6K74x7Yk6r9vAkc2vQYylBHiZ8d2lOExgZ6YoAVV\nf9+V\r\n=aV48\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"211db5358500cb71c73d6183e86f40df1638752b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.1","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.1","@storybook/router":"6.2.0-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.1","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.1","@storybook/core-events":"6.2.0-alpha.1","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.1","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.1","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.1_1606829266853_0.022585377764495762","host":"s3://npm-registry-packages"}},"6.2.0-alpha.2":{"name":"@storybook/ui","version":"6.2.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.2","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"09fd93dde7a6e31bec502e82a65e2494fabb1f3d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.2.tgz","fileCount":254,"integrity":"sha512-02wFkSm6k4D9pctXXgYFTH/dwSi0Bqh5UVHtxRvgqSFHZvgec5J7AlwMTC3RJwR7wKVg2ZAduJ2jEwdB/ShTwQ==","signatures":[{"sig":"MEQCICbcJWu86Hih3G2VOEO04Pzvm/BuBdWE+ikHcesAfe+2AiBXCqBh1SQcH5gvM+8DGAiDwAuZ8jYStVF0RQKNZ43Hwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1519900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyJW4CRA9TVsSAnZWagAAzr0P/0Bi18cmHC+oOWSZ9GT0\n0CRElH3GLoOZIYc5vrrU36irGqa09Zd0OYhyYvQF7F46AdfRJBW/0uTsdS8T\nMChE7VU3UTOCLNMjsVoKIM6le5/g34YFpebFIg8Tzp/gl1bHK7+LnuM+pHjp\nl4FybKY9pCrX014jD3NLBpWiWliWSV32pLMgg68YyUMqTidF9Vn+SjkIA8GL\nQKPUbCrgmCXBL9boq9YJOMwDshtzDAAcjxg/u3ZYA6+1azM09PHY8S4Kn28K\nF708+npa8PpAmDgGEtpQvFOaLJTjviC4Os8sRLhiOhPKrY04fbbD5+G0HZHw\nggMQRLvqbT8iVwUNKeOH+Weg6fl0yiS7NG8SL2dTXOHBvq2hmt97zH073DxB\nSRND5zxKUItgwJd3gu8oQQ39uojLcX0z5L4JAe7mlIp1A3qsZvL7Rnk5Rxro\nRfAmPF8PNJAmw7FzUKMvzru4ixBblLh5l+La7RxgJ4YHV354iRSXfbpOMsaB\n09hQvS0EkotymxiFbSSaWfki0z//5YvIlUuIb5XzZ5evNWB6BvgAzbWDcVZb\n/CMfuwkKULR7svFMYj33Aj+r80Lt81hBSBMnxqzplz727DfLbii0UjOhIWFK\nZKvUIAqJUvNCTPTc77H0OE3UCXuGHxMSfNgBzf1siKJ0vWHCEwEKkbVX51Xa\nGwAQ\r\n=c9Cz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1b9dcaec9bd853c813b9f9001d00bdb89c742e66","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.2","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.2","@storybook/router":"6.2.0-alpha.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.2","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.2","@storybook/core-events":"6.2.0-alpha.2","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.2","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.2","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.2_1606981047722_0.48614134737129056","host":"s3://npm-registry-packages"}},"6.1.10":{"name":"@storybook/ui","version":"6.1.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.10","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7967765decb2d5816c61633712eb3f55d57249df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.10.tgz","fileCount":254,"integrity":"sha512-py3wkG3OxOrYsPG4Kq1c3JP88fZ28/k7dxpx85bH+9N0wzMbxAlEvbA9E01Phv64aR18yPiHjAgJNIw5DQw+gg==","signatures":[{"sig":"MEUCIQDGtGQ3ZSmPWrSY+xSKJwZ8WgAHWs3svfohOEIon73SwQIgQCzu4S74IF5x7og+FJADpQTiLFVI0pQQGULvyWPHKa4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyacQCRA9TVsSAnZWagAAavYQAJOtL6NY5kYiRBzdUyQq\nFKeAj7Mf8MQ133ZY5YvwbaSBk4oqqn3aziMmYxXqXfrNPCY7QCbYVMOvXEMv\nOMwgbUewql9/Lwwx0EDN9XLWL4TP1/o/lvR93K24+6mDqy0Xo/TmmgC/KyiH\nIzEpeylTabgnAScoB53V32xCnNJhxHaMmjPVoQwpd7ShRd2HYwu7/G5+FyN2\nfvJdD3SMvoNCcgqiJXOwnb1QVvwl3VcMKb4ET0WaYxacpHunPlnxZ+RNNDn+\n0U32pk/G39vrtb9y4tFJ6fGnMMoH0SFhg131ceKdLqpqm8ysMpvpK4WkV1jP\nQ46gfjndrOu0kuywF7L0lvydxo++jIn4xzIiPTjsVLQBTQ7J8VxhAumWBRrB\nQMoq4lO67cYpUlZjRbYkxKazLTAUbj4D1KEo3uj9kBDKtGu1mzfbxn2v7ryi\nc6ODw3AA7FUwQOgbjT0t2j2xSZXwfENE2ktOIP4FggYzZVHPIJQsLr5dv8BK\nxkeKv5XeuF7SDqMESczoq/Q2rXBh86QUETqU2tGNLtCVEAxpewThnhBv7Cpd\ncj0uqv9H0NEu4qSXziOh3UqmOR36VuCC8b81rWdYkfjOdp+2cx9UPKLilNVA\nkGqduTag2daFvziWClpBiNUu7P1bL8Y8LnPw1n8R/ByucC0unXJYce9DY2DX\nz7Cv\r\n=5KqA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"94ffc5dab339819c9f3cac71ddc509a59db16c05","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.10","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.10","@storybook/router":"6.1.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.10","@storybook/core-events":"6.1.10","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.10","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.10","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.10"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.10_1607051023961_0.031126137741747995","host":"s3://npm-registry-packages"}},"6.2.0-alpha.3":{"name":"@storybook/ui","version":"6.2.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.3","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"28b638d34e5ddb3da1704a24dec21a9369e14bd7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.3.tgz","fileCount":254,"integrity":"sha512-7nLWyi3cpRBfGzBA7x5o/8kdQPnGk3xYfk/FJhMQOVKdIVQYyE+Do7+nWPvY6vDq0jheLSGPvJI7RgcYY7SB6A==","signatures":[{"sig":"MEYCIQD6+Xp5Mf8Pcur6Sbi20WBHs7nsLBmvi9p18W6HzcXgmAIhAK+hpL2hnmN15E03f94w+tiKWRIn9ix1195KqXecT5jk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1521844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfydx9CRA9TVsSAnZWagAAj1sP/0+liygwn3yjY7l2fpam\nmoUY+bmSVX6b6XpOgMNxRd5aB7q73u3DrRZWqII5zelTHwj+d+SX4RYM9HNg\nctFmETlUhKRt+BiQQY3mx0zwcsHrTktKGCZ75ev9e3cDCO1YkQRImgmrcdoX\nOkoCLlmn1xRh3N48pUoOeIhqv/pYyATa2FU+bY3TihvLmXThcM1k1AbzsDSh\nwnCV+At6HsxZde0eJw6HbBFb551kAdiPJovhTuz16TKM8I2eoNjKmiDAs7mX\nVP7WyUUdBtSLsWCU2FjMUHQfUt8Y6Wtfv/laEHyYHEv4Wea8eYyoOYHMxNo5\nDHD65+0vAm/ldrvsd7bewSbb0p/77FglqNhG6TDm+scq93efUHXNzETRUv3J\nTtys3uLXDaCEyvbicEEBM1UdCHd8kE8vwUp17dsfvPp2jXa6s1Lvx3/gR8og\n6t18EG2MfIhV7JAIsui99fjeqvQzHGHftzOObEKTrnz088d70tMvz2LzdwRu\n6pvlQN+44Xk0dmII5MThQ9RB7WwyjZAb/U86UvhF0uAf9aqhdqQo0XqZWiPB\nB8PJFXYcNr/CgZvbEBjL97onAfz0UGLQOIdRMRwo94MhYNz3IhEFAet7EXI5\n3akXBp6hRM8bNVknIJULiPoTUpNIrwoOcup+O5rDOaYk8szAehodAWPOpyGZ\n9Uuj\r\n=83k/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"70078d0fbd3af8290e82831109a00eddd133e4db","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.3","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.3","@storybook/router":"6.2.0-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.3","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.3","@storybook/core-events":"6.2.0-alpha.3","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.3","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.3","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.3"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.3_1607064700687_0.235645275182631","host":"s3://npm-registry-packages"}},"6.2.0-alpha.4":{"name":"@storybook/ui","version":"6.2.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.4","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"debfb109670be3051c1571348e635b3caaa476ba","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.4.tgz","fileCount":254,"integrity":"sha512-u/BUVowga5x/o0wsJB6GLBUtEtCxpydVMUPh3ZYJWDr0rh16v5rTDqCwg6C3L4UlUnO+oum7ZzhWARPTjLXcWg==","signatures":[{"sig":"MEYCIQDk7VFTY1TBn/vWx1E03/EXUjuZH8Qp904OzFt3aluKKQIhANMR7LXXcGlclY7prDRn1p8Ti2Qe2t7JBkp1A4QyRaBQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1521844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzGwVCRA9TVsSAnZWagAAbVAP/1Cd/Sk2X++iDiEEkkWb\nyBhGO0LgZr6FNk89Q8BuKwNyBx/iyU/A9DrmIT3Nx343LDsvpPp4FmePt2HO\nZVpZh3tWtP6gwcKpcng0zY1+ZILR48VyCBg7TCRzoVx96JClgiJ4PbYHd74B\n+G1iqFbafq+oXkL37Pnk13Ja//5lY6W2PfhvdONxGdgLvzay98j58GXQiXLW\nl0XHpV5Bm6Hi6ejYE9cNI4vuF1qSRcmlnOvJDmiaNKv6KElQbQXNq9Hfi4Kc\n3tcC6SvGg+dfGvBzJCZoa4LMSKXojoZD+TdDBBV/u8BX/0tcd5KABN1RnR1T\nrX+C2jHtPCBLvA2pOO4GL+rV72pRIioSVbyaUrmjJWqjZhNh5OFZhnh3h24v\nyKW6kcELyGs28oeo+QnjAN5c3DzPNtXssg3P5GcAGKeoi5mETzEALPCFjlbv\nD1XqsOfzw7eLvvL1Jyf9DukdlQCP2MmSO3jLGYSl//OJ54inBG8p4CFb2+ut\ncT6Lp5gUwIV4DqWsnCMbl8zBUhV/Te/WEX5l2hG2rlV5AdK0BPqJ8sUwVkJb\nuiwEGeaFHaq6T2j4cMXHXPS4v/i4jToGCNDQzH7Ott3GwgpYlDePWr/FzQRh\nF7UQrHMV2N+g69v0CBZVpkhfKUT5LM3NyG7dbgVzu+NeNY4yIu7KzqIf1ozg\nJQd2\r\n=+H5e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"59f78816e922ed7af0c23890f998bf3399b6b7d9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.4","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.4","@storybook/router":"6.2.0-alpha.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.4","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.4","@storybook/core-events":"6.2.0-alpha.4","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.4","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.4","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.4"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.4_1607232532721_0.5861386742837584","host":"s3://npm-registry-packages"}},"6.2.0-alpha.5":{"name":"@storybook/ui","version":"6.2.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.5","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cf95cb386184b9d0dff2e358688790449950a6d5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.5.tgz","fileCount":254,"integrity":"sha512-CiLJvRMXZbqXz5sedcybDSilGQNrn1T9bjRAwCuNS1xOejaHZcYbiszV/N0aU4E6K0lDTD+OTup+LC/RN35KhQ==","signatures":[{"sig":"MEUCIQCGSJwUXuOU6/mTivHl5+6ketKPbHGVnGD5FmUjymRm7AIgeh+JdgmogD2rAI8Em+vpvi0hR4S3Jyhs4jkKh30YQl0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1521844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzwebCRA9TVsSAnZWagAAkVUP/1byM/rd2F/KUpD9pIwv\ntE1RUKJ2wReYoru8agSBCoUd+J9DY+NtUHnW87cwuAqKl7bSDO4ftOSXYirF\niXvlbXVd1StzBbDqDhNPIu/jtx637/+p2HIWu6mc5yM/WzFLiZWB69NoYvPM\nni4mw1qQALZ5pR9rIw+j5XDoLMjWVDOt+t0TFLyM06hvx+nDBC1Fnm1ntfUA\nktStDemv28iPP/XXj04PSIEt3xumkqecLqvqbsm8h0U+RqWrQDnKDTwwIsyf\n4/7h080iUgzaemNX40jLmQDnE4rcar0izPbVLUxGyPjCpDy78/jCEncfA3QH\nlGeE/D7nKsE/nzZGyNFsqMNHmcVKCXD1/3WY4BZyeEIG5YICntA07W2/tKOc\ncKz2C1v4LThR5BrjKWEITaG1pzb+g2/Lu4bCkpn/JgzuDyzwkiBXuRpeO8JN\nNJ9wcJi/T/EYvXx4o1VAIXVAuuH38nFU6mIDk2Q2RdyBV4N47VZwq7g43ZyO\nqLhAY7g8f2xCaan31ECWScplkBhV829sAMiZMPoBGAclSxvQJmnJZXWX/UEM\nK2rc4WNNBLF0juYS8NQKBQXl8vwRpB93eHyihgrF6U95zXEnIGD+qXVjdbww\nVGS/+szNy0fIzp7TUZjjnhs8LhKiILBxA4qW7BokSFTakbmx1Th1IPxe6/K7\nYLUO\r\n=LVOo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"850a0d8b98f2ddab1cd4d652e9beac11e21a369c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.5","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.5","@storybook/router":"6.2.0-alpha.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.5","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.5","@storybook/core-events":"6.2.0-alpha.5","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.5","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.5","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.5"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.5_1607403419019_0.8830520320603756","host":"s3://npm-registry-packages"}},"6.2.0-alpha.6":{"name":"@storybook/ui","version":"6.2.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.6","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d4487ad21f1d912745dce1edf5e7782c734e8e9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.6.tgz","fileCount":254,"integrity":"sha512-tiDFNazs2SY9XGrn591X0G6H1GnqGlcWuPV6rFFRN7E+4f3D9Z9o+WDY4vu2PZ7fp1fz+q5fBoiYNNNzyPRFzQ==","signatures":[{"sig":"MEQCIFC3Ft8BIQZTCN+enwOj75P1Zj2GCJpKoCeNij7j2fFjAiAAuDqzI1dz+NdnpZSqkUxkEoErVPnJ2tPZG0vNq+dpeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1522252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1Dq6CRA9TVsSAnZWagAATrkQAIGWs1xoOn3sRzdo9PyR\nL7U1s1fhTBHR5mYbIgfGxoT2S73pLQmzMgTK/78z/KTj60FNWl6i6GRTCqvQ\n5FZL1Fqd8EIpFCAmP9VjjOv1R/7i7BpUoT/gldyQAL0LYIY7IUdX2Am4Hm83\nAT1nwy7edR0KzSET6RjbEQ77wgm8zPTMy+z7gv9jOtPObC6SpNYJaUmZC/cH\n6Oo4Ex2fa0T+TPUHZQTT/Ur5X+EGc9uD69dxUX8X2xw2GEhS8JJFj8Drs53N\nK3j3PDHOrIH4HeBmzzqs0/K+sO4/OwlJsfzOdG50ETQ/B7eVdqniPbgLid0g\n3YrnYNLy1SZEqh1g4SIVKiAc7EkFppKJynDDEZeYb1ozYyMFbvpFye01mKoR\n36v4ahODEReuY3WdKRHpei1SNYC+Qf2qF9JM3Z+QTuDyPkf1DuR50FMRbFrY\n6q/m32lYr3i4Rpjj9JuU6BrctZpmXqWHLRsEB1bUujUtERPO+mN4xdHy1wyg\nBOOfQ6ttOl72Br2NblEVRPApLgSBohmiFfo9+6s6gomKBwdF9C0mLIoXsmNP\nHKwFcNheItWQN/7PrxYcARkU61YnC43GamhUPPjb91CIMeM6j3FzQDFcU5r3\nHfnjfag143V8qHU3cz9Wt0Hn2Qn1l7DBoANNhBy6K3clMK6eYoe8B5ylBsdl\nUi/j\r\n=GddW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e741f5e3af491b8515668abd5a31fb8e2c201770","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.2.0-alpha.6","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.6","@storybook/router":"6.2.0-alpha.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.6","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.6","@storybook/core-events":"6.2.0-alpha.6","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.6","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.6","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.6"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.6_1607744186024_0.7825732414207245","host":"s3://npm-registry-packages"}},"6.1.11":{"name":"@storybook/ui","version":"6.1.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.11","maintainers":[{"name":"anonymous","email":"lshadler13@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2e5a5df010f2bb75a09a0fd0439fc8e62f8c89e5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.11.tgz","fileCount":254,"integrity":"sha512-Qth2dxS5+VbKHcqgkiKpeD+xr/hRUuUIDUA/2Ierh/BaA8Up/krlso/mCLaQOa5E8Og9WJAdDFO0cUbt939c2Q==","signatures":[{"sig":"MEUCIB1cDJAI0+/zUcyekxlpkAumGjptJLmpVppAOcMoFw/JAiEA3/GhWO70ge+Z5jTqoWsxrbtrrTovceOlajDTp6Rmotc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1LfsCRA9TVsSAnZWagAAAWwQAJCJjYeb7tnrkGAchNHw\nm2RnlqeM162/yIH+GHmNHc3nGtleOmPx/GcNw4+ubD6MJSI4hCqreJ4QTvDN\nb6cW95/Upd8U0TcU4rB8mdIWu0d31vgE2YAgjJaxsgAV1umsegXFarlbEFoJ\n8zJejIlpaIcHrLXFc6/BjJpx2ltDfQ6FKUuMmbWIeM2naHHOlWJXWPofQ/Ja\nJcOPEUrnwzQbnxigI+jConF7L49dedK/n2RqaiLTXdKJM5qTULkyojZqoQ1E\nTs6r6zNCs/Pb6ZKOYSEkfjuIOC94f19U4UEqOKidAtoHFF7cWKNUjXcoNB8s\n+yI2rVgn5IM6GDkPy/EmtXtiyQDvmEVAkh6t2b23h+CnGBhpSKCaKQlrSVrO\nYRgC/C6YQswSsvbs0HfbJPq/KKiC/Pk6Kxh9Rf9S+nT+bCgG+YqflNMqftRa\n3XPHhD1wEDinKZIE+WWDGqBREroD9ZBeAV2uqcjFjr7IcNTcPz2hyIWmUxnk\nZBjJ3Yu5K9b2A/8VCFCogDJHGgQ3YHLfudILVOsJINO03gfwl9oIBmV8R3tE\nsmAjN5M5UVDbOjfWtVOENj44sDzvIaFiZt+sO07KSNKGQ/xwa+mGg2xL0SMy\nN6E25SsnUBQykX8V4blc6fwyKyvJfUOaxSfVJBCOKajyb8q602LLKXx0xpab\n8p+H\r\n=CDLJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"5999b789d796414997c21d74517f7dfede6ddeff","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.11","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.11","@storybook/router":"6.1.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.11","@storybook/core-events":"6.1.11","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.11"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.11_1607776235781_0.8078048162250049","host":"s3://npm-registry-packages"}},"6.2.0-alpha.7":{"name":"@storybook/ui","version":"6.2.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.7","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6154fe6166be3f4205850b78eeb3e750ba36e2c3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.7.tgz","fileCount":302,"integrity":"sha512-Q/CNUlPRoD/h+HHKewfnBef5iUxxTfTuPyKCLvUngQtDQ7d+g6cPpRaxoBFqbDZyMottPy1BFQgzKlgt33tc5Q==","signatures":[{"sig":"MEYCIQDrF77xiSoGungPBbd+TdmSBTYU9yadDU+LOQtfdPeKWAIhAIJTIF45oGIigqNxUm+P5HVetNZoA/9P0a3ox8f8+sOe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2M2kCRA9TVsSAnZWagAAG0cP/2wTvPlO87BmQXTtdHZT\nDCwaNyBBu4RHFl1t47YgcleNTK9mOmdtpsiFG0MyPgN836RrSgYCZb7tcuXU\ns6aNG5skdOhYtE7AYoYW5bPGuqzpv05bBOig4O0M4m+Z7S18rIaqagroffzL\nrl2XuTnAoVAQeccGHEP/zrTPZKGeRnPY6fAMdsidbD8b30nene4wdrN8CbJ5\ns78WwhFPdadcT8oFgkmqCN2kNVaDVj6pGIqOHC2NJZCMBt5OiUT/qafdKsO7\nIFIBtpqxeee0DeAHHaPnowW1BVvCMegpXevYWCfpLZNwaDytkQzrA7INk3sf\nMlj99Ny2N4V1+XQc63fVTpQLynxIucSiqMsswXITLSClmNzjItUegdZKl6WC\nlZ3oXyIEeWQiEczI60GPonVsrCgP4Q4qZtPZN3EntUNkfXNtKIJOC8YWMnNe\nABrJGhmYIWjtyvo8n8kZUwNVmJmB4q/FMJGXHZ9T87f9G89LyWBNUgr9Na/8\ndMaXFEPLzhV1uJGsEG4MlIiBMc63OTOuF1h4WQxE44FC1hmhB9RcLM+1qUgm\nigoLlvj+saihmJuzBzoiLP+GHic6B1Xb9JSAY7JBreWqT4mealHZsJzjY3Vb\neniC07bKW3KzAbzhvAv12pDZkbrgvyGfLlnIEY31bWRI+rh+H1/+oMoM2bNA\n0PHt\r\n=p1Sc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ba05f6ae5e8062abee62675cb49dd38e5e3ce742","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.7","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.7","@storybook/router":"6.2.0-alpha.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.7","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.7","@storybook/core-events":"6.2.0-alpha.7","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.7","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.7","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.7"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.7_1608043940346_0.7150827856436857","host":"s3://npm-registry-packages"}},"6.2.0-alpha.8":{"name":"@storybook/ui","version":"6.2.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.8","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"afdbc70fb451b16b45c5a7445ccadc894b9de102","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.8.tgz","fileCount":302,"integrity":"sha512-aTO/fG6rPqE3XWLUiU04GMQx6aEBH2U8ADShWvsdJJTgo4fdjgf8zMpjrM/isVn1A5GZrCujkOqD9WYGbuN0vw==","signatures":[{"sig":"MEYCIQDKcRp5OA2dLkqAsmyTTqdODWSN2CrYIcri5UXylIIsvAIhAM1+6uy6nY2bErrBinHpfCO3atOOFPaHH8X0Y9kcRfWN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2h1dCRA9TVsSAnZWagAAoo8P/j9vmv2vPXxnsizwFfk2\nKs7drsA9eMSe568Mq0jXT+PoXiJEDOqi63/unDtP7VRNlWzKCgNlr5chcsiL\nXGgJ5ov7PaT6C12J9ZO9DHcRvTSgGvYySvZYvQcq9gBMnbWIZp6uxFTfGSlZ\nyXhKypkJWqZJJnFIpUDOqhIVQ8mZAsWkGCZGmsjXrdSkkIHTt6MEpDHiL4wP\nkCe/SMSUj/MB/s4JdvU075qdzP/VwVyXjOGpVgpdY3itJVeQq3C9XxP4bcFf\nzUotqBv1FR+uO1pBu6eHAY9chnlu0Nnp7tEQH+cvWBdim2f6ooVg+HroTeDi\nG/DHzK+5l/46JkGbwYteJXByC6fmFSI3Qox8V08O55VT/MYI+gByb1blFwFg\n2s04g2PQIRAKfzln/tveEauTN/qw/FoUFRvLgg0/u8ACHubpSq9dXfU+Nb85\nY1c7rR4BIJKklrlgBhWmhjk5gLtWlDG1CU0oErmxRMjGc9YyIQJx26XwK9YJ\nyeaQxlTrCD2LWUjej1LcvGl/pH59ZdjTnmoRU//c4Spgc2mxYXwie7dVfF5Z\nlU0L/rxZRQX51ukG1eKC4EAw391zqoMld/9uYQBDXSC0qV0mKBQRj1YuhhUw\nT2qqp6Cag4veoYx8BaOTFVxBXVWH6YrFoRCbyS9o5LYjv6dKRbvpX30JNajh\nEhI0\r\n=iQHQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c04cdab92d3832a904485f0f885a7faac7ebbf93","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.8","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.8","@storybook/router":"6.2.0-alpha.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.8","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.8","@storybook/core-events":"6.2.0-alpha.8","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.8","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.8","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.8"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.8_1608129884926_0.39033279518437136","host":"s3://npm-registry-packages"}},"6.2.0-alpha.9":{"name":"@storybook/ui","version":"6.2.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.9","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"133d8ffedc2daf80ed5c55bd52b766fb703053ff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.9.tgz","fileCount":302,"integrity":"sha512-M5cOu0Pi4wvwslXHfq3EEoQEXLx3/LN5HTGoUOsYR1UR7Go+2a4kFfT5ShlhZ3jm8TSw1fZeHjakVMcBA0IFJw==","signatures":[{"sig":"MEUCIA1mIvLaqJtU2SSI3RgWyCHjVPf6VLqKxoiD1uVlSnmVAiEAiaKEnkHxmPzdIhSgR7preIxzp03b+H+8sKG1LF+UgqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3z0jCRA9TVsSAnZWagAAEQoQAIOLsWiDovFgm9ajdBL0\n9tW3R+7JaEMvD5GbPTjetk0FJ6Eexfr691+IbwYEOoeOD9s82s5SSFzrfhKA\nh/tuTfNhgwsAIMQCbFi3gJWOit4gMIoBtkjKsbH5Fqa96tucAJOlRiwhU2QX\nOFKCRXUUffMkcg3phuUXMFz6Bxybh772PlZKvWa6LbOsoFlTniEn0IXdy5x8\nbhF6Np4gSfuM3D8XTCz6AlMSohvybYCy0FXUDFZYNiRGTs9z4VW3sfLzlATc\nf03BdMLcf/g5o2uCofIqG4QPZz5Qlv4SESZT/F16et4Jzo0m/gXh54SeLK1H\n47OKhTbyjBN+iQ8HB5Py1+tUwbnk5kQEeyxRFde5Y8leUDpNmBIWZ+ANU11R\nGivvydViy0ybAxda8g1QNz3yN/EVrb8+7MpDIr+qHgNixwueuWZGzX2eZ0MW\nRzDSc5455EP+/pvD+kPz/8B/kMN+gfXJunvizhSHPZkG4FDk9QPPPfugiqcQ\nAW55BLx+IOWQY+f5W+fb6xkzwHS3Xit5S1Xyi7R+UCoV1o38y/mLwfsvZ3eK\n79temHr4ZUcgWBOtFXRFsJy2AAOcBUw43/Gw09PuXsREfnYDMSlaj1p8HdOx\nZ88MkdIs3l4TqZG1ZWuqZaUONK7vpRdyFW+L8y2cDORW10XAhr/03kf7k7IP\nTeoO\r\n=EA9B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"47341be6aa61d4fb38f2c0e058af32f1acb8e0a7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.9","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.9","@storybook/router":"6.2.0-alpha.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.9","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.9","@storybook/core-events":"6.2.0-alpha.9","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.9","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.9","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.9"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.9_1608465699258_0.12085368498231608","host":"s3://npm-registry-packages"}},"6.2.0-alpha.10":{"name":"@storybook/ui","version":"6.2.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.10","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"170131e6f4d0b2cc74f32e76766d2f4a29d05c4b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.10.tgz","fileCount":302,"integrity":"sha512-zshFpgSyBphu+nNFMNHAi4c7YWOfXfQ+uLq+qLOFBgdCNRlrCLiEVDNiXZFKUHCTai5+P/SFWF7TySHv9fOZ2w==","signatures":[{"sig":"MEUCIEOTEYhMH25qt9q7m9+0EA4OMkA2XldkfRwry1ACl1ufAiEA0e1lP6+rMSLlPvRDbQl48x6Z4OtYF4pKLRCPzJmTcqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6Vb8CRA9TVsSAnZWagAAkKEP/iq+r7sVJAXXcntXb82Q\nARIKzHWIPNbn47dCY72FdYUgp19kppm/9avMNwfTvxeKFmi78JpUd2msAViJ\nguSHavPqG8SFAYOh8Bhcxql1045Xdes8f8asVQiODY9P9e0UsY/wxrZX/O5Z\nMibGD4g7x+6o/PQrUGRqamLlDrbzK2yxmS1nyL9rUAqC9m5w+8/GcKJ3UWN7\nYOT4QRDKiVrIi/U/Y3zbSKfnsuFBHOv+no5dOaR1+AQdubgl7xMnkv2FTnR7\nxsYvvmmFrdQWwHPKDc7OCLXk/SuumcSXm9ReEWIaOJxxCozPLCAQkg+kLZDe\n3bdUXuahAZbdELz0CCGE7L/WD/ETIdc6Ye/8kWPShMdIWtkMHDOdexMf8HHA\njynQJBwHtsuCIZbMJiHCFdfWZ4mchOWihPGjfsoro+OtNetVCcQUDRPvt7Hu\nlQT0ba+AFQchVUAU0RPfH2bkpW7yo3DA8R37Kwomh5/hrgB7dpS7URzssNhx\nkLF3M3JoSADydDYiUosfetoZYdDZkUnIrsPtm+1NlGsUEtNcZg5G+5jiQw6C\n6Ry9GqiZaya3kzNKJDnjz4YAaL8oZmzwwCGbdzD9ZkHiqkZCHVUF6y8nWVSW\nML8T9U3yhqIQr+nQBdnj0eDSnHtwRZy67UkIouXI66MO1lnPi24VdWUYDa2n\n6m4H\r\n=vxVH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"bd7f2bbed53a0bde622977b2ed6e1addb67d5018","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.10","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.10","@storybook/router":"6.2.0-alpha.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.10","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.10","@storybook/core-events":"6.2.0-alpha.10","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.10","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.10","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.10"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.10_1609127675864_0.049724194557470014","host":"s3://npm-registry-packages"}},"6.2.0-alpha.11":{"name":"@storybook/ui","version":"6.2.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.11","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bd98f4e6c5887819b6d6c6cfe3689c30a96eaf39","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.11.tgz","fileCount":302,"integrity":"sha512-IHLttQmGoYl5ImGv1ZtDSnUqSD5oX9R74WJfylGfOlgpODfWFwqjgtfCQr9NQODhBRxikHU8YW78l2FfCwY1sA==","signatures":[{"sig":"MEQCICcltgKFSXpGA8neyvcGGmACUOuQpIrkpOJ3yfZcvjAJAiAwGrAoWz29Dggm7pH3T5VYuRWE7Nl+VyjVkN+1TQsPLg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/C3dCRA9TVsSAnZWagAAZKgP/RPD5C61XAjHjLwHd8ij\nxcG61hXjFQZB/mgUhcLHr7rfk3C6PoDFakTpvxvDauxkivQLVAOKsIzBhhsT\nyxjIl+mK9CVs7yAA7AkoVuALAdrTvDgjDevKNFnHf54y3tLqGYZnNzkYNxB4\nERhVZnZWwi/1EPCR5dbU+qc4YVoX+W72M04NhDd2SJCbVH9Y1nD+Kp9rCzLj\n/66rNMW6TvvwI0RHyzgCc39FYCysMSp5Fs/WUGYBbx9z/apWOidSraFHSyn2\nQFDOIcThqt2ewddrsntg5AXSSDv4SYiD259kP14U+R0HEiZWEn9J9bsGLCWD\niDRAF+NBARwNdVfPBbtbcsMcObiQHucbHca1e9w5CQx7XyHsVBsWJXAyUakm\nYkvAjiI/C+ylmTPYXRNkXKx1Hwt4syvgDoLheeFieGIGNrmIY/mv5ody6Rqp\nu8OjJtku5PJHlZF6XmCPN/cCA7c4YlZe5jjUTOCVkAvd1PDjDyXkz2RK+/Qi\nOQnt0B3wh7QWfsSqfeo5XOyvIKiuBTIra0VUCj1SUZinEegJR1nLhCUsp9qe\n42I49T7096yqPVvUpGkHKATmxW/8qF0gUynJupiR8ar5zuHlxqbqW/02l9bD\nVUm/jdI1WvV8pMA+NoTnA7YL7jgDt/aq2Zj6eCb+TSniVlejOwJBzBLq2wIs\n849Z\r\n=W9n2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9ee9dd1c2f780051dec8d836428a1d03d4779f96","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.11","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.11","@storybook/router":"6.2.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.11","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.11","@storybook/core-events":"6.2.0-alpha.11","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.11","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.11","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.11"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.11_1610362333203_0.741901360724968","host":"s3://npm-registry-packages"}},"6.2.0-alpha.12":{"name":"@storybook/ui","version":"6.2.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.12","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"acecde8592c614124c5fee040648372aab5c0f4e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.12.tgz","fileCount":302,"integrity":"sha512-zbNnhLFOZ3AsyJjlYqnOp2k9NQjLvNZe9/M4DpIPFQKEsXkCxXhgEY+cGHFo4vfOe1jrUxYst5bY7y4kz/1yWA==","signatures":[{"sig":"MEUCIDkQlk6fP16xXsSzwlHGBRQhBZT2lQikjMDORxFqQf/+AiEAqjpOt4lHGTEqltZyfQLLXV+uJGzhEVTXSZcQEN1xNrk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/J3UCRA9TVsSAnZWagAApiEP/1tDlYkSt0FNp3tcNY/X\ndKwKzheauP4HgNj/eiXdAp1eol0OkNk8F0h4PoBsbgZzpG0hiP7kQGPG+w/G\nbrYKqZMBPlNQFlHgg50Lp9ualWPctW8mV4G6pEtj3DSG1ZrjMVDKB+T1DrOV\nDNUlXCE+Sv9+vsPpvrqzpMT+3r1d8sO4jY6WfedQg/dhuFDWRi8qDw6Jfl1F\n0KYFUgIALzgi/vY2/ubXVMCjcqk6XNVZhhTqZyVOtIkEGLCLsjDdhObJz1Kr\nBkmmIvaKlUWrG8hYkN7crBJ40NM/SwRJ22az4wyVCF07XzpjOk0pA5OQ5xf4\nSz4iAzxVwHlRiIji1WHH+PCcPMRLbMiSKZxqDAv2CHzSlkWwn71gNAc3tK9p\neypi4gfFRNU0aytvBsy4YzRPWE6bn4FzKQ/iQ3p+I7mHGPaIu8j81LOnP5k1\nj8KEadEHnw/RiRy6P/py3UoKKSTNfI5IE7+dqkr7ROg0eh1h32aC2ubC559M\nGuXnPPMBqGv/CSIvdHVZZums+be3ZbCqyMdSU0y4IKI6j4taZncJ/E0L7TSs\nZbo47jj1P8p1Veajnclsk7ymlNsF59ehIwo4u1gMKMEx68TASdR4D83Pz3mf\n5d/mGf+Q8U9nuADcbMxlR5DHap/uU8MbCQtVN/p9u+3M9h7pOdng3W2QjhEp\n4m4i\r\n=3Ic3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b362282965d10d670ac1efe10bb3391fbeb0755b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.12","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.12","@storybook/router":"6.2.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.12","@storybook/core-events":"6.2.0-alpha.12","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.12"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.12_1610390996237_0.9562932219734006","host":"s3://npm-registry-packages"}},"6.1.12":{"name":"@storybook/ui","version":"6.1.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.12","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f67095e95557ab2f12cdaa2700186321ebce6024","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.12.tgz","fileCount":254,"integrity":"sha512-oBu/qfuwJiCtiBso3hDvQBy3et18K52PKKa9Ow76AJmT9hAlHEg+BtDYV3VU2kR1w7nyOyEObbqMbobooZmWoQ==","signatures":[{"sig":"MEUCIQCs80zi0gAi7gUyiZhntXG+06K27QL7/geXQIJZUs8uQwIgGAoLKYxDwJqedLwayFbKSNAYfo9kDWdJSFdKSgbklJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/OHKCRA9TVsSAnZWagAAIz8P/iSxTlEgoW9rPTmZr3Wg\n7k/BS8ror5eFFbUSWvtKSgFzpIw3HdPdFA/b9yt5sTOjw9VNqcCTzROZUh6S\naTfDnGWiWeoBvIZ7PlJtripGk2+7uk4umqXar2yBB9fWNqKUqL9gvXUp6eFk\nyL6Rr+vwXYdI5Tmt++vTQ1zMflEVqXNrsYLJpKez+2HA+SVARdPR8pxZoeOv\nc/qzxNmMzkvLmL6FlZ7qUcu11oU6zdp8jDXXU3Q80sVZS/djG7HnqBdqlKJO\nF+bvJKYOuD0+THkQ0T+EMMViAxMp9q1UOIh688dudqrjlLEtiQGaBsRXto25\napn1+2EYwMcD0KORyWKpWMQD1CHYGSLzeXPfcz0Vf2tG7V3LDjymYf/OXCNW\nMaY6iAXjPSilaWRj4zBvQSsg7DAXct2CI8eSlnOWF9ejshJWfiej4BJeVUgR\n9bQ4ng/n8PKchVQj0Smj89lGFV19zU6DG+21v6aNPVjWgt1zvfjtEtpioUT3\nbGswRaENBEPTGQEnpfapnE1AAM2fpD2uILKuFCZNQwW7MG2paUrt7wDO0C8S\n9RmfGML2yA9YoCRXDMUZvgufTtihPMGWoW27d4nqIYjqDJbeggRgBharnzbL\nxfWmMX8MZfLTGZ04dXJGlF0CqSvO/wCj2Kz+V/1/R4mMe37SikVDr0yhU9XP\nD45w\r\n=f5j6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9c114af32618d516ae9e6f73700fbb79273c95e2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.12","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.12","@storybook/router":"6.1.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.12","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.12","@storybook/core-events":"6.1.12","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.12","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.12","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.12"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.12_1610408394266_0.39298379647930126","host":"s3://npm-registry-packages"}},"6.1.14":{"name":"@storybook/ui","version":"6.1.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.14","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"766d696480ee6f6a5a0454ccb2f101c38a0eb9d2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.14.tgz","fileCount":254,"integrity":"sha512-DTW2TM05jTMKxh8LzUGk3g5a528PgJxrtgODFU6zzwSg2+LwdmSDtd1HAxopt2vpfTyQyX+6WN2H+lMNwfQTAQ==","signatures":[{"sig":"MEYCIQC572o2PfWn+N5RqTMxqrUKbbueuyt1rfC1LUebXZU7GQIhAJRzat87HN1BnD+LVU8sTylIbS2xESU92GApaUpTzaTl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/YhACRA9TVsSAnZWagAA/RwQAICn7MjhV70UlbIxbxLF\n0DHCVXpcMebMQXtSjDcM6VFTZAGCkzHym/O/lmIee22Lo4CvxmwkAw9Nou0I\nCohzonddGGiqxUE8FhYgwiwd95/kEbbtTglY9HOWe1d0BJS9S5xhz8X/fYIn\npLsvM1Yj7nbsw7k2YgEb415UAPD4sAL2fQ6+F34JpVZGCqLO7ZcdAIpiA2d8\ns1ZJ/G/B5cErH4vJdLudQFJyrJYqFz9tqItZqb0UjmmSGTisGpe6Mrbz0MZo\nosL6qvaYlY+aaUfLAIvQAo40VjuFMSs6tKz06ZdP5h2cxUSAb4uYad1cKcGA\nWmuC36dsOOw5nrSJAovVOq6H2+JyzRj28iPjHfXZfve/0nCfljNVaRV8ZA1t\nrw8wQGirJJW9w83mofCNMGC/cNO9rb+JS8T9NDUILpw5FSDarsyboxPkGmDY\nAsDGCFGK9E+sxhhB3PM/U4Foy2noyE7S+gE1jF0fIivSd0Fcea0tqD32nK8T\nNuSBIz+n0eNxhLlv1B3w561H+ppWpYxJqd2tutMSx3O3ck+/M8DZxeHAyUf0\nmTchDbayox3L6CT5nT8i+r+CdZLkVfJFgE6xhGz64gMen9UrCdqbOhS8KpXE\nCQuu2b2yfJxiA7oCPI9RVR0B+Nim5Im8m/unbKt3/ypb7ogdIKBZyt+wLZNU\nUkw7\r\n=xGvt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"0ac0ec9ee30df2cb78de2178fda66f37a3c75081","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.14","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.14","@storybook/router":"6.1.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.14","@storybook/core-events":"6.1.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.14"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.14_1610451008139_0.5835553064361645","host":"s3://npm-registry-packages"}},"6.2.0-alpha.13":{"name":"@storybook/ui","version":"6.2.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.13","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4495017ff7a33daac7352c5b84694cb54e333724","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.13.tgz","fileCount":302,"integrity":"sha512-mrUi/n2AVNCGQMvHU5taY2PshB2oTAz8lObhGpXZIy6fpL1CSdZ19iP71TgIPwUqfjUZuxhh6eptcoPLWryIPw==","signatures":[{"sig":"MEUCIAXf1XuqWCpUnzkNJ++CtroB1bGp73M6DNVfYqvaRbgSAiEA18j9u1rmCEUSWnPo5nb9DHaUwUZlhTmKnSvccCQVjis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/seGCRA9TVsSAnZWagAAOU8QAIFHrpNNF7Qlrz/7c8kD\nyxlWQ6uGHCxixtFZLvucPCFcgz/HMjUhpvUy02FvANXZBXDm4XmDmNvIi7Vw\nkj4GmoxrR855cr2AOXCIsZQVJpsuhfjEtxxZAUYVY/v/2AfCnFfoZuuxgJ7Z\ngCIchf4g5dWNnjg4GymRzHK7nkqgBdv1pnfh5XstZ+uf07Ci/Z9uqf7hBU+C\nvy4XLQELGgR3L2QpTA8tUxRNQGB3o6dmC8Z2ATHSTqYZ0eNp5NtYBc9SdTAT\n5C7+BDhZOMHCXZHTJOre39FlA/W/bJGTZzkrcXzyLwvaVNBNUs3i7k3oZjCr\n2k2jp79QCOWYNZoxht0yvXx9T+F0BaiQaUmvT0gVHj57MWXE4SuQphtcwLWm\nNOcH/0OmsRQG0y6FvyPghSnOV6zSm4FVDiy6MoeWuDmLP/AvdGfmc2ZmSEng\nq/j4b8eT0Y093JGQ5yw0bo1s+8yRGNHkZDbR/jdkcydVmAEqsW+3hpxZEk7w\nWcaVoSvS4w+Zq8WvW9pJFa4tolHswQxEPCa75TJcWUEMcfx9Rj4LgHMCo/Dh\nt5/ZDwOWA+CNn4uNab4UvX7OsbpcK8nnNEzUcuyP3cjYmh/C08hxn76W75hG\ncVHQlcGr2SWtIoMub9SFukOCNU+3dGk4SkMpiI33xsN0hQvLRxVQ4hC4vffP\nD21X\r\n=spCH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9de487fa7b79cef77fd8de0d0357e8cf962dc776","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.13","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.13","@storybook/router":"6.2.0-alpha.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.13","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.13","@storybook/core-events":"6.2.0-alpha.13","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.13","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.13","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.13"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.13_1610532742114_0.17286438528640136","host":"s3://npm-registry-packages"}},"6.2.0-alpha.14":{"name":"@storybook/ui","version":"6.2.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.14","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c8a48944cac182381b4ceb0a8f913eb1853296e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.14.tgz","fileCount":302,"integrity":"sha512-MPJHgeS+ajNS/na3Q/PdlgmUC4mbFQNCRviXi/T0UxezAgAjcDHQA7U9OodjB3yZF8TNO3Mf+/LSRBL6a4Ei/w==","signatures":[{"sig":"MEYCIQDYQBsJ6nFzP/WULm8wmri8JEThw3ENDm5MPO/ZjcFAzwIhAJ//OdItnFocfIeK8TmSJU8PzGP/ZA17CdC+gtjGk62v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2550661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/4/hCRA9TVsSAnZWagAAl3MP/2+NjK4k2UiDy8IwYPIB\nSabZGbgjeQ4/TskKPNln/v7iBYAUhR3xST4lO0vq1YfTmpqktb6C3zWsl/PW\nz/UlgLC4trRxiS6PHf+O9hDj7eqkIUU1VPEooF6QWcFcm/WqgTtBOVcNK0aW\nHoolD4Xt5BB4UfEz/6Nyzx9DZJgfOKbi54v26WX0Qr17aThHx4gzhrWoHCMZ\n9B0LVFAQSBHObKtK7ylXbWMiguwyzVur2UpfgGTUkG9bGgE5PVp1yWKYEo4x\n0jKUW9pl5LucCNgALhASk2G0EPIcSooKHSk4l/Fk/3+2tS37c8k6o7qYNL9r\n6x8QMQZjLlOqlbVSziK+71sm+hbmzMb9uZlYD+2PRcOaaPtgbeu4h9Y9KAkJ\nKjqSUaSkfYiuwHx1yFSRnmTj+D3uFWO4LbGKRatCpEsdbpr7IWNXhHstXVLY\nahxiWOc+75TwRdEFAmBeO1hpMEHImPX6uvywkfFFMU0uWEnWbG0TQLEVcBAs\noUG25eIaEcIkm4p+nX3TdQ84v/TzK8rfzXELJyw6aSsM4//qdo5LIapwF3a4\nA2aUDBRTj0vK3ABntj6RvorFCEsoeMH9WL1ce+R3c4wMsFj4eHU+I7RVEjzR\nJyM/yhkvKHEZacmL+cR1/WhNsYnR1UTip5EbLSS84V2Ua3035oFk6Yi4FadQ\nWO2c\r\n=a2Hj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b2ef49e6665fc41eac369eb7492bde8e3bd8100b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.14","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.2.0-alpha.14","@storybook/router":"6.2.0-alpha.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.2.0-alpha.14","react-helmet-async":"^1.0.2","@storybook/channels":"6.2.0-alpha.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.14","@storybook/core-events":"6.2.0-alpha.14","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.2.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.14","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.2.0-alpha.14","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.2.0-alpha.14"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.14_1610584033167_0.08971711924309278","host":"s3://npm-registry-packages"}},"6.2.0-alpha.15":{"name":"@storybook/ui","version":"6.2.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.15","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9f11849260d7ba94d01f4bce552f0a64d265cd88","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.15.tgz","fileCount":302,"integrity":"sha512-20A5pRnaDYroFkPj6GH5jgEy45Fk4ZXsP92eGNrLdamQ1UITB+Stb7e0ZZx0hERz/fa8b0+iY/hmtatYf3e3zw==","signatures":[{"sig":"MEYCIQCkLHS2cytsphukXYnHNP2FX+j74dpQYhTWHwCipgi9BgIhALB9ZanyP2iNnlTXGoYdEDONUaBEeJyM9BUN+7FlURdx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgATXsCRA9TVsSAnZWagAANXwP/1nR2b7TC/gebzocUFBe\nparxhher4kSAoDe2zWnL2ZKOWyaRToF4mzb2bCoAFAJNwEsla77GFi4iGrJf\nUxX+KDgNHTtkZY1qsOiIbE9Ltbpsga8FVj/5xz6XUfqmSvkgL4Ik7PSOOy9l\nhGfduVzVhe8vrw9lx7FuyZ4ICmEbCXttjTRoM4BVQ3lKQzG9s+CWfK5gt8Hz\n5BAKl6IYCCit/xT1GqwDEyWjkaWhgc5xjdyfwN/u3b7xlEuS8+vdH0tIGgBJ\nfJ4/b5sWX5cWUbmK5XQeLN1QhonhRkMZXVthC47XjR1/47vevL9AjgITR8p0\nXhy+cYsZE/vZ1JjpcyHXT3w/w8JJ2pZBlwYf5n3UDKFVBvfJmD05JU8y7Dgn\nOYBI/qjrLuB8/gGS9puEKl+7hGN4p/oL/FH0Xilw9rDCdPo798xgulBAzZvk\nOirzQGarMxm6j5RnDte9kKtpF3fjm+OWli40df9aHc/ok+uka1tzmeqfCFpX\nvcOUuzRuV/idA4Ap9LcIT6VvAbjmn3aTZ9Yv2VG93ZxwtYwTrOk82nTbfmhK\nvtfPq/60oZEnT0zYTPsmRZaf/bdgFXEADR8Yk7jKOzv8SMZQJt/xQzSo7PEm\nihY793WZ+guC4TyoGUdK1EB8KLC4araghtsVRVPSqdvZuj/DTmBKRDxQuNcS\nWC4L\r\n=EtM0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9819dbdf5791d8283f90be6ab73057d10d35ef25","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.15","@storybook/router":"6.2.0-alpha.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.15","@storybook/core-events":"6.2.0-alpha.15","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.15","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.15","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.15"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.15_1610692076202_0.3711249717118159","host":"s3://npm-registry-packages"}},"6.2.0-alpha.16":{"name":"@storybook/ui","version":"6.2.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.16","maintainers":[{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"765bee475a626bf39126805c91f0426d56ffc929","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.16.tgz","fileCount":302,"integrity":"sha512-CnuZNScWXWIrk9Wha30ccZr/e0OO+1GR3l9+bfyhCDWuf4NrMwhS8X5YeUFmcoj7s0+rKs1UFQvDPFqMxYQ5IA==","signatures":[{"sig":"MEQCIBppRGD1v/A+Blixmu9CGZenVnVlOP96LCpPX8vRvOa/AiBwST29lh7fHragmFPwMBHcd8kdNouNodll2wVYQu1gug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAjl6CRA9TVsSAnZWagAA+iAP/iL0XtFMm5cpFGQMExWs\nTjFZg1v45KKchRTjSS1LnqbgyctEgfpQ3/gL9/AC8WA6qQzIuNJZSIKGAmT0\ntouof+b2VAC7BKtqcckl3TQhO7hmsw3pOdXI2qYtO0AC+kWF9DdhOiMaiHwB\naqnnXEtqZ+fj1OivO0VyebL6cgcVaZ3ne4H0Qdma61HUADKPGgcm1RRsUqWu\n5qSaiJRz6wLk2GhChB78RXkhgFY2b/y/Qfg/2t4212iBDsr1143JoKCcEV4h\n+s3ZHB89ND1YT+rGX4qWP1VCzO/DpkOUmfA2abQyS2i2Nw0cU5ygjEk/68md\nA5BVMWgbFpDOpyGSSiV5qzxDTABUp0TEgBMxjg5VNNN2G6HzzUKiXguOziLH\nav4bjLIAqCIhtfaMPjp8X5Z1hWZNQ+omAUytgKtmYgrNBJcCCpIb0HmazJxB\n0qCp+bIZ0GpaffEcvrnIQI6R8h82fcdCiNCaV9CbI9R7zizfAAofMd71ncoe\nbHMqr8QQ0nyejibsZ1DcOyfUfqk9VhLj/ZtsmQHc99aNbytcwQQvQ9esM4fs\nlUAEgwPTWfmW8ehoYQxGCDWPrUZ5xBT9qHJQolNF8vgLsBoByMNyFMi0gW17\nSVUeJAftt9/FWkYwU7Zkvuz2uctqg9KmlEs4pjmLeFEEohUB2UEGqxca9E+4\nDx7L\r\n=t3EB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2cc64efa1dcb90b72806d4c88c295f38dd92e427","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.16","@storybook/router":"6.2.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.16","@storybook/core-events":"6.2.0-alpha.16","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.16","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.16","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.16"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.16_1610758522333_0.8796785944395944","host":"s3://npm-registry-packages"}},"6.2.0-alpha.17":{"name":"@storybook/ui","version":"6.2.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.17","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"db1c6e8f8294ea4e33599475e70f4cd5352f023b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.17.tgz","fileCount":302,"integrity":"sha512-hAJlygP6L7t0FjYZuRWE2gwCuiOJ9vzFPAm2x/M0nqNORLHgMVZXLON0iakrgJUwanMPpEPuR7pKHIt6zKQkdA==","signatures":[{"sig":"MEQCIDoCXm6lwOV9ZZNrD3HrwM98f4Ry6e8aftkEKWg/uUjRAiBEHEuWnqqXtEzi9cJEJMF6+uW2ANJn5q7E/W7qgLN5RQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCldcCRA9TVsSAnZWagAAPuMP/0yCdcrgcm3pR0Jd5m2I\noylkP6rbOUwRJWTD25bIC5N/gG0OjSnobDkXXG2FpsedJuA+8RkocxLq5IFy\nTaAXdc+C6qkAbeOgP1SgI/GxHb1/AIHh2PzOg3N0ypPShMsDmgxdv2Iz++qP\ndwpJ26nsI/uHr4Ulm6Y6tmcEz/FvsWYxhZIbI8MwxK8E9mRmpEInG0GkILF+\n2KhpgHd/8Vb7e/79rZ5GxF5zgZ38CeCEXnX50OdL1IUZ2eFTMKKYez9hcJaF\n4aw1L1KhJtw1e1HTg9jnDpk62XjaXXIFHQsApB7TeY4xapyzycEPznSozUv3\nsNjdZbGiRXyKxAYqv75dhIm/csnfbogQwQLZE8MPrj45uC3lunM63UM8cMdT\nLtaQEMz5WIHo1IWghl7pBWAEu/EIZKl3J0OvbgkN/4yLL2PUaPVyX+70a3pa\nZMQEFEEQFbG4Yx8Sy9hdVB6Wu6dSXD4gzcdsi5T5/PZjWZOrcqIGHTOEkO9R\naofHNIREPgD58BAbhoorOVCIWnvn66qDSRNC1z7wvb+MRheO9dryJDZ7+eQ1\nTN91/gDRASWpxkEN2aBC3IfKGw5GuZz3ZJxYTjjJXiSzQDbu10I+c+93mDFd\nUL+ZqKfmmiuC8Aio5yDnRjZ2ba3CoIzqI5hJphMsrERNrMdExCUarSO6ANwz\npI3I\r\n=+OiA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"218f33702f39ae55ce04dc8f51e9ffc8a7306d9b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.17","@storybook/router":"6.2.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.17","@storybook/core-events":"6.2.0-alpha.17","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.17","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.17","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.17"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.17_1611290460361_0.23258295599242929","host":"s3://npm-registry-packages"}},"6.2.0-alpha.18":{"name":"@storybook/ui","version":"6.2.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.18","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e20580c51496bf3cbde59bd18066db563bb0984f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.18.tgz","fileCount":302,"integrity":"sha512-yNt/H+Igvn9/s9IWIpwCHrrksfF+dnU6Uwo7117jmxNGBznmW6bsU020XoyEbEFAO55kM/21EIPuK334ByrDPA==","signatures":[{"sig":"MEYCIQCjfwo+DEUppZlIH2Fv5woVzweTZsP8QiWPbsStdJ8NIgIhAJjFxNycCbD98fvKqqkoLYNq1sBcP6HuEUt8FEykDLfS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCtGrCRA9TVsSAnZWagAAZYYP/35tDsdASV8J/l22G8P5\nAYI47TZ4ACv3COCojzThoTvHXO/mWXImlWqPUkEdIB4SJTGiGzbcCmf88ZsL\nujqN7i6BLkB+f5FF832KgR0+/AcNisbJVHUfmXSmnZBdj8WwPQf7JF6ZxVQU\n7v3uXowePVZ8t1zp8aQ+9DzhevH3pCQ/RNUJlX9uCN5HZxZs0YJ2v36UhZ8m\n2cb3Yy7G5g/7ac0fQ8LmDtkGJGliInmsbY74iY3YXP0sUzaRbwBtJOyLTgE8\nteczGpN2DOtQz1sWY8ZG3bfy3obUZGMWVGPLbFYXmz7OLmmq0vIyjFIvM+mv\n0eacEOtyHSnM+HYtUyIZsR8lxra9wlwtgXRSCi/sUDVZUMvxzHLbDPBM7Im3\n4p0tp05O5J4hgPSQGxw5TeKqypzAmm+K3P6ATSf6o9hcjgsvZ6bbaFvVW9Dd\n9mID12WegYOODdqh/Zgks2gH7aRhBZj1Yx4dKmYD+T9JgUGNu25y89UaGFD1\n1pbozWgHgRtaLnQu5P3b3LxCImJh6yg+Q8FrnLW2U/PyztBDzOl/IzQRdoov\n2HQr25FnyOP9Zjgq/e8V3fBIMqQ7qyUhzYZd5AAK2x8ahqktz7P6JQIg0C/2\nXVv7pV7TZLpIoI5kXhC449j3JY4b7N/Z3qYs/AJPRS35OWkdANnYBWLdLSMZ\nx6xe\r\n=SzW0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ed19e4b88b0fbc36d10379149b7c98194254897e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.18","@storybook/router":"6.2.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.18","@storybook/core-events":"6.2.0-alpha.18","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.18","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.18","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.18"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.18_1611321770850_0.15329125162517787","host":"s3://npm-registry-packages"}},"6.1.15":{"name":"@storybook/ui","version":"6.1.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.15","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a0f6c49fcf81cf172cd2de4c8dba2be1296891f6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.15.tgz","fileCount":254,"integrity":"sha512-quyhJWlOxhk95he7s5/TSYM3eEsaz3s4+98kUZE6r3ssME8u6zDvqa/qa6EWs5/nvZ2V3+12efIzCNbiiT3v3g==","signatures":[{"sig":"MEYCIQDNJEMBHFc/ytUumPYj6ZsRBYNMqwcd1/QMwsa+lN+IxAIhAMksI10M38Kw6ow9szcHt9xpWpACFKRUa49A/j+FqM+w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCuHGCRA9TVsSAnZWagAA5SUQAJy8UNeqgw5Fw1mQQy38\n+8jnhOb4Jt7puxrib8mT08UPo6KgIPguAZhcqFYkN/RSYdnUZthTWa16pqr1\nxSodDMXgtuV37Z4EzTpMZWUMwu892LkjCbVMIltgfS2wbPdznTcwjqNGnJkC\n/cI0t8nqy2d8OvFe1giI2/sjmjrNOz5TlYYNe5Wc5kSYo7XR52YJw1531GOT\nnB6kNEz5VuUnRk+a6Pw5Sb6GwkXUAcjPAh4HBzT2opqWjuNwqbMkdim3ls6z\nwE9u3lFWpduzBhJAcj8t9bOsVRZFAefukfmICM0QmXWi6YHfL15Qz7Hh2aR6\ngj/yQyiqWScGJIuK7IB7aXQL2cz85kzz09jiT6a73kB+VwfHy6MtNMQeaxGp\nA8U48xlD/0I+odjGtprjVQ0LY00CMVoyfigzIHi16sVnkNP1179JfIb27pvC\nopVhXtt3+rlUFy0DSc4eEGOtnCHRuuiha2MbQACRx8hxy86Bbs4hihajZXX7\ncXbVAWL94qftJhdoRU2OkTfCdNaq8T/tbymIzCYXVtEZtIAOWVrqxxOiQYZv\nHnbZxieIBw9OujDXMyZfsiEHL9PrFtR+lNVZiy64rPPSBBzhZaStySbX2dNj\nnH5KtDSB9OsoMhm5dywczuaDxPhJp3Pbki+gUx76WFhlEBkXM/FQ5csSER3W\n1Dxx\r\n=BjnI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ecd471c96b1ef2e8f8b7a07a137f391bb445bda9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.15","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.15","@storybook/router":"6.1.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.15","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.15","@storybook/core-events":"6.1.15","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.15","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.15","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.15"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.15_1611325893905_0.3084686321348966","host":"s3://npm-registry-packages"}},"6.2.0-alpha.19":{"name":"@storybook/ui","version":"6.2.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.19","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"81dcb94e0aa84c36757c5812c58893f30ed0d26a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.19.tgz","fileCount":302,"integrity":"sha512-Nlrru2rjOmkwPYa5eejDNGIT59rmHFhyXVPZBqf83zVpRKevkeC3d5qRgdenv7a8qwxBA/2Ay26fUi6YLpGrtA==","signatures":[{"sig":"MEYCIQCVmRPmgw/MzXwoPMGx2G6KE3HE2P5qXd8YVUC2U4tbaQIhAK0EyIz+ZmCS2au0/8R73O5Jia+bM7AW2y1HcY582isn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE1wTCRA9TVsSAnZWagAAghcQAJ0packtdl4nvGcWoarH\nG6/4nslhDntMNWncxLns+y0gc/Uq/OUIC0AK9q7rmP+YKVfY0LZoTUAqumSj\ndhQfbHey8nSIHNPtyDIuyspANpFtgGOBjykfJQxJEeDPvS7kCeUSF0ffkBKy\ns2tPj5JTneTkINXC/lteTViJHgI1i/5ZPVqbmnK+ZVi2m4UHgZfNgaL6S3Z2\n+7n8HMArs5i3h5XHPvfRTDNr/msX+9GhvohaH372xoaepUzYKyOqQ/hdcuAF\nWMttveMr6TkuHJfkRCiPfisv+KrwhnyKiGKLAUPm8Y09duQoUWGTUZm3/e7N\nLQPmL9cHsNEAfg6XbZcrS6Oev8h3emGTV58Xp5a0Bsa3REpkNmubVC9uwJZu\ncgnTT7h9lRMf3H8SQQxSYwn2vuVt15VSWzYy1c/Vkh7u3nZZzZe7xAzTFERp\n94RFYONLpjcgkZ35Ry0Vbp4LThHnea/5pjaS9MjUwG2WPPEb++Am0MW8kS1o\nl237gv3Z45UcopKbmCTh+4O7mcrdWoa0HRWqq95uwpjqMlgxfqhJhnfDWgO9\nQf9kTFG7bopMc7zao6eu6AhcEU0EdlknwCRvMKiFRQQj5tLumkCD0xYgixWa\nXd9cjy2yb/pxdYVS4oUvIAWOm2qkUgykd2GYzCU56C/vE1Sxw4wsLHDTm+oh\nansO\r\n=0VG8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2a8f070c0c3ba56dc820cb04e96d9bf3f47a6a23","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.19","@storybook/router":"6.2.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.19","@storybook/core-events":"6.2.0-alpha.19","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.19","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.19","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.19"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.19_1611881490584_0.8185745850839337","host":"s3://npm-registry-packages"}},"6.2.0-alpha.20":{"name":"@storybook/ui","version":"6.2.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.20","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e53b2ccf709389ddeea75a76c530052e5e4745e6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.20.tgz","fileCount":302,"integrity":"sha512-zwDFVRNCeSiPGvGdulJZT9MD7bwkxPg7Ofaf4c/DWIFxBFm03cdlIGOHbHVkGMsqr4fmSkZO8GYqHWQj8f5gwA==","signatures":[{"sig":"MEYCIQDtJRGmg5gdGtS79f02+vWMk8gkP8rY4EwwarrsTq1e8wIhANR/odcYXn/UCmy9hMrFSANBW+gwDyJNScRTZzyzUhdg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGK5+CRA9TVsSAnZWagAAeiAP/24UOuOGOa7nWnmlkZWk\nJn73sCFL/LUlbWxF7VL6/ZeQ/jTW1Bi/giB5b6efWQuJ9PyBlMSTHDGWzMBY\nWeHymjityQI/fqDNLPnN2LXSrqYgB5yt3Y0o/J102XPDCFvpMupi7GITT0kP\n45VZB+1BJ2NfkWKMExVV12G0/YtAlT7zmaXo3o0pIh3GpilgKQ2TBatoDUd8\n9g9924p28uXFzokTNE0E3aviD2r2CEP2cZ+aEDVzDzfUps9b8LMepiKniFUj\nRNx/91ri8p2PfA6JudPP/9thXWjeRFf3OAPfrOraOMeJaoNsFvCMr7Wij4rR\nZKa1lt9AlzPd4UVWAdrISeJ2gmqI4xHrs8LFJkXzwh99asRBIs6DQo/JiXNz\nfUtQZ93ZxMt6OJ/7wEqosvvk6zRV8/yaAhcBxUjcG8M1imoQBmI0dKdcIuv4\nwJTRAnc06yXkL6LXxetcUYY3jI7afmHXN6GN39eWiUf6OJhM94aAbnlpMBO4\nLfRs+1KTDb2sQOhOr8ODeHlJy00LtEIo+TnH3pDYiekfPiQxUcAXO+TeOK6k\nMw8SpO8aEQmX/VY7d8Rw6LRaRRK6ZweusVsHgKKxv9SFP6LLnoXNw3Qjinhp\nhn8SVC4hHLudDgcIVKNUdbG/Q0Fbwcyne/LgFJ6AMYAFW/1eBOXgg/qLXNes\n1eo5\r\n=cv/w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"20db16edcd0c76c54f0d80970a288ec94ebd19e6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.20","@storybook/router":"6.2.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.20","@storybook/core-events":"6.2.0-alpha.20","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.20","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.20","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.20"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.20_1612230270325_0.02635970651621644","host":"s3://npm-registry-packages"}},"6.1.16":{"name":"@storybook/ui","version":"6.1.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.16","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b6e5615bdc89eba384f192df203da83c19b1be8a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.16.tgz","fileCount":254,"integrity":"sha512-6A45rCFhQTSIWmrlDpGFdT7SD6cUbFpmEKFLTeiPJWZJ4L+pqRxKh6J8X3QMeaD7GiacxiAfSdzk15jNxo+Qog==","signatures":[{"sig":"MEUCIQC8dQj5CL0SCufkeaKWbLWs/zqCoz0dvkeqstZsW3PbyQIgX4Bl4tp/PQpROTJTm0l7tGqDiFf1ZkZWibIpaQyq0Hc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGLc5CRA9TVsSAnZWagAAcWoP/jPvnqRez8Az0jBszIIR\nbs+VFVWiFtlDt9BC8SxhZ+szXU2RDN9uHZ3h8xJYB/ZMyvXsnibAXYWOOMa4\nVrjvHyEk4t7E50/d2dFEr3BZD8jSCTA8VJ0ED5bTFuVUiVo9etlhdBxEijlK\n/DQmqFA2DRV5mRuWU8ruVLAKj++dGju8i/DuwtcE7j/i5vAILZ8WEUC8z+fg\n5WWJiSzcTFPtdWFYAzIxYZ2X6CTigTrk3Kq3yUrxFPMXgO+AQiQztV75WFWp\nD4qthobHj1JCBh9EtnPCLwAYVYDTsHz+0oJYmbuahAwK7J5/cQa6ZutXQxYO\nknGlwWlJdXP0OAZr11Q13+oWIpadI9La9sDwNjb6et4WR9F3wt2N3mOytmlB\nx50pk8jMWo0n8J2ovndesomzJcV3ucCodMn7VkOtj+M7GF/gHEd6XAK05qH8\n+JTwRVF4SoVBUBrRdZrFnyLnETG3pqa5LtS3+8wPBxwtogX6NTBjseD7LWBf\n5NdqPVf/LF/eIS7mD4/5yh4/uZ32FfWMoHXjYeYxxkLvZY6XJnLEN9x4Y0L0\nf+Iq3OwczQgkYnrtBg3smAaLiybvsbn4oPYi3vWAsu7q+v3dLH1gAf6NsD09\naq4qXs4mIjvdqahabvVWAOsre/OEdo2NBuTmn7lSmX4kgZIcWfB2v89xylNl\n4v14\r\n=eHme\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"af79329c2171b7cef7a0de9e946b993af3f78e2c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.16","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.16","@storybook/router":"6.1.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.16","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.16","@storybook/core-events":"6.1.16","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.16","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.16","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.16"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.16_1612232504554_0.5139379411202287","host":"s3://npm-registry-packages"}},"6.2.0-alpha.21":{"name":"@storybook/ui","version":"6.2.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.21","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d52f3f1e4ff97c3984eeb58620d1d0d519c559b4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.21.tgz","fileCount":298,"integrity":"sha512-AWfV6dHaUv2YO46IXfTEcxtgxQm3/02dnrU+9yCk4Md03hm8M82L6li+rtbB9wd10TOuJ9Vc3KiBtjeKgY6VXw==","signatures":[{"sig":"MEYCIQC+545ZkzDLMmHr+GIhIicHNTX2QcXhak+7i5N0DxPpcQIhAIbLYYLPt4oJwmZY3Cm6HJ6o5gGi+DTk2dSXoN1tDS0G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG6xICRA9TVsSAnZWagAA9GIP/1mPhYHN/iS/fuR6yQ1W\nkNnyWG5MwenyfPs0MYelQ8JnsnAzWvERCcZM6PlyjaIo/UaoUF8I/ZXP/iCN\n84Y//Qoeg8+lVwLF4YGe2slGlsE1Os7HsQUuIlgcPUJUBPzwqSCeZP+2H2ng\n5FXq+vOEgDVp4po6dWXgGrc9qxkwVN+hFqe2Hg+wVxRkIe8fiHv3nQ9oBJRm\nrESFayIoaP192GGA1rvJR0h0mhTx1+lTYw8BAL0JFyTgNaT8nxBrCj1J4zJk\nkoT4fHe5A/nmSrpBEhgxtcXRaGkboCFvBvCWWc2VsKf2+8sXoC0mcrurU+0L\nAvX77lps3dTQmppCLdUYk6n437KAMuUJejZiIL9HXcqPRrONkgSvRHp5DuRZ\n+pd0Gq7exIe+9A3XHn7+RLmzDikXvNg2wy7PaXCTNsnDhR9Zgc5dhTB56kjz\niSFvNtSUXvV4Nb25qR7kvKTgNrpadSSKQYV+Fls1uyuHrqB5C56AcV8PcmhG\n1qx3KnM7nPIpKZIyg8nu/nLjShwd5dGwsDaZYQJyAeLx1zyz8UQamu3Ze6gY\nikkZvxCi5h5qaGWPcf4q+vptdfhxU5/X8/YXVejrkKzBZtWhegAFxg22u760\nhX2DdI/311dZgKLsisqjTkp6i8EYRRp3pyyfp5qBTjpLIoGoP1veW68+cjK8\nuOLf\r\n=86ka\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"881800fbc3d071d64ef6850473aedb2f57763b69","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.21","@storybook/router":"6.2.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.21","@storybook/core-events":"6.2.0-alpha.21","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.21","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.21","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.21"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.21_1612426312011_0.8150146160743283","host":"s3://npm-registry-packages"}},"6.1.17":{"name":"@storybook/ui","version":"6.1.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.17","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c29e7a03c645dd94793a3cbd587fcb6e0ba0f22e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.17.tgz","fileCount":254,"integrity":"sha512-D4Vri1MmqfmNq+g1hSRqZyld5zX2VLUexQHGSPmNj+FhlOzkeNA5RcoMBWMvIUSUENiBx3a5gmr/6cbXo7ljdQ==","signatures":[{"sig":"MEQCIER0rNx4nDvi5bv2odnOgd2n89gh+RrgAAAM/ExzyicrAiBdFSHsNDZ4E6y6B4K9KffJu4NWBw3R0ZeYTCRpFbaQxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHBo6CRA9TVsSAnZWagAAM5cP/itX7acr7ilDPMwym3S6\nXXwmNjZQmdhO8LRdcC37JF70sx1y6yND8dK41TTJQFcBaCyJe93UBGmBa6Yy\nrmWSBc0rl4XsNtOi6Nio61k8QzqmptsxHqLXlq2+avCNjEFaJ8pKRxawh7wP\ndKfbEnaLsAXbx/+RR5I5jVa80qQQWq5kWeCPIWnS2pYlLNj5wJiCNvmpmUkL\nCpEhN2foG7fRG950R7SXbDaT3Im9SMx5fyz4Dv6Dk7AsDyd+/j8jbWgjMO3u\nezrvkWYiiV6aI3hKKNsjRaGMWWslT5nocUDXTpmf1yYPUcUmWmTQe+CwYpQb\nSp3bu1I4niMBvLBxV0PTD0fSdAKhEv9JO3eAETFLKCrIwRb9b2ftt1EF9gM5\n1+Zq9yYp347E1XJd+0/qUZs7NhpdN6/aqbEc1PZyjU0ZOHBffhzsSnZ2TYTl\neSEy36UVjcie2+u8ljwOBbyJLt3pfMsj/BsAmGrq03hIK/RwOIFAqbES5BD4\namiqKwcZCZysR9HVbfLaU+Tpl852NanOb1gjiUTRy7+u8HHshuJXk3xTfzD6\nsE3BflRC2p/XHSQd3/em0d2ZKqzM8GiFm7gdLSewm5VKiVcFibL6IWg/qSub\nkFl2fvnDbwMFQt4tKoATOqUdO/18060yrn3W4/VWUrugckmWYfULBzYZ2rvk\nb38t\r\n=cpHd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"c5f036719ab7098cc8e2bbccf3430b3c9c494a8f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.17","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.17","@storybook/router":"6.1.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.17","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.17","@storybook/core-events":"6.1.17","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.17","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.17","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.17"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.17_1612454458112_0.8718229594970848","host":"s3://npm-registry-packages"}},"6.2.0-alpha.22":{"name":"@storybook/ui","version":"6.2.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.22","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2cc49a4ddac0e2f32a7256dae62aa27f0e863770","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.22.tgz","fileCount":298,"integrity":"sha512-beSzrFocjG7Kr6U0FWHAZHp5g1NVt07UylEviprFsJjcZUw/jcOTulX9q2bz975oHANLy1vi584eSiQJmC3SjQ==","signatures":[{"sig":"MEQCIBSDg3xf7CPIKU7s3J1gG1+TKAREs7T8TQHUOwWhSrEnAiAlceXvHcD1Pb4qY13L8XVjObRYSHcND101/lzWfos2pg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHHX7CRA9TVsSAnZWagAAPdUQAIK9ZkxJ9uj27m3UDaeu\n3tTvIHPn8eUyXnTFhKImmiBRYc4vGa2hlIanhyWmW7C65Av4cUDccxAgSjTD\nByfvrxNyWn1Yzk9fPM6CsIlI0PIdRDcsogJWB1sOgXZhD+DUj//ozvNqf8sj\nF9wKiwUxUySZ2mulyj0tekT5lm7LoF74Y08P1GjEndymD1DnjGyi8ecZAkkJ\nBblTG32QGIOH491M6mrgWbrrmMxzxMmfhLAE8vNLZh2dJedailzi3ZYYsFLJ\n2CVuVb1ZX/NGLCUwZPqEo6SF/4eXknEdEKpFvDEchrYE1Ghe0bvDsfeAZW2m\nRNHTWanG0wZZzOntEBFpUb6cUOkKqev1o2DXCwzHPy0ejNnrU4HnuVjP9X4N\nPCr2Dv9w26wd6Es9PGpopMBIwjvGggUVORiyK6zxRwRryXeyN0zMzGhb4BTi\n4YTdtK/5XSa6YEBVVCQATbKPwU9u1o3E3VLclwkbp52MWXwt5jSdy9OfvNtL\n7eOdD9QagLL5y9fjAf9CSh4NU3//EB/nosWy2eA16bA/hywgBDa3qrb+TXAl\n/HZ/Mo3cHj+JD2KZvb8LfwM2QxoXU3PbX9piyIWhIXJPHWbIddXNeNv09+pA\n7UG8GZVvBpSwTNSlgSvmlOfjv66IKSC5RaxyZJqZRsAEUwlObJpv6r7sK+SH\nqWNF\r\n=LsnS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"e35c88c7a7043bf5859b8fc463c3ef9ed8cbf35c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.22","@storybook/router":"6.2.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.22","@storybook/core-events":"6.2.0-alpha.22","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.22","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.22","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.22"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.22_1612477947098_0.6741019275453317","host":"s3://npm-registry-packages"}},"6.2.0-alpha.23":{"name":"@storybook/ui","version":"6.2.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.23","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f9155fd6c22e3c62d7e7178a1f7b6d09cfc745af","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.23.tgz","fileCount":298,"integrity":"sha512-Jrbesy+GqxVd9oMNXmJTCfC4OxthYyoRPeyIsnNj6S5bbn+9vQsHfyO3BdtTc3+uQTv1qbWRzFB3yqHCFB9BJQ==","signatures":[{"sig":"MEMCH3lHXkMdpzZ8yVmvLa4GyK+8LR2NGBY71axsqr5bIXcCIF7CUUYqyzNqUTzX7CZn55xBnDdJWg/4e2A71phGH1lj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHOvKCRA9TVsSAnZWagAAOQQP/jf50KV5AqSNjYnyC41E\ncS+qUL1gnje3lanS3tGW2/5juxlP0lAjANN2+nsEsKVbkTf2GeG4PkDETWr/\nyoSmB6c8LdKUINDO49TcJro0hlSiEiBOxmXVzwFJTlmDzE1FBYqIHTKVu3tD\n4qwv7ZXTdCPYj4DI3dR9hOghKpUn0nMwY/IAAz+RwcLgQqpcpceQAHI9EJX3\nhojvTU8gwiOS6XIjGTZn6SwpGXI8rUNWRUSZvMSq1wZlkQQTMk2nCAMKLgGg\nZ9NJMhyqyQTUXufFPFqlrh7gI0Vev+cerAnAcXajoLdeQZsErWaQBLwmSc2m\nOyaRNfF/5xEwDjBX0AfA8n2W3lVUny2KIsE/2C+DWVsp0qZcZXRjLyU/0eKi\nBT4ohyos5DXQKYsHXp2sBs8w8JGGyNiAOv/Zt6v/qof+cdbAqjM2fVzfOAq1\nebLOS+MSWSQIfHQNMYHsm6Os+cgdSxKG0RN48z9wlnrFL3cdB7C8rDkyf/0W\nxjFU049WVJo7xWCQZieLr7uvMQDA3UnEqE8G54vX6cMZW/rHk2Ns6lXogdbD\nkik62SYhT/sCbqb7gca3n3A1emlzD9l7UBvmqupvLLR+qHmrdcY0hG5W2Ziw\nr0BfWzlmrJeIyXQtuv20FBjkeUhvfKDXh/Iv337cQIB6efFTRoHe9BH3F6y1\nUeqO\r\n=JUzI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"da6c7fca24937f314525873d3d8f15b4d0e9aefe","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.23","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.23","@storybook/router":"6.2.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.23","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.23","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.23","@storybook/core-events":"6.2.0-alpha.23","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.23","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.23","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.23"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.23_1612508105372_0.14853815663843295","host":"s3://npm-registry-packages"}},"6.2.0-alpha.24":{"name":"@storybook/ui","version":"6.2.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.24","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"57a109199b187a321b47b58482c9ff01141b7272","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.24.tgz","fileCount":298,"integrity":"sha512-W1QIrrZ8eX9IOdRHIdpkreQkRqpmUC0seLW8tt3wPdsf09IDbVc3o4rM62jdiZEhs+44ibJS/eB0e1/7d/BHKg==","signatures":[{"sig":"MEQCIDtf6eNAk0D5Bf1l668YmEKFB8EPDcJB3sAwanBnSmHHAiBPJw80/olHl4HA0jEN44fojC8OvfkvHWDWcUOI9pwLyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHfVvCRA9TVsSAnZWagAAKuQQAJAUQZueY5N2dObs7z3p\nBgSycpaAMMWguW7n7qOGHc25voYR8WesuUqIT668MOGrWxkbiyRPssmuqAiP\nobZOJIpLN+CISmqmgkXbcBYM7U8LYw5AdUB1kzjWFKj3UIL6v8Ej4Ig2b6EK\nY7ZgfDzLjKJOZVCD8fJ0SKsBXCahGlP9+m5ksZwQmRAPJnxfll9iL3gcUTQe\nQTt+NPAwN93ZlZf9FW8wdQ4838TgZ0Iv055FBLhi27WzsfPVuXNMZM51jT72\n/cW6XFkrLg1wIUsrd4VZntO+zBjpuCrTRHd97pg86oUuKvGM54cRwpSV1QP3\nYb9dMti4WzAHzjzfV/kr4/aczToopdTeyDo7qp+oiooBhouXquXJfkED/3Ue\nYt70VsOJXareTTZr6CJjEBNY+b4Dv0CxLUl2Ab4qgAeNukGcytbpsEwwgR2o\nsj2otriQr1Mr8HITSu8WKLr/ND+NppfaySfxoxrJLX5MrotjrvaHI17l6XiB\nRzDI40jGu4xGAzPAdxRFVx2/keqI/4igonAyHQpI1/9zKvQztOwWmFRKjPhP\nhOL48O4zwo7LzF3rjCjmvZm58+bHpycnDm98tAfehn81OaaJN0+Z8JMHfUrZ\n5eTXJCSjaqgctmfynf2QFrOwR9thU32AnB7P4xfsBGthEW7/SSG1dSe0Wy0l\nI1l1\r\n=ZCid\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8001ec00b1023170e0a57f53edad61f3afe1b111","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.24","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.24","@storybook/router":"6.2.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.24","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.24","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.24","@storybook/core-events":"6.2.0-alpha.24","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.24","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.24","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.24"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.24_1612576110637_0.5137875862101542","host":"s3://npm-registry-packages"}},"6.2.0-alpha.25":{"name":"@storybook/ui","version":"6.2.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.25","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"662e6a9473bd7232faa4f89b41f99ec64750593f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.25.tgz","fileCount":298,"integrity":"sha512-JNeZEPbDWjuR3CjrPJapDAHFRZGn9BdIo+Nbxb8fRx7gfIIowJDpAhN7bdhnqsZ9IXIioKu9xy90Mb/dlj3/hw==","signatures":[{"sig":"MEUCIG6dma6ku4wW5nxr6sK5mMhwJEjg3fWdihmLN8SScnY+AiEA9/UN4WwxSO0RVMXrEJo5gVou23Eo1ndkZHxJWz0sbyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJIgdCRA9TVsSAnZWagAA6M8P/jQf7bsRdzSoKzUJO+J0\n02A3NCIhnB+1m86/7qldbYxqMI6Yxmb0eFYFZHNle30w83a4y6UGt2DjKycH\nloP8mxJ/VtY6WQ7gu3uOB+DPv1yIQ3iIA+ZMn51SSZV7lvo4o9ZvCOAHvcIU\n4YI4FZkaj8jfuIPeJlNYrl6c4Xmk6WNCuOGjU5AAFFFG6vLpDfwemrsW91oz\no9DKIalv7fk9VIaMv6fvLV1rsZnWGTWR9rPwbABZElTi7lZDxSNWJBzy7+kx\n8hv7cXxqCOv3j3ZEQ7YuWWUZKcU4kDiF4Fro1rFjpHlw7mh6mYwu+f8Z9h4q\ncfvhXQMfrue2VwSr1s+PEn/7sBdZ+9Os4OuKdUQ36m90RNuXQzO5bkDrXB6j\nq3XEo0MNy65QZwE+DwqXHXLOiE/rfVITca+oYQgWTttMtPVSeFvWA4z+4eAT\n9pqeicTuCKo1cm0uQqHcAiq94pG7cxxagiPXPTk+D2cExvA0FDW7vgi2H1X9\nYqrgUCdhtiqdj7OQKrjPnUCaufiKuKCZ577c3RrImPZSu23HkOWqkzU2NCjK\n4WF9LWgzvlEkTjxktiPONnpBF24jFG0XuzwM1neGCdX/aE7zzRzPSTHNfwot\nlLRFChRlYTZvr7B0q8NgJkTo4Scfqn71wlKaEE9GOudynvfauM726Uw59TD/\n4+YX\r\n=itwy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"d4ff49b2dee7c5a3c50e992832bd0ae4d3e52e41","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.25","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.25","@storybook/router":"6.2.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.25","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.25","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.25","@storybook/core-events":"6.2.0-alpha.25","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.25","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.25","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.25"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.25_1613006876645_0.1278516041826392","host":"s3://npm-registry-packages"}},"6.2.0-alpha.26":{"name":"@storybook/ui","version":"6.2.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.26","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"31dfad203606b264d318a77cbcb7a14b2681fac1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.26.tgz","fileCount":298,"integrity":"sha512-zoHlyhjBJ8QEe53RIaNci6srUE8QhVJTDoi2phMyLZpx0nMWfdh/cgizy5VovfZorr9SAI89vTKA1TvNej+Y8g==","signatures":[{"sig":"MEQCIHkg0CELghxdpwDk9cV1wPMhFKwt1iLBl9s4wuAj7ZC+AiANH0a+RwTCZOT9789fMio0LEfISV4ltb3Qthzsdwktkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJ0djCRA9TVsSAnZWagAAD6IQAJhpqegKJkePorPRwuIK\nIfs+CU6TXSznDPg11V7VUocuWCiGEXxLLZDaecSZqLAW5BqDAEziQYILmMU6\n0SG9LG8hoYug+UJ6mcP5z3GKL9TVmLKmo2Dlki3zOIv8rZl44e6kLowr9AMG\naX6QM6UzDnRzI+Ny4MrFqvq6LvGy4TkWfZceq4bQEtKAYe/YkNGrwvUR49fv\nmT3UWTmfPWnEoW5MMGGZ6lBx7nRsekzk5ZzJDPn0K8L6TOjxTMqkB7eQ2dFx\ntVNWS0zIazv87B+izcfs2mKZr2TjQgq+VuIBGRxXXUuQALGR+quizQGyNKSx\nG9Sjd5EEczgXkIE0b53ISCtqxRl3DBX8B9yk9s9EjsMHjJRyB5k0623ppAiE\naMU5LfdwLjpQ9ur/ltQtXbrUJ3Md9pzIGDqQYZRBW29z0aoDFHoEnvI9s7i6\nmYYMTzS/LkYx2eEmqTn0QZjEOPYl/my289GseLighE1EKqQCDKUgTL5P5pD5\nCz4c6OBYg/p3rHB/z8qjAn34bkrXKjDtI27d+PdOK7QOTep1/Grc0AmvcyAQ\nc3kB9rrPjXWdEm0K2ociNPQAxx29o0gVboquFHFOE5o29/4zJoWoO0QMCsrK\nFPzncf8UGZlk7BsOfQ5hTnpBHVOHTPgMNDCM8v5Hnt4jtbTawfNvL5VXaj9b\nc2Pe\r\n=lxfl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"dc281516a86ed63016caa2861f32f59d642adac7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.26","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.26","@storybook/router":"6.2.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.26","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.26","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.26","@storybook/core-events":"6.2.0-alpha.26","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.26","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.26","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.26"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.26_1613186915127_0.23738326630732387","host":"s3://npm-registry-packages"}},"6.1.18":{"name":"@storybook/ui","version":"6.1.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.18","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e88ad5ba0e041127c8624f15b3071e796348b817","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.18.tgz","fileCount":254,"integrity":"sha512-EKOja3ji0gHxnKWFBt+nK7xuBOzKTEKJ3+PiW0+QS0jZ18EkR7U7h0U052jNXdiI1c6Sck5n9+gI5EylzN18+Q==","signatures":[{"sig":"MEUCIAKYIklmX1PhcysWLZ0vube4+ydrkFHNoH1qBMjn0ULlAiEA6TeW+TGMWM8haIMZZgf0GiNsY82JwPz/zjtJzQfbw0k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKVgtCRA9TVsSAnZWagAANcYQAJyqnrwICSrq5HUJF2UX\neKOVAnJaBn6U9yWYil/S6UUfiNS7Dh3dWH3CN12c0lK2RIypCnkWqO11dHCG\nJzYEkATTm3kZgHSbBgdvnO3MuAg6Q7oIEDUnLdFcI9+aozQhRoymW3UK5Rnf\nS3B7y3lgf8zco3QycHkAayzU/SXcHYYAw7xU6KMXi55VOMsIpM65OHgvo+ST\n6OMxNmnNz9qoTeyvZx1yqa4zXbi3Hlex3ju28/KogIGSypJj3lAr67GsBUNq\nIaYcJ5/vgDS98goZznYVxvN5wj9Zb7xJPRI50Bp9tonrWSATdWcn8vKA99S1\n338qSTwioFdWM7qyT7qaFZIBdG5WCpwwSBR9ebHbjkv9K8RoBrIGqF7d77e0\nyqZqTCp7qKT9G9ftYYYMqAyQf2AJYOzPw80qSf0htMQEzkxrXO714Q6sISdc\nTJck0uMuenLLxhfy9JV4GJoMMQ0qCr+9pBm2DM3zn6Nqad0H8QxSshQUal3d\npIsrHpsjAv4NuHGFckcmiWSXp2HiZ8v4ilIfZdP8FiOEJQg+tkRfGBsVZbuS\nt/xhhiGqs60J2fS1Y6X7VEdVydikQSzvH10uylESd85Z40bNBfig59diFobO\nVMb7jPBPVbxGOYxqdc1XesGKSa3u2w0qpkpsLqyMlazZ0wkK6N7Y6o8O0af/\n6449\r\n=3628\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"7b49fc1fad07d27ac484e6eb8ce50d75ec99604c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.18","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.18","@storybook/router":"6.1.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.18","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.18","@storybook/core-events":"6.1.18","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.18","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.18","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.18"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.18_1613322285135_0.011779493117486384","host":"s3://npm-registry-packages"}},"6.2.0-alpha.27":{"name":"@storybook/ui","version":"6.2.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.27","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"10d2a1394dc235b783524719bfc60a62172feeb5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.27.tgz","fileCount":298,"integrity":"sha512-CUKmN1qab9M9JmW1wzVJ15i+Cc653ioeAybJueXIaTxrgjq9uSo5N2i5oU1n0eCyf0yxBxnXRLNr0m7cuWcUxQ==","signatures":[{"sig":"MEUCICLY1G1PvDoItt8wWABDCynkUWjkaD9yiBilWaUricaMAiEAnT6rTGH/zBBgp1eiN64+RqCz1gfqfOcN77pWHO9kBRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKVysCRA9TVsSAnZWagAAFPsP/3Lwi8CHrtI3iS9n5LrE\n0igzGSTg+UjBfFAMnEUb+8nP1AfCPUUNYZZW1sNjIYucHqZuSKvkS1uv5hos\nLZ69GM613JQHjWsldr5eDj527VZgpAnxNPeZ2ilb7Sz7Z6rcTlz+o6BkUu6R\nHfbqWsjAOkXTHFIOKstvJUgJZwpE71Zb1/F957BgJtLHTqa3rE/oI3duORNc\n3WVg5KRiybHNQeSsrp49zqUYK0yEKjV/fmSpKFZNHWhPQmmsLU/TR79es3pj\nGdJkFdzLsNTLMJJTCVZDAJMA7nhS1b9CXKkWcCI7mImSpkWczl7dch0qnIHl\nI+JeCAx5HSbQJ3FxLrXWGCdjYvDOfpoFH46j6ITQjAHJoz90JBiU9CUltrRa\nnl2iIFt0k/pxs/3exUgzDVMjr1FaAgzx+w31t2PL5ZB0WyEPZJ+IY4yT+aYH\nKeKPLybpxqzeBpne89aHeE9hGJhtdg0JDE1XC3wvdqYtd0DqCq8JELP88vxv\nXExacewNWW8mFUQcdtptZNjYdwO7fWhqKbXo5iv6DjV14iqUeciW4eOmlaPv\nxeXdiLfKdCVT2qtA5GWNwHCjofnFAm7ODEzi8bIEI6etk4L0o10lgIjc5Dpg\n3Em5zTT0Hz+FqtpXVVnjo+o74UAeYCRNtLDnDfdYbvrZXnrc+yRxNatHY43f\n28g4\r\n=SBER\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ca441e62ddf8b05ab1d388a59f8836565cbfe303","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.27","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.27","@storybook/router":"6.2.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.27","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.27","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.27","@storybook/core-events":"6.2.0-alpha.27","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.27"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.27","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.27","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.27"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.27_1613323436389_0.8932897663580563","host":"s3://npm-registry-packages"}},"6.2.0-alpha.28":{"name":"@storybook/ui","version":"6.2.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.28","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f99b51ddd2f630b61dd5fc2d2dc7ce6a9dc828f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.28.tgz","fileCount":298,"integrity":"sha512-7FaZXuN/0mO9QnQJaerbHTO+kBEmv9Kg/QCTmAEVRcQ+cDhhM3fAT1bldnKYscPMAhF2Hi+cnbId8hFz8i7NfA==","signatures":[{"sig":"MEUCIQDz3u6yiEmuGE+/DDvJuPoSaFSiWnzvGDSHpsd7WMTHXQIgRbvL3NKZlKyIEGXTc0xuBAxxgYjZX/hXd+turxXvEFU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2541729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKhZiCRA9TVsSAnZWagAAjkoQAJLiqbcKPylXPd/5HlCH\np6oNl5Yy3E323Rc1CL/T3QNmPY3b1F3zHsFdpWbQHylysgp2OFTmgTB5aW/U\njO7gNdFL1qg7/HhjVD6LPbXGtZnoPlTOPSb6Yl0olyBWU+ERKj7111wczv+I\nlpR5qjb+1tZohQGvP+dC9WeI20jyprS4QxjjEWtXyId5JgFO5jFaA25cYOFZ\n+gGQTusSOVoKHl8Vt3ftRoLDKgWPEkS4tzN2Fg8pfEmu+QqcdVZmD9vCm/BU\nSAC/LiYNLc8I1IiFdGKa0eBUpBNyT1sSMhnsFXv8wNN9tPbyDvzjTfnU52kq\nz7xB8gzq8xDlwyCOj6ScmFUC26lFECK3gGa/8i0T1ZVU4D1E79j9raeVFMaP\ny333M76WQnSL4E9t37pTE0Nwc8fZZN1aDSsPANkOmkJyfhwKnCgGGmYjabRv\n+SPA7eVd3FZ6HpcnBZ5a4+T5v90AhCK4bRLdvIHFoWpdLred3rYWkLly5boH\n9qqPdFGEGktv9WUik9erYt2kJ5aKyleLNxXlvrvnlcwoGhrVbG750tIaPKHh\n5C+6BINMbXD8sK1FVlagizjFRNg8Ix5E6f+p2iRycnOWRDcxI1Efwj9pliBl\nI4kNK4PEUF/xiBEdET9Yl73DZeb+lZIQqB1F5O7r1WfCwGPhv4wO9mTDQMTp\n6hvT\r\n=q50V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"899ca0824d698925edcc519c7afc7408f7b1ab46","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.28","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.28","@storybook/router":"6.2.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.28","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.28","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.28","@storybook/core-events":"6.2.0-alpha.28","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.28","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.28","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.28"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.28_1613370978113_0.13018100874114547","host":"s3://npm-registry-packages"}},"6.2.0-alpha.29":{"name":"@storybook/ui","version":"6.2.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.29","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e3533dc0b8299bcab85e09771ab81ea62aaa7515","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.29.tgz","fileCount":298,"integrity":"sha512-786S7GU22/s6o4cFDOT+INTSP4fFrAtDUbH5QDd3D3MWY6/Q/zMk00dVMLtj+jx8p890bAburbeykCo4qY4qkg==","signatures":[{"sig":"MEYCIQD0FkBE5ex5K27A3HsmXDOaHOd2ewRIiu/bo1/Hl/axcAIhANV7QB8tRDgq8zzM3q4a1vfZfZrHTxgfXQ33Chdxe4y0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2542353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLZXXCRA9TVsSAnZWagAASxAP/RdCzXCYZ2nw3zQQjg3j\n5r97xv5xO1FAeBx21Puq8/CQLRi114KejqAOdmM6wbJvqsCwmVaZ30OFYuMB\nlWXPoFl3+XjFNA88Ec0MGV5ee1Y7Gch8P+xkSiRvKaEtGzt3h0OlBWzoc1tj\nnpyMKysK0ECFTc6ACTAhGcn41/N/GueV7qdq5t7HUfhhg9r5OuJenrcM0Xub\nB8jWVt2dt3DILccCI4OFc08WK2ppfd5htMe56XQ0zCRiuFOWqA0kqu3+c78Z\n6isQeX+h7F8sWWT9dWtzCszB+0zKVt1wlmgZde2rOVfM1ZWv+9SLwfqkIgLS\nm5/y2PxJls5OKgZTVRbUywm+SaeBDo9oHXfHAC26HI6MrTy1O7gAnWGBiA2O\nOXGmfwlgLG3ua5jIdO2k6XkPBsonA8GltHXfpOlsHkaOwounf1fn4UKSjS6z\n/CBnsivhQRmhQJpCxsYzyqKvlmfBP4X6o+X/Ai+CQEWO4G606+krh/HwUgHm\nDdL/FGoxcJ7P8dBw/YKxVvcwHDHxgpoA2FPu/ORK/HWJUiABzTvvldbFfT7S\nNRbhRqg7rhHS1sJ9lhy1KhIk8ptVqLdtN+HlqR9dtiSWXRvsgkNMhqBg3qUA\nysDCnaqhzUOOJaa67mf+VrAJvpwSFGqbmlI9+8CyWQRBEJSw0ujN7ZwZWbU+\nyA1T\r\n=RRkX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"66dbae1b4f46f0a654cca2a32410f4654ca48821","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^3.6.7","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.29","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.29","@storybook/router":"6.2.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.29","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.29","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.29","@storybook/core-events":"6.2.0-alpha.29","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"^4.46.0","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","@storybook/react":"6.2.0-alpha.29","terser-webpack-plugin":"^3.1.0","@storybook/addon-knobs":"6.2.0-alpha.29","@testing-library/react":"^10.4.9","@storybook/addon-actions":"6.2.0-alpha.29"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.29_1613600214754_0.15680713270142843","host":"s3://npm-registry-packages"}},"6.2.0-alpha.30":{"name":"@storybook/ui","version":"6.2.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.30","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9eb50634e09ed486a1619a90fc2431be3fa87a12","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.30.tgz","fileCount":298,"integrity":"sha512-nNU/S5xRkHw5WVT4y2q/Fqp/558mropy5ipueESQq6/zertYDhsZ2OJKoroR9TGc3AjJ+cFTwFn6zH3NkS8ieQ==","signatures":[{"sig":"MEYCIQCGjZWBdlLrgYYZ59gvP2J6wjkZhG6nXelvstVXYFdnqAIhAPlQJQtwiuQ90nlzxcKHx3C955bvijw3R+Xn96AaLAx3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMPvVCRA9TVsSAnZWagAA3BEP/3ESYFtpQovpdL0jgQOk\nQKswTuPipE0LANUtiA3Qv7A++sk8d3YXvDFBQNomXrlSflJVsTW7xPc05X2t\nHfC5+fgpEfUPMuMXdyjI069huxnTOQ/CQeRfZf2IbIS4ygOuReDWU/z+uFj5\nZq3DwIfm+kQE81yXhEECXxzKHqHo8L5rvFlGpvSk44WTX2c/FAi+1fV3+rug\nlzZTNgeOGbK4s0DCI7hPb6A6YfCD++1FiW7csYh2A7cQZzNgiTvZdnHoEdVa\naP9/u/qSEQqoozBXbUx8ik8TG/165rspr4zCY1f+KpeXkY85f4fQvOPsiaER\nCyFlwdQsB28mBjCyZO2Fo5vR0ubqvwedGgm/tfS3sI8WRRvHaFpILUz3vHwO\n3yQqXMb3zJFSl39/nckF19s/ZFj0Yrl64EP5uchcBse8Z22jdNqeEdblnV9o\nPigPgSEi9VTlkzw4huiDXp+v6bkNazXZlFdZIFhixrvcrOoEtN3ERHjRqJky\nCJYi53me9jkjUCuDm1ehgljlH3k36RsWLIkSDEMiYzkSVnVfzTKS3t+BU8G4\nwabUQAgUNUAnVpjS3aeWLGBTr+3D/OBDu6mIejegWPWeou/essrqNQ2gDogR\nKQ/FLNlt+LnhPC/mipa67QBgd+krvZJ+n5l3zJ/mIqSCNZoNUohnKRWavaWI\n2YUx\r\n=nC6F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"35ad9e58eb8571d57af91747fbaf45b9891a3268","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.30","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.30","@storybook/router":"6.2.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.30","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.30","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.30","@storybook/core-events":"6.2.0-alpha.30","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.30_1613822933172_0.9875236088332984","host":"s3://npm-registry-packages"}},"6.2.0-alpha.31":{"name":"@storybook/ui","version":"6.2.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.31","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"aee290a834fe559c37dc019add90dc47bd187b13","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.31.tgz","fileCount":298,"integrity":"sha512-Y6qsvW41T2kHkWuNg/wyme9fHrdMlxsTW4MxYghmpNOc8q6oaF+rpJ5RvOOHTp7tLLAJUBIDfUyVEl+qDQAwzw==","signatures":[{"sig":"MEUCIQDfIyEpjybjbiR+csqhjjJ+XSB4JDWrEH46DVDGEtQqkAIgRdc4JkzX6SY1CQXtghhcSL1Q5Cf2+DDWTsvyukXFlco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMRKqCRA9TVsSAnZWagAAL6IP/RvMFIngUIuxXkJnJyaI\nZPySB1m0a+vM/qGfTZ4r9JMnrbhbZZvwCghzyunfamUgXvhORGwKgItiV/0j\nZ7qDq8cZgrz0kLg0wLaQ6tvkPNuYdSQ3b7pj3GFuIfN0h8Izgl5Qrqewocf5\nuhpWE7KpKOzgyLWTp59IYL0ar9kHahBbv0PdRDBtLkcXKo5xxj9Hy0cwLxT4\nGcz+l+QzPVleT/4j697bDBIstDSFFr/uscWBNUBFvJCN34zSEk86uPYRe5pE\nid/ISQ1ycS6YzkAi9StW/HSA8eRN3hAMh/7p238W+on0DUF7ECQW2YFEWFN8\ncNWgdzX7u9CzgcTk5xab3XL8VIpvbIr4YfERdBHHzp/Pveo4j5M8UgXLLrt0\n4t5PyDMgu5DBcRJD0krYzBMD0x7b7AR/v3Wf+k8tg7nBgKJEKHJkimAJEN2U\nFI1lEqDZBo/mZ55ajwc2xwWh4qwzPGgMkbjuDT0pb+HK/2i0/XhmXCyGFknW\nd8O9L40C3pBIrSTL98XDipBv4UojyxLBRiVvhcYBQUeq23D4ABxQSc7xdnvw\nPVK8UEZYqrBM/Itw17VLPXw4zoWWS6FLhWEuyuqHn538PSalme/TcQHFLb9P\nMsVfBkjRfkRg/A6IMioKO/nEL+w2DOkk9L+RXk4RUx7kw5wXAxvOLPXyGUOt\nCG+F\r\n=gLAE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"30a22ce4c253224b41558ed46bd7c3e8879d903c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.31","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.31","@storybook/router":"6.2.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.31","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.31","@storybook/core-events":"6.2.0-alpha.31","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.31_1613828778500_0.1780057155755972","host":"s3://npm-registry-packages"}},"6.2.0-alpha.32":{"name":"@storybook/ui","version":"6.2.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.32","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4560f28d23a835810e16010e3f20bea12cf4912a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.32.tgz","fileCount":298,"integrity":"sha512-53GtvU5kHieopKqaEWJ2j8bAvgOAzWJQK0/lJURkFZgVbFSwAv6ioJp6vik4DclYphAh7/cV20dh/GHW4cfExA==","signatures":[{"sig":"MEYCIQCu/A1Jgbc7Vywt1TLzyUeLdbkfbNeJ/6Yi5nvkaGA4zQIhAK1+nlxTqeHodaR9mgAXJ5t41pR2GBUASCQ7jLID6pnI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMh+XCRA9TVsSAnZWagAAZAIP/0dzgiLVYqSBlbIvK+eu\n32XgEflbt0cQmJLEq4ZE+vZqHM1jTLPwuwENZMAnAV4TdyPxjJLijCNC54vj\nIo22lNkZTNji4OmHHt8CvnJ/F9P9bPFfOr6DIH6O1SLr00bxvPxOJU0os7OX\n8FAhcUygo7cMdiVuNEhSDG06gpAJSBg6RO+l7xQSZw7Yc2ULkgtetHkxLrn+\nZylrJm4Ok2a2kdtPZCi7Yh4bMS7Xs5TZsmUBGIyQb6kLObuZfIkuRCu1J2tN\nLiMJlT0Xsik2oeiHnKAcaCma5ODtK8NdYub2vcXXpiFgHXSYir3GpF+S5KhQ\nAaCkv99n/nORnojGu5+GqolIjzxKFQrZdDG4e0OQ5BcGCilp1HOMFZRUiWT9\n//Ahnbg/FEnH7QlAVUwisrw2A6SEU5L+rEu855V8UTaTGsHwDysCgDQBu6eS\nNwodApSuQnon9tupsGiiFImdk9h22nzFLFQ7qecWmm5Zej/5XK7Ynq1VmkbW\nSSTND+U5+TA0gGkbm1Zw1SWTL3YDV2Ghr12OIPHVfG/7FGqxdtvkFUMg0Thz\nxW9MONx6WhznBDKokAXRyOl6PRNS7kz/L/Sgdxc6Tl/VmquiJx/FGmlHcvYo\nzh4Xi2+aOswfvMN8c7Nm0gfEjBTNRBYnN1BbwVJV4kKA/gYBuBSOZnVt9Rwc\noqel\r\n=Z7lC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"cb02d735a85662ca11212a32a805755458246e4b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^2.6.12","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.32","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.32","@storybook/router":"6.2.0-alpha.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.32","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.32","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.32","@storybook/core-events":"6.2.0-alpha.32","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-alpha.32"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.32_1613897622541_0.73825284904273","host":"s3://npm-registry-packages"}},"6.2.0-alpha.33":{"name":"@storybook/ui","version":"6.2.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.33","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ca8a00119ceb0d459830c5b11e1e69901cde8aec","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.33.tgz","fileCount":298,"integrity":"sha512-WCvg/fT1fkWbTmXQROUK+mVHfQ4HTovV9s00xCCJFFPxBqOGtEXUTkYGd0pwzNCsSygLqILLIj/TUn4c7SYtng==","signatures":[{"sig":"MEYCIQCulzlEpOx8JgQRwl5XaHy6eK+09RbV0whrhbeTb3gtMAIhAJqugLwX/V8YJ1By5Mx5N5uRrsZ+U3A1ndSFaC2FFKYd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMw02CRA9TVsSAnZWagAACl4QAKIHHyee0IoVgJPWzGWP\nx7BiBW9qLDW45HiYDoB8pnaJSvHMeCqo/p1nFica96rfls9rv/Mxgr+uchQe\ni35ET2LepMzyoZLqPmrokbzXGoxVdLzWFfElrKW5Br5PhJiEMXzX9/6ZSAZM\nYTg6hqk1j2qY5hWrcIFJXETBi2mJATMEY9dKsMy95rRkWlueoN/AOAnueyVl\nrAjLO3UqK4xO4OysWOcXzcWI2fezFX+xN2fPFfQoAPty4ScM/w5sPxY3YR93\nhcSoZFhNCBMHRFnZsVFu+cKb6VTqG1MCYWC/eGXr8wU6BngTLV2S9oxeoxdk\nO0J1bGxkpLwZGtSsjf0SEDlkkpOXbAJcLaRy3/0P9EkBav2wGnDM1NBzx5sX\nE+OoIMaRUb7XPzSd2z6/OcXVKlOcz6BXU07W8/hxWA8ZJKqzpYlKSZG3Bywv\nNcMqRgdbgFJbT9l4HY4DeqjBuWCxo3r6JRu7XcWUEpEhi8giPFVDjjMPd1ry\n6tCje3oAWd2JKpBG8qt6Nnjm5K8pjRGG33+V3tDfOP0QyMRtpT7jljVa1sHK\ncdWMcOuPsQso7BRV6EZ92LQ9FFMNhB6lCL/O81R4YyfMW3dGp4KTYc2Jk9tS\n2eaQLdtt/h1qX/i5R2eB3PgEGtthp/uDJRdePZ2v5du7TnqMWVw7lZrHfJw/\nfG+R\r\n=I3pp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"149c8bb91b3ac9101fcd90252da87befff97c418","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.33","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.33","@storybook/router":"6.2.0-alpha.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.33","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.33","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.33","@storybook/core-events":"6.2.0-alpha.33","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.33_1613958454107_0.04632129757801007","host":"s3://npm-registry-packages"}},"6.2.0-alpha.34":{"name":"@storybook/ui","version":"6.2.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.34","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"64cb6e32fecfdd85cb5cc92fb3cf8beb06d791b5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.34.tgz","fileCount":298,"integrity":"sha512-GnuwqQLHn1TnwxF2ki+ZcZIuQBXk8J9RAC1Bg+wAX2vrsh69r43dWRAsbuFRKIQ+tWNoQzhOIWtMrtoAu1x7aQ==","signatures":[{"sig":"MEYCIQCutdBfrrJX+Cvg0On1Uqsj6QSowM3mLOLZhCKkj/1KyQIhAPYG9jUhe0281gHYYEHPS4MP3tqYIiOeSMdfYKaKLX+2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM3WqCRA9TVsSAnZWagAAM5QP/j/nTpBvZ0fyJgj1wu9S\nZWwnvmmRn2DE0kQWwJtgMeCPjCuSfOKddx2as48in2jD73AZPbVnn5QcjHVi\nlzTErX25mbNuwmZ5ZsvJaq3dOqKcGBvH2egc6rB255neSevG7LjBaEs85KaZ\nkJtCW2KkInGKlp6zS0g5nmDerFSrneAPgQuMHufp1gGs5W+FtqHB0FyO75iT\nAbMyHwAmhlhIolyj021IhrWzNxMFjOSaTmZVsYADOMQ2kmkzH1SAQkkmkbLd\nPS/qVBj01EpgTiufLH49CvFm0n4+U+76hCc1VvLvTsy6ry7F/kHyElv7kzFj\n9OKqmDLEmYKQ5IdAdtJoAfab2zxkrm5nuQecUsAzxztDpCYjdxt4qc4ycV6b\nUIf3z3ZADitjIq3GLR1G0FA0VknDGzBf0vNRfVM3AS6Odio1xpmg+5zgh8xL\nzpAmLvOwcR16skIWS5GLAod+Cpdkp5B9t1EgBMPj9qoiYOaBfxYiTM7dgGIT\nE9La9TdRbMDLshmneXtZrCMfs/nLmCBWThV0CAQorNggJZaETonhH69mGjtt\nUZjOEcDmU27OKAi9RZSq9mKRIhWeBA+2QuDjCj3KBbfjiDfOBZNSstHAX5z3\nQy0QKskBn/e4xCLWtOep5V/csK1CLksKLWyn+Gx0hXgnjGF6hx4pkfz31F2v\ngHzl\r\n=E0Xi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"557c58032e01ee6c5a5bc0b6f96796afac6d23a3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.34","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.34","@storybook/router":"6.2.0-alpha.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.34","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.34","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.34","@storybook/core-events":"6.2.0-alpha.34","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.34_1613985193614_0.20604174663463115","host":"s3://npm-registry-packages"}},"6.2.0-alpha.35":{"name":"@storybook/ui","version":"6.2.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-alpha.35","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a20559ba84460378dd8e0119cca1db3f58d41b30","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-alpha.35.tgz","fileCount":298,"integrity":"sha512-hEveTlFgELSupomb9yUVvkuUKFAVqRonTE/j71n0YlM3mFth+CJabACzdQ3vWXZZWT44a4ZmC9dK3r8VFccXzg==","signatures":[{"sig":"MEYCIQDmNV1d48uXGIOVnSdW9pIHuiKBVfRA+MJ7/DM2Ru+zhAIhAKzvnscObQe/LdZUkQ2nbogSVuug2lw44QidQT3zEY8v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM8KKCRA9TVsSAnZWagAAKRMP/Rbj+LhHYeNuYCS8wevc\nwkYvErVoclkMAhvTFhs3O9px2/FhiAZvLcc+YV1pQExr/5fgwuNUTs5vZHqZ\nacdO40OVD7YIdDP0HmEFAYT4RFJ+dw3g0lSCmVaVqKGK24fURotfCeNHPFFJ\n/vnGpUZLqn9ZLMdDWycx5eVJiHG21v94Qy+yJEB3gZCoKS/hZ9J5QEXR88aH\nnk+UfMVldTIp2CyFzlFJJB/dRs+lDYyZJ4ETWygBQ7Nx8ytYEablsFy0tsD2\nonsYl++BoOhIn8SBbKyErWpw5fyTuQ546Wq0S2+Ri3gpbpZbO+VpEYOPOB1K\nlDDzPR8OJZHT/Za8UYvU1Cwzfiuc+OHlCLmK/5MrzEGbJhG2A98J23aUp804\n0AA4VRzwlMMxLQGbyMoIHdhi+9zyVndCzyQGu4107Tz2RH9kEnX1sqBx7HGW\nVRFi/rkliyY3wbOCHXC/FnRjhQoA9Ts+TCL3Q93KxFhBp32LP9wbgZSOB9K/\nNLbkAbMzf86DJUgIiagziMACGgGNsCuqV8ETdxcZH0kYaZahTewui8UkmjAP\nayj66pghSw/zPiGseT8Jgst0OpnUuER0mEfoTlapx5Pu0khcQKIJO3G2S6ML\n1sybLzDm13bx9LCkP6hqXhQxFJDSXxV9FjACxDMNnu273aE9sqUbRYgZtu+Y\n88kW\r\n=a0AE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"95cf9c6118e49062ca132f0a853748f1bef8e62e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-alpha.35","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-alpha.35","@storybook/router":"6.2.0-alpha.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-alpha.35","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-alpha.35","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-alpha.35","@storybook/core-events":"6.2.0-alpha.35","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-alpha.35_1614004873486_0.91278884530326","host":"s3://npm-registry-packages"}},"6.2.0-beta.0":{"name":"@storybook/ui","version":"6.2.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.0","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9458d3ceb1bb28c5519fced9689d0c4a7407af6c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.0.tgz","fileCount":298,"integrity":"sha512-1nWlAe4bv3zisYoxhB32sYQMD48p8cmUGPi8KCrOIiN7QAPFfHEG4CYE2ESufy4JM+PfILZcOJdPKF9lvHNE6w==","signatures":[{"sig":"MEYCIQD7mpV14NM+U5TLZ8yUQgT3xJnd0vsFDgApbkX+IuVWGQIhAJmjpj8Cuakqs29FdZILM/QwQLK+MxEfpk5rKrYwZM1f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM9FWCRA9TVsSAnZWagAAHRYP/1lBBX6flL01CuI9cZza\nVfmqUqf95TPozWvn/O8t331m4It7XM89oiAyecqmnd/iZv4woBUympH/3CN5\nSU2omse0qCM1cpQtwl4/YA8FwA75K0/IVXHrbdolM9vYvemXp6K55LA+ZlR3\n+B3jlvxTm/DqX5rgw0RfXo5y57GmflzR3J/npupelB+J8XvAH59nmiBWA66f\ngDrGcWQUA6HFsjMnlS9UzoflpKG9Jc4cM2gmsmjnQD2SgHtMXTXR8fUJXfDi\n5Nl337cUg33iRRZ4n6Gf7AhnntVqCvtUeCfJdBWHtM6LQaaTRkq8A8kaEqoP\n4nDw2OEd+SRTLg/C2y20bF/kCqIAz4Zlx4OlOZ0rvKKr5dP62Fx9RWhTPWME\nwpJzghyY3iVvrHA2JRbP7kQFBOBUw0YGo559T7AC4r/Lh1P73N1bS/oWJK1h\n5C5WY+3aSJeiAvNul5E0cIM6hJn6UNXKXegdhsdKw7hGfiZKRmjlZzA6ejGH\n6twn5uPNMCHl99jFeIbVp+mki8g3wBvxb6yI+1jXWIcAeoHNELadWsQ96hAJ\n8oHEPUzbGbKw/7MVkM7/sYRKgIo4NKeKPXm4OSAfwSKMjMtA7VG1QfMH/nXK\nYfEZOap6lo1VEfys5KfGwHWnd4HbK4rSl0UsXRxB1qgdRoBag/eiZ763vys2\nP2Vy\r\n=I9sY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"88c8da9b94f831ad177256ec58930ddaebe7d32b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.0","@storybook/router":"6.2.0-beta.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.0","@storybook/core-events":"6.2.0-beta.0","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.0_1614008661895_0.6504989828196106","host":"s3://npm-registry-packages"}},"6.1.19":{"name":"@storybook/ui","version":"6.1.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.19","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e9dd23c4e42bd3890e69f7650d5b3487edc3dd46","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.19.tgz","fileCount":254,"integrity":"sha512-pi7B127Zztc4jh9HilGPlItD9nbqtZwoGZnnT0UilzUlr8of8nox/vVD+HW+hK8+f7AZgcCrfI3uzUJB8ECIAQ==","signatures":[{"sig":"MEUCIQDTuDkfq/M3KjUaS5+1ZU0dRCfxcwsqVy/+gszFY/CUegIgHOk23cwrrYKWj4GflohbSpiGfbn73tuRhW2KZCeFFx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHSJCRA9TVsSAnZWagAADhcP/1my9ACAgEDbobMFI9lf\nHENPbCAybugnInOuMsKTuGVry57Q5iv13TubSgG9hSUMhyl/GIzpk9Bzdcav\nSpiG19RJvdfh0/y0EyeJrXSDvXSUKKoB0d5i/msbou+NhW6U/5iNkJZhhBYE\nx6JYs7G8MSM0DBheMwbEJZucabMbKHbr8YxTQoVR82QBPYgdYkXhUL1E62RS\n2YKctCWC6fSToMy2H+1sTkxHA7pcZ0zHc5ZfILx6pG9Z94b9g6gx4a3+Zw/q\n7cJ71ByNebomWhWKG7IC0OAkVyXP/npIs/8GmKwV6KKbiFsF99OZqcpldy/I\ngjzh0SU9laHAxfydD26/4/OVsPx522J9MhdSCyvJEVj00nNmtkeu7YWTRW7F\n40CsC8tCJ8qZKTMBsVobJa4O/K+GDL3likVONitXhYXJaAHoxl618J6nnBaI\n3bsshIBwYKyxDGGh1dsWjV8lrlaaIN7w5klM/0+gCCkdLmR9lfO89E7h/2p3\n8h1kl3UPY5ZXStg1IPpj/JYBlPbnKHit3q26tfa/+IZK5tGBRJGodzjEF2jG\nlJ3Q8ZbNvFojiovtPn3UyxikcNo6MpXJPLWAQOAM6eE3hyI0PKygJJzYdGI9\n5ERhKK1cPpM2V//EZX1jhn2mnZam6czB9qkfdE5JZUotbxagJCOaXulPU2rw\nI0hg\r\n=qteX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"79b72d363eeda84b0df03b821e6c35d59b2875d4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.19","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.19","@storybook/router":"6.1.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.19","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.19","@storybook/core-events":"6.1.19","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.19","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.19","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.19"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.19_1614050440386_0.12896859525181537","host":"s3://npm-registry-packages"}},"6.2.0-beta.1":{"name":"@storybook/ui","version":"6.2.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.1","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"16e67909ddac1bcc04bed303fd64af7bdc74ffa6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.1.tgz","fileCount":298,"integrity":"sha512-4JjuTq4Tm/P95nqGvQRAiwM/JhopFP+2455iC/Yf8UGJiTmrJVjxDdEef3OzCRzo/iAjgqICu7gohAXdkU+taA==","signatures":[{"sig":"MEYCIQCkbdiS0P0jaSxENSZmbCM5BY+eOEILPeMT0OEAJlL4EwIhAKy6Fzcim1RxKkD0HC1ItXjZ66LCRzS3oASlmWH987PQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHq1CRA9TVsSAnZWagAA8lQP/j2bZQLlHtRkw3gc3Vg+\nTy6TAtjiOZXapxN5nPYfwS+RrGPeQjl/3lu0srJnWcnf095i6w0D8Id2DDxa\nPVUvvSWv27YMWI4B2HaJ3xz6MgH4EXI+IgkmtIf88s1iFacBKJEi+d1qjChg\nOCITtCeDHpR3GAl2VILd8Fa7AroiYJIPYAPpcxECsq/rbkxXB6jW/yXrxCiR\n7m7buyv6AZlKkdGetimM6lvyzS9jwAc0N5bSbkEn03uocXVF10VV+ltzlk6v\nE5/9UlojeJXEeq7JflPcp+/4qMuD7Zs732EwKJjzT07fFJyu122KqS3wrqa2\nyfLIdlD/krFfqsyTVD2miuUFcbIel7zMwIcAF1aZPGbOVJsk5fdH8ZqdvBak\n8LulL7qScmMgdoEKN7a0dL4sKoQ/cVL4sTX1+2ejjspaKAJQeAGBk3CCX0+M\nbiBwVUDNyUnc5VNd2jwU7ynGeT0BNJxy47k0kquYIWw8t4nB5vwz7TFzhAVx\nBEJPDvjJLUxllrUW4sf5ShoddJP1xSfsDqenGVbA8LRMbrY5lpmb5SbAZf1M\nXbZ9rwfGLkoVQMEZwryToxX+iD6XCUGn0g8GZJmZvVhN6CPaDzl5bRqjtcyN\nRBPzeEoO8o8h9lbrv0g08/b/BPnIKevcMLQhTaBSdZo421Af48GYjQjMfccT\nJAGl\r\n=Mywp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"409d897e6f20b02cec039db52c2d4aa31ee15a5c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.1","@storybook/router":"6.2.0-beta.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.1","@storybook/core-events":"6.2.0-beta.1","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.1_1614052020797_0.5919501821442379","host":"s3://npm-registry-packages"}},"6.1.20":{"name":"@storybook/ui","version":"6.1.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.20","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ba585e2f600257e9168e8e5cb704c63593daeb69","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.20.tgz","fileCount":254,"integrity":"sha512-XKsSgPjoThIzyxltJercXWRFErF99qOVJWYYCZ6/K0WuYHR4wncRPwN9/ur7BboWFJGWlCJll7fredFAmidP+g==","signatures":[{"sig":"MEYCIQCdLCJyFduewFVWZzhEHlOSyv7djxwvYi6TpI9hLlxTzgIhAOHyFoe4dXKOYMx+o9bLHBAhM7+8BhpXyrHgnHNn44s1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNdoTCRA9TVsSAnZWagAAqkYP/22uFHaO252r2dFoxJr/\nr2Mtki47Knk3JuhX+LBh6l3OhfHMp0NNtX13KYZTpyZvyr5kUJwfQxeRTHQZ\nUqqB9etioBoWF3NBXZ2/8H1RHf8iVFCqdjEE+bnRdI0w4kXcYghBk8zaOjNL\nj+hyIP6beypVPh8etVAoY0J8g6ZftcCYlNA2vtj6pumHrRbBXQJ7VQM+7kgz\nwXozrzTce0J9x9n6NTwUsvVhfXLL3x6QwtntxpHn2RGpnB53oSEFQGt48CCb\nc9UGuKb9uavD/OTPD9UImXLdr7ITQ4XYAp61uIvSQtYDy2ohpeCIBTLzPKp5\n7Zu01R/tEB+CaN7GYhlBJSNN7FX38PSL6h1OXaoOf6aDvyNSKgLem2pRrkgI\nZNgqhwK+DG88ZWv8pRYPtyEUojg1/JI1k5XlvknQ68u/dKgkWXrCQLXsuVd9\nc7DUQpv84D+c7pcbBPwE5JbmCTSjt5ZyG4FVmRf+izhogvcjO4WWsIfMyZ4y\ndW0tLCgEjM/DKRFoCOT2bPF/4mxFBve8hcgFVVyx5kmazHEgKsIOyxb4bbRG\n1S3mQ2S4h9kaJLtY/xcdXZ170ZF6DftjhlP8KhJN+cCf+sRPEyQi1OiNIlFS\nLp+CwtVey+y1LCx20Kx5Ja2H1VbrmnN8sMAyH/cJUN95HGm6Is/nhQY0kJOp\nWXrk\r\n=ENsj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"d09748c50c62a08e0498b681253cbfd9aa16dfc7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.20","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.20","@storybook/router":"6.1.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.20","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.20","@storybook/core-events":"6.1.20","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.20","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.20","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.20"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.20_1614141971011_0.34516267513851706","host":"s3://npm-registry-packages"}},"6.2.0-beta.2":{"name":"@storybook/ui","version":"6.2.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.2","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dadc5e82d5358a81096e16c619a047f403caa4d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.2.tgz","fileCount":298,"integrity":"sha512-tcxw36ZgX6qJo0BbNwjSswwUsgXbELrR4JSmimwixme2X1jXm5gdIMqz4gtkTnj8lN+ExNqGZ47iomig0Jz9qQ==","signatures":[{"sig":"MEYCIQDdm+I0ifS7lf9eHj3MdpmRAsQW2IljOOD7nIXZKje1yAIhAPir+lHFdGoTyd8t7yql5dsBZAKFA4RdlFG2KhdYgwl+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNd5tCRA9TVsSAnZWagAAg9gP/ii2aDEKtCxcn6/u59LT\nYGWT4qruYh5m5pyA3EGtzyJhcsRc5jd2K8ANrH9xDp1EGih5Mn+wzUI5O5I1\nOQKd44IHwiELL0srzg7xlHslvvPtsZdXse/dgSD9ZLGYVCAsU11slU+cwjye\nIYA1/lmAA/xGQQ+c09kPFezcEA5Rx8aAWpmUUsN7hwPEbto9yc0EPNnGWa08\nGHRTB3IiAKb1gsQOtgss+/QNxVYF4xVtQBmbwoXd+ohUCQ4PYBtLJ4k2chsC\nO75LXzsrdbmDrhKXrhjELH9HXRoqrqnQtKmQkNJHEEz62YtAIiEj7OljvZfo\nEu4T/Pprk6H+WZ0ktM0GcP6HDDX5ZY14jw4ZscGcuNilvtqGpzdWrk0ZW9E6\npLbja7apnSNl7ACIBe+fmmWtnCIybyAfr4evFdPFSPlAfofwuztX+bdN7ehd\nvAtlspkhj8bGHx1iCsJRmI/N/tBAXir0/AnDyI66btU2HW1YDxubs1mGg7Js\nDJPZaWzRnEXkxydY1RBBsGlvrXFlB0syFoK1EiBZBM58+LiUFRzB12Jr4ZWZ\ndM1thg43OajFfeqgl+n/izrjDbX9AzLBno9Wtd2s4NFjBFekmym3ZseA9hd2\nsAzpPSpVyNOaZ90+xqhYGyjp75DmVD2VbFJGex//ZgfdXNW4fcKxZcH8YAyK\nOV+T\r\n=iuG9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"6836920db1cfc4bdfff3cead66265e03ec253eb6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.2","@storybook/router":"6.2.0-beta.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.2","@storybook/core-events":"6.2.0-beta.2","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.2_1614143085262_0.2507768653100455","host":"s3://npm-registry-packages"}},"6.2.0-beta.3":{"name":"@storybook/ui","version":"6.2.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.3","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"23a8261e5c93a395d668d122109c2811942ffd53","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.3.tgz","fileCount":298,"integrity":"sha512-y1+4l4SOFzn1HIrkmmaqPTe1hvDUTFCmNhrUX9MXG2WMCAQtgIoKhYUDPCBtrR0PLreP9lqOq7ylKdv69JW7tA==","signatures":[{"sig":"MEYCIQDrSvxpoVb2E5aeJBhgCNDNPQ/9sPmSzZPPN03wk0pDRwIhAPTUtEEF918NyT/iVpLAfXkC6Vo/UYCkdfjiR6+v73/Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2540517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNxlnCRA9TVsSAnZWagAA2VkP/iTNaYzwyqBS0HShygmO\nRxtw5S5PP1RtzoP05J/PN2Lzqqn3v3QQki7eixRhiT+eHZcvTa/B6c79fhMZ\n6Oo/OQCn0nmmX1oESUC3+YonB0H2UyoMx44CYkWKbJ562a2fqd6EF6Pz2fjZ\nOBRxOfcrwInYPblOI/erU/vlzAUwQCc77sacb7k4k5QHt1XrRS5449fBstac\nhh54mijXsqfbwSIcmCbdZIWivZopbAFx/ySN1c4No48jN8BRDFTKmqr5Fck6\n1KC1VNKtd6KDbAqFLISsrSbbl8EDepq43w09NftiaSg9Gn+B0QylldE5B11K\nDL+UUXgmn3cD+S/ct4hpUlhnsaBJ+N4ZskRhiWiEHt49qpnpTNfXPdKR3gag\nq/HDi1us2CYKOVdeMo3CAs16M9rnGnLxXbmP1J0W+3J024HyzssQ2RJHwDpK\n4p5QyJ8yRLvVny1xei7UkmaY/ionPr6r0ckQGwQ98S3K++FIdeiWIAoHqL5/\nTYStaELInb6mKNi8CRjQLyiHv0kRGJguuoI02fHr8l1aMZjmOwpx8UAvFzaB\nN6k87lX58leacHrM5mSFZTFGOmASXs2U7ANCKLREYa5lwtC2fIW7xwAbauFM\nk8wj9xEN4MsxIgiR2wYfw7tEdBPurea/05NhDH1+ABFLAG1TaQP7tvThLpdH\nf9GT\r\n=2GDd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b215c5d3604658fbd70f9a12313a811902813000","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.3","@storybook/router":"6.2.0-beta.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.3","@storybook/core-events":"6.2.0-beta.3","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-beta.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.3_1614223719500_0.9478087875607342","host":"s3://npm-registry-packages"}},"6.2.0-beta.4":{"name":"@storybook/ui","version":"6.2.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.4","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a99c98291c7ca048749e2845c0c7528f45907453","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.4.tgz","fileCount":298,"integrity":"sha512-zogvhoUH4bBgy/RJzIpXC5K6s1esyBb/h6THju6tHjrNniOWZm1siIyEb3wGhX/UhsHpdrcOw5lVuSe3n+22pQ==","signatures":[{"sig":"MEUCID+fbssTvg4vZrJizekj39PkD0s7hLplaI2TcbOU/lzEAiEAn0ADvZ3ylZf6rqIK9y4d8mYO46zPGETDQ1NWAJMDZHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOPLLCRA9TVsSAnZWagAAv1kP/jf0zGxgnHKgZRq2+5hN\nU3lmRJD0e6kiQlYwnRi/YH29RHfViqcMvYVBWIiEgzyWtpvu2Jw+zubmJNMh\nO1e4BHdIrP+nuiMU9G3FoqlBOC9E2lWWFEWGkhG+UhkthyFwFu+B25G3GDK9\nllxXX6rVpTJR6jb0UnnDAjITpVZSNWA8psXNwjyAlMDX4HNBEQ9cTJrWYoIZ\nijcqurtk+tCy67CH6qvfblM/LYmam4Ckjz8u16JLPXhIJrwM/2+2InAsH7fO\njIGNYJiTvaTI6yuDyeCYffJtAJuy0u73pjejPL2jfSwgcTnBJXOsXpfS9g9g\nkwp39C9VxjRUJmDcHxUzo4VSu+ekxdKjVoveTzvoMTCncGLJSvfob/KryT2Y\nBHL1l1BJsT8bfZJCeMX/mkpTAb8jTPQU+IhZKPb83x6tpKbpfKY6ZwEbf1sJ\ny4sMxcHHBC9nntNT8X3/HoTzROqwxkQSwZ5FJfo9ndHN0d9xpRaToJ8IY4pN\nCvzcJFviKSagl8tfPOoRlOd0kL0nJh/LUEyItdfn8TYHQ8EYbNAEcF9uQjTX\nrVb0KOdthbw0oiyIaZk2T/Y2e2/VbadWNgn6v9NsbfbVBdCkaVQHLIgvck3r\ngiBIQp1fhrW8QNppYOtL/R3Te/9xsSsF0WvPjd2Kree4w8Gx1+bMQpbErvrn\nSgTu\r\n=TcW7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"09707a9b0355643753e78a6dd49f047792efae45","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.0.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.0.1","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.4","@storybook/router":"6.2.0-beta.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.4","@storybook/core-events":"6.2.0-beta.4","@types/markdown-to-jsx":"^6.11.3","@hypnosphi/react-sizeme":"^2.6.13","@storybook/client-logger":"6.2.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.4_1614344906544_0.3779893399786831","host":"s3://npm-registry-packages"}},"6.2.0-beta.5":{"name":"@storybook/ui","version":"6.2.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.5","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"db9b2bca5a9a5dbb1485c6a08769a8d77c276d18","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.5.tgz","fileCount":298,"integrity":"sha512-o7IKcAb6W9lSih8XA+TOTLpx/0nAQkYIUgckOegRBhAsCJT3Qwa3aZndYEncvYv1J6v+kgBaEVdA19rOodC0qg==","signatures":[{"sig":"MEYCIQCh+G/s7v2PhQ5utel6k6vtKbPfpCPX4bbZM1NDVhOH0gIhAIGpL8862Kl+OUTAfiprAjtHrdvlfjSh2yMpyBzPcHvf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPQfzCRA9TVsSAnZWagAACqQP/jEhNkGoeAR7aik8LA2l\naMAth3mEyLV1CffvGlYGX/VwrvJ3dbiz0G0HvFH9sDKN78UmW9YYHV/m8JT6\nVr4tlCdaI/3ZPpcvhv2+FsIENhk3fYRGiIHGp+yN0mV9653jltncKkH3Z0eP\nT+GAkwHy/jCkGrgKTGnNH81bxWNP0J+a2znxflv6GZd4SqVmzQzxEsup6+99\nkSBDgP3DARVgykAh5j4QnuCV2NIFEAtWYl62bk8Zyq2H12RMnGIiMazOiuiH\nxAkFZO5NDTtbAbJDl3d1zLa+rVUK1SRNAYYXhtVHrEgIxTDNKaHgLkSXKk/S\nYxUkYERf83oW8OhsT4RrngmtWoWu45qmWe+46InhZhPT3LjP5fwrmKYl0k0u\n1ejdkzl36rjwi5BhSbNQRKkFPTcZgekuVfJ+cqvdK+LoAcrFKSmBp3yE95sH\niJ+wzHhTuak20oJZuPs70GgIRGwWWUGXs33halrYqqxBpELbyRZoi9qW2FaL\nOSmmOkPKe2B/bWEnSj7Uik4GLnkzTVQHuvWRYo2exSU/2/SagJ2ZKvGxwey+\ngLp78pac/gGvpWIM9bebX5stwrUWyBQHJFH57NGIBi06wzpwokVAyqpFIeVD\nUYS+2bq1UBh507bPLt9tvHRDuGNpgCRvKmR9sjvtvNSoEr3IU4qUoC3ih7DG\nGECC\r\n=AhSG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"47c4c3c9da9ba875521d21048feddc5245fecb58","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.19.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.5","@storybook/router":"6.2.0-beta.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.5","@storybook/core-events":"6.2.0-beta.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.5_1614612466822_0.9112859253154946","host":"s3://npm-registry-packages"}},"6.2.0-beta.6":{"name":"@storybook/ui","version":"6.2.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.6","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"44ced24f748cfdb38f9cfd951049f326434d0577","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.6.tgz","fileCount":298,"integrity":"sha512-GvpM4rHcHIyxMGqhpEwAoLL0prEW0uGZaWDm5ECCt3QBzYM/zsqu2MU5DcPSb1Wph2rfWwrw9pJpiQACP7lLwg==","signatures":[{"sig":"MEYCIQDDEkqzmW//4xjbI8XhHBcTXfrejWxlRvqnyH7bXKvLTwIhAJSW/3q2cRobn1ROHaCl8Ec+y5/EU0cIwbjQG4bwDb45","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP21PCRA9TVsSAnZWagAAWEgQAIBs3nawBtDnnNurSNo/\n2slPE/PKsh1b7uiLCj/t9lhJRT2Rg8YjG04v3o0K3enh+sQWynmp+qwEvdPE\n+QDRVlJAY0PICKQLlCzSx6J12PRqNDbrKnQLUbCzteO4xvx0wP4gw01hGnmO\njJfpwvr7tVdrDZzFRmoQifnm2Z+Jmx5JORZvBG1eytCBYAreeWUoUUlGeLSI\nw+4HFHoEME9OowKbcBilB6a1Oa6FRCMbswU5sWTES77tuWkB6Gfvl1NZln2l\nE10W6ggOmjUBUCOXOEYrJmAwUQYjQcPzDURILJfGrGsV7yWWvxb0i6HZ4xe6\nOCryhVPcfUiNvwLIh6AJ9hzYG5BZdSvhnXs2pOUfUeeRAWD1LybeEyT0FTOi\nIh6r3aBhCP5oW9dICh+T0WoPdA0Jr+AycRODTTF8vbURWIVgXKIwUggRtcs9\nQtfSJvhss5i3JYzvTcYckxGsHTG4st3Q/uVPW8hPEE9/MNKXVO1cJdPG1q83\nFukYTw8tvmWjs3exyNfy3W11xHYSg+Ck3RwDd4j53M77CjJIPVXSrj+Jg9QT\nwSebr6lBaESVw3nM2HY1e4YHd5eBy8bePXbRQ6db7e8YnchDEghsHjvDovSg\n2kDINI/27g4mMB9zdlEqPZjK0BjajGx92LJLt60zu5B9PueTiY9bavnNhJsM\nGvd9\r\n=OyjV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"22e2b232d5b087f1eaebd4b41484c23eeda7ad2a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.6","@storybook/router":"6.2.0-beta.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.6","@storybook/core-events":"6.2.0-beta.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.6_1614769487102_0.759924261131042","host":"s3://npm-registry-packages"}},"6.1.21":{"name":"@storybook/ui","version":"6.1.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.1.21","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bf7cac3ba9a6250f573fa1ba12d4592891d5ece2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.1.21.tgz","fileCount":254,"integrity":"sha512-2nRb5egnSBKbosuR7g5PsuM4XnRLXZUf7TBjwT6eRlomnE2wrWM5DtTLpFeUpDob0SI5hPlOV1xCpPz3XmeyyA==","signatures":[{"sig":"MEYCIQCvE9qsK6HrU62lCJxe9xTf/iikjBsFNbfFVsQxBBFzEQIhAP8UTsRWLuoxGek+3L892evWzF4pqt4KDX0n0EBKS5Fa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1531770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP3URCRA9TVsSAnZWagAASb4P/26Fn0cvDMdIWniMGl4s\nDIV3DgaK/cwdvnW5bhJpC49Bfg0W2TIaiWZ1ti+P6udoQwyM5rGbVPonO94x\nnZRvvOdBqMv1Ii3u3ZhDzFQbIEgC69OQ6E0Er88mkxgkg1gDG5S2hl7CJ4Ce\nG24ndgytkrsn88y9vcYucLaLvOYb++YxRCcPc4ZmkXMbtTKLvis0D3EsNFDv\npD459Mf5YBJTAqgrbRN+ysUuMuWcCQ6GPckv7IgnKCdXu+QxdIiuQ88lGa92\nVJUFQ2ktWwaNckn49z/hQcnPmQtBFDzznHmwVnBAORWQArESPEy9M56ywxnO\nbkqjL8IkAbBHVDWQ9fYXnMQaSKXTHAX8X12UUJtsUb0HcRzrbWacyIcaqNmE\nqfbNn+/Osz4rxYwcWxP3kS3RRtG3lLWCLTCw1YCnmVp3nby0fwt3LGt8KRgw\ntZzqzq8j0ikuLoYm5ibG3vPuiX9obgpOSfDDBxyaHbzTp6X+GkACSyvC1rhU\nb+ArWuEzW7GnDth2kbVh6LeHsX8GI7QBgUOStfzry2NfXU/GbhbzL0mXFeFL\nX0vrDEBe/HCeZQuq6LH+GBjyn2jgM7HXW8MqJT7rZQugiil+l7om8rq0Jnes\nrlA/xlxKpIJJKyZ1mIUkiKQnYIiLODCe/+vaXFt72jMGEL87VLESDafoWXp6\ncwo1\r\n=6nz7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"bd1d47e5778d40acbba8fba7ed11c46f9c995273","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.0/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.6.0","global":"^4.3.2","lodash":"^4.17.15","store2":"^2.7.1","core-js":"^3.0.1","fuse.js":"^3.6.1","polished":"^3.4.4","downshift":"^6.0.6","core-js-pure":"^3.0.1","memoizerific":"^1.11.3","react-sizeme":"^2.6.7","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","react-hotkeys":"2.0.0","@storybook/api":"6.1.21","emotion-theming":"^10.0.19","markdown-to-jsx":"^6.11.4","react-draggable":"^4.0.3","@storybook/addons":"6.1.21","@storybook/router":"6.1.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.0.8","@storybook/theming":"6.1.21","react-helmet-async":"^1.0.2","@storybook/channels":"6.1.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.1.21","@storybook/core-events":"6.1.21","@types/markdown-to-jsx":"^6.11.0","@storybook/client-logger":"6.1.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"^4.44.2","chromatic":"^5.0.0","@babel/core":"^7.12.3","babel-loader":"^8.0.6","flush-promises":"^1.0.2","@storybook/react":"6.1.21","terser-webpack-plugin":"^3.0.0","@storybook/addon-knobs":"6.1.21","@testing-library/react":"^10.0.3","@storybook/addon-actions":"6.1.21"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.1.21_1614771472825_0.017226913638936248","host":"s3://npm-registry-packages"}},"6.2.0-beta.8":{"name":"@storybook/ui","version":"6.2.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.8","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cc0b569cc9d3dc81039e709b943de0eb09025b8f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.8.tgz","fileCount":298,"integrity":"sha512-tP6EKwt7pwncOP/S6oq1GLanFth02Ijayz2/ERr+DA7NowSlHP1KFQ44+ZW5rbXGDe7B/X676I0g7PgmZfLa6g==","signatures":[{"sig":"MEQCICjUdFmc2UqoSOl2DN+C0wk7Xw1zRuZTVVdmeV8907vzAiA5Gpw6x7ZZ3l66oqhDnfIrSXVVHJd72Q3Gl2WFcR5NPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQCMrCRA9TVsSAnZWagAAbg8P+wVCR2d7HjQLL1itxPMX\nDxCLetlPGbNt4YIXA6axhiCqGtR6rpWfnPaJBiIeBR53haCl8SKnj55kADbo\noknBP8skMMzbvce9R/cTNSICmT3Xtkezqx/85F+8JNeBHyK6CKQ9LOIzJPly\n9DoILt2LVxLVRMVtBdUkuemo77S0sxzOfKIt5kSc4SwDHy2Y0S5+3W1SVpRH\nhudWEpHcEa4GeXKFYl12BS3l51CJZuwnRKrcvZcyDvXm9fGH016XTxbH4zOT\nk2+HCNXJrecQo3qvuEvUV8XsVPLzRFPfsSLKSjXykv9Cu3SuNzW7K0SwCzAv\nIVtuRfcgbruvcNf9Z1A4gxgtyzNpCMDqBYNHT2kq1rBCCacYhu9N3LEMqwHh\nhbdnfc8SZsMMzeDEKjHCHXmReWMmB4TzzH4+Ec00VHDjlHVVYjgI48fKGDtx\nsPOfPNrVKDbbwbBGt+1Jex2qvduQPO9CHyf/7gow9n1TN3w6MHLaatiRrwlO\n5gftlClnr/e0mg1t8JdC8eQItVjHJj19RxPO0BEVJo7awCmEJGTwWc5ZOBpk\nX+vFI2XukzCCQWKdB0ueUs4cxNuw5yswSUSbxNeYc8YUIk8cuCklzSB/RukQ\nkKJaMp8RdCD5XY995FIuIAtcSFVrRdmTzj9iq5DxzK4goDgX/Up0t5PKs5MF\nP1/b\r\n=4ca1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8bc0fd1fa33393abe53b1b1fca19501d0f22f6e1","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.8","@storybook/router":"6.2.0-beta.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.8","@storybook/core-events":"6.2.0-beta.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.8_1614816043233_0.803935657990418","host":"s3://npm-registry-packages"}},"6.2.0-beta.9":{"name":"@storybook/ui","version":"6.2.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.9","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ff393671dd91408d7f0a171b45940e3c7acd2e4c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.9.tgz","fileCount":298,"integrity":"sha512-w4IrxKShUxtGMD/YzKsorZBH8oLJ5m5kZ6oa9EUNW08X2NExtxNzP9Y8jOo0bLHChGedB5PT6bA/KK6Du60Naw==","signatures":[{"sig":"MEYCIQCz4olAud0pSoaeH03Zj9foqqbRgQBvBT8NnDVUJDpiCAIhAMuDApaTk9hI3+G0upinVAsaqFSYH7s+4uIpuPaARWDy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQL+DCRA9TVsSAnZWagAAG1MQAIIVO98E1YUUetEPo7aI\ndg8ZFAOuESuM+HtesjjgGnZDaLY3NIvsobN0guEw0cFErN0q6WPiYe8tBkGt\nGjDAACVOkoa5puiV4VqYPHg839flo3jaUkmhe6fAOvrXft7aK+uCOdSOwSDB\nwRWBZZb8AJG8EMljkyPbQh7EeXG6KaKmYaNDYCQIlLbambO85K70DMlXt4l0\nkUfJoY3nNtwX+rEevMzeIcCU2AhdYLNK0lrT+A44F9ykjIBdssrVG9dxl5n6\nwCQK6lDKVdlrTml03qfU04Jjl59uNA3ew60yCikNqU8o4/HfCLAP8h3v4gGL\nBlGdHKLMfWITLb9MifW/b2BS2HPAyZF+LzwIuWug2R1NlPMLpdDXEFbyOVZI\npj940anvKtF/qZeuLpF6cmF4ibbhrY7KOav/4raDSseoEW7AT1GNsMAGq9g7\n5oWz/ICFnAnsAUDlHfduiVbpp2R5+L6PsPGxMSJzraxkFeWYdw0SBTzDMDzE\noZLaOxgEYShVQoBQiCT6Oz2U6wlZb8LVtR0BQ6MD795FomnUduOooKIHmUPt\nQoR6OjoVIMbfALUtcnaNitaKT7Ns5jPt8oHmb20kFAnDXLnMXwCk0YRtiuIg\nKziKCortcPsXrAwndgGmXLu8slC0Z43aMAOkQzqy4gtdaXmxptVnrXosXNEJ\negeq\r\n=Mmyt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a0dbf155e318c14aad93267d1a3ab8bcee87cc67","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.9","@storybook/router":"6.2.0-beta.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.9","@storybook/core-events":"6.2.0-beta.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.9_1614856066388_0.14121361522463705","host":"s3://npm-registry-packages"}},"6.2.0-beta.10":{"name":"@storybook/ui","version":"6.2.0-beta.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.10","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c1afbc742beb38fd9abdb6e8259a6243a327695e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.10.tgz","fileCount":298,"integrity":"sha512-8dtMsI1TpfAoaCpNC/yPvGdvBGkbRvenJsQelgli2mb54gZKIvwOQ6yTnW9ChhJ0RVDm1NWN2+VPv0pluluZYw==","signatures":[{"sig":"MEUCIHN+cBQLboX/I8gtV7/o9XLIkjxe3G2mXr8nqQvmaydlAiEAlypEs0TiIrV+Hxh+bvL6Ahh9cHHC/GcAhrTzJoCbsps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQgBjCRA9TVsSAnZWagAAttIQAIakybqOOSJTPCQs2j2m\nWYJpJRnUrIQmjoTY7BAQa5x4BM1gaDF2yQf1WFavomCFQ1HnzbsVuTwT6abN\n61HPe/3ylXbrYwguNb9vU5dl34FJ5lpx/ABOHWAhKjjtI/enWqG5b1vlHjuC\neaYWMGnwc31hfqyjwSG+W8//LNG5d26V5dYx7Q0qF0lrz8Mgi1pLQLZ5ztTe\n8BdvbZ5592chyRjckEJRV0NS2yG1+yHZUzZkAfTALuRj15Q6XvsY58zKwwZc\ninjoVqmfpuLHWWsS9lgu0uyUbuJ904ST+70lOYzmvYXVMAX0u9OYy8t/24mk\n1105tKco5Hvk30Sx3r2qWYIeqKoKMyERnmdQjTuXDmmP9EI2wT4NmqybZlxk\nsNhgZiMXG1jZMsQKFNUS4Z7E7a6+obmKwtfwR3PJWJqwjdqX2Jd0qkOpXHsB\nLPoonpA0vMHisDoaw0oyRjJE2XyUxX+dsDwxd2wTqGIz+YG+iIJxGhcFGYNe\nmjqP/878EDAFuTAQyt9UeZ2+CwGnTJYUPy8Ym8knF+aCarFG5mjcgQkHd6uP\nAEbItG7IEMoQukbzdZTMx7mdk/cXLYF45Xe9KvlS+kkB89QsqHXAHD7QzR1t\nNdbJ80U10WM0Km6oOPq8K1OKVhJQu/cpsMZsxhNeTqnlZRC8IA3TLAD6KkQX\nB0Hi\r\n=h2ha\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"50cd75edcdf233ac05231f8f0a95643e6e2b52a3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.10","@storybook/router":"6.2.0-beta.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.10","@storybook/core-events":"6.2.0-beta.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.10_1614938196764_0.6723318593071419","host":"s3://npm-registry-packages"}},"6.2.0-beta.11":{"name":"@storybook/ui","version":"6.2.0-beta.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.11","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c812307529f5b0eb36c7b4f0c90485899428d59c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.11.tgz","fileCount":298,"integrity":"sha512-/muYGNKpVRg7uUGH/sMKykd9vRBHDj5Rcb6FRtT1cghFDeRFBIEY0N7VvEWEHxNQME0A4+JAno86MvdbJHjsWw==","signatures":[{"sig":"MEUCIFQ/Cwsuopwa6p+zb5jjXRWJnEG9szGu3mIUHpGx/Ms+AiEAk6oWu6fIL8/4dVqfaN2K9yjtLp3+5PyzLNIS3n98ImA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRlXJCRA9TVsSAnZWagAAXCcP/1IgWMbj875b6EVtxCoC\nYp2G3Y6QSiB/IM2elvqTy0FLJ3e5EZUVFL9JLs2XXwxyF9K0qEEn9kCbPzuy\nGFKG7I9HDzBn3zcnx0CM6zBzxZLaAImXBHFG1NeTmZ1AqC/aHcVaXndJnoUq\nG+4fgCEt24JKcuBBn/oqR4gRbr+e3wAp63NU6KQf2SE+ZrzG6sQaYsF5DmYT\nsFGTMUP8KkN02NPF8g3c6kFE6J0e46Zbs5fbnUZ5y1oL97ZN1EpK4yPpcu63\npyjHAd2eejLkU1dwPFhQGFvjxpAf0FEnC4KehqJd/1tdjHfSvK8zztfRzTZw\nlGAuxKbcXoZEvAVEKyOyO603zSPd+JThggn19FghTwjnY+6/bFku8ibP/0yD\njY+nl0MRLPsFksAwiDioQoa3Usk4KFw74mgAbEf3jqMV4gR+FJ3tH7+zei7J\n74Zdtr7BT65dTXElsSBmGIGqh1Fy7uw/g/Ad4jPacFl4YxaGJZHBRreWHbWt\nJPnsQ9eUsw2ZjSWYnP+ULUGBpfbzlvs2VauIRdHOttVoEY+Gh9fSmuJS8rVn\nei/UtT25qOCDr+/WijqxSp93mgVEWKkCe24P/bHNdrIDVDxyOfz2hNjhO1Pv\ndRjkyhgQCiUD5i4LPl8bpEhojMiAXwhu4RqkwTQkQEn29RaAWtvMvVAf7S6w\nUnx3\r\n=2Fuf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8a25609d3080e5d1ba14d8e7111626d4770d5740","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.11","@storybook/router":"6.2.0-beta.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.11","@storybook/core-events":"6.2.0-beta.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.11_1615222217261_0.2545265000171839","host":"s3://npm-registry-packages"}},"6.2.0-beta.12":{"name":"@storybook/ui","version":"6.2.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.12","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fa7dc2ee8258a586e7d0ef469b29a7ee9ebcc06d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.12.tgz","fileCount":298,"integrity":"sha512-Mfsu2e3VaCsLmYBC0zX8nz8PXgVkmAxu+8sBPm+X0zriEyy8HQ8rw/yFs8UKRO861lgys9t7E4ztr/lKQV8qwg==","signatures":[{"sig":"MEUCIEmwl/yeDE3Zhplsu2AS67+VNWXgtrLYt+jjYJNJWGYTAiEAuY2S/cPesiKoX07QO/XB/OvMgX1PNJ760J0UaAu2Zac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSARdCRA9TVsSAnZWagAAD2QQAJtgQMoqUwanYUtXi25d\nvrLYSNc5CbXWmb6jwja8EFfgvaXOjF//Vk+iMpSAIWU7eMa/lPSvbnbmTeNi\nxvShilAE1sfgsQtJTTPxBoae0T1lVWvlNC2ViRTgisD/9gNovhPu3Ok/2v6W\n6/7xDVay/PIQterTLqYGXoYC7FGYwri01x1BwbKRLti189c78Hbc2F4qPsw4\nDhV9CTbOredIlfq4I1BwZfzdsC3A8IR2R7hrjd4fAOqeLsW3W9IPGhVQTwtw\n0MOpqVzT0cTE63LWpSkJep42rZLqu+mPTqpyHoSryEf3deGli8YJ/PjH2cx6\n0G7VyK8X6JUsJIsgYTkZXuSwho6F2sPDb1OBnbtZmW7CNK1L3ifMAtXrgTz2\ndqKKPJVx0COVtIZwpCXyeCbM4K/uOrGcVQ/Si8LvUoubzrzbJhBHjcKsF2SD\nIRumyZH1vX8+nUbqOTbXBWXRkkGuvmX9mD5/uOk3VJoGAiCXQMQxWnqsgnBE\nyTzQqgixbV2gXx+MA6NZjNvzvWKcC70RV/hXJ/EBHp0/Aky9fcOSI+/a0GfY\nbQYJ5WUn2cf6zb3V2J3ykCudJ2vrBkLzgyymCnuaKWs4nsC/7yqa5i4XxSOa\nYMHSTGiHQt4lslGH1+yeUcACBVsyF6DGyQxn37+nAiNMxu3ra46qs8h+zq9Z\nntfX\r\n=jLGY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2151d99b4ea5e2bdd9634055f55e05e46ab50c74","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.12","@storybook/router":"6.2.0-beta.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.12","@storybook/core-events":"6.2.0-beta.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.12_1615332444995_0.8351199388014376","host":"s3://npm-registry-packages"}},"6.2.0-beta.13":{"name":"@storybook/ui","version":"6.2.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.13","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4158fa5581b69641e9eb06ea473c48acd3a9136a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.13.tgz","fileCount":298,"integrity":"sha512-Otp5hHnucS1mG8DluBCHDFsZbEBRyEfEQb2HlXUKUuG+MWCk3EkgWEyovC/oDo52xNlYtOJ1eqXg6/r4oCK3Pw==","signatures":[{"sig":"MEYCIQCI2T5tuMDasKDfH8aauIL9XBnjICNmR2NMqUICbWR2hwIhAMg1QxEKxPGgNTXnFIFNnxEHAjdBeHQtUlGoh2/mmPL0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSUlhCRA9TVsSAnZWagAAtgYP/3Ceb3wECsAsbm/YJ/tt\nsRkJ696dyZrroGPsyPeb/zKGwK1DZOnsJNvTxmnuTpkO/zxPa3CzIBKWvogt\nfChUciNKUMyA2lrvAuy1XMNXr/09qZMfFMSDHd9lVhYMeLQ36BYKCJxlkIkA\nSIiT5DuRbzdA3TwGH78NM7crfx9/6vrG4sSK6OASlU1bnMLX5Cnz7e1j5GX2\n3/JW3M+dpt9cDyfw2YtU1gwP50G6lkDH7kTZwavi5WoM6fu5mVeQrfuAb8KX\nZ9XzYr0ACYoihOJcC37WRV+i4IB7DmrkbIQhqmIRVv6dgXSAcm7zl5F5Azw3\nH90558wYTe58aD2MyJOKa4mEQHEmw+baVPlgbeC17s3mmBdh2CztLX7hqXFL\nL81HmvbIP0OqVW8Gu3enahP6XYzwSp/khgRT0iqaX4DI6OruoNVcRgItR3Xk\nuATPiaV50Nhy7g+qWf3Vv66Vv/n2sQgO2eEhUIc6PtwitlKeZQHgbksokKRC\n2VRWgq+IQt9/v6+TDm1q4EHXqXzJUQkwda6geY1zeJCXzhrIzmrPfbvHbduW\npuNxsp8Rcl6RnuFaLwYhr/Bwdo5c0GHi/ER5YrdcJOYqIkW+k9p9O7GM5ayc\nOeCwcg0TVRsOlK3qhmdwiivgHoRdYBqm/6yXchqvR5ED10KAWXZkJgHyDhTI\ntunC\r\n=bCWh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9b7aad4bda5a705ae6faaaaae64c0eaee4cf99c5","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.13","@storybook/router":"6.2.0-beta.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.13","@storybook/core-events":"6.2.0-beta.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.13_1615415648658_0.01932023866672483","host":"s3://npm-registry-packages"}},"6.2.0-beta.14":{"name":"@storybook/ui","version":"6.2.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.14","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e9034c3f6b793c0473fd432a31720e94375d509a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.14.tgz","fileCount":298,"integrity":"sha512-TbiJy5UaJ0IpGz6WkLXK7ONzcAvMY8qKm5QpVQe2NIOinf/cETchOhJu8iW3aAX7C8eNTLsNPf9lNi1y141Lsg==","signatures":[{"sig":"MEUCIQDHtOUv8Th8O+WIWoKveu2iMBnN01eVZHPJbqlU43gYJwIgDcuB+l1mjcFv8A3dZYzZ9fPy6Bw7MwIH3Fh81YJCR8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSiN1CRA9TVsSAnZWagAAnoEP/AmNpgbGy6TU6Tk13KYi\nSk2YnmpeIMyaTL8DrygMcVVZj+klG8SbHOSve99m92toH1CHvp+eI8VgxSSo\nVDqapQJdUJGBuFgP7slBOSf2h1VLgOpR7OGVxdVF029QslnjWQI0NGA+zCNi\nqUcPRJrnXNqjyhLnN3mUJ2vlcClnQQ5gW7HF03dckr9HKGULLLWelPMVu1oE\nL16LInuH5qUKOPyQ46QgHEmKhTv4aBOMHjah/SERR1yLBZmKm2Y5qrmMEvVo\nI/PsWG8QsPAZFSe9TIkw/QIsGpo3F6gOe3E8Yy6Ve4EGwykSZj/pqH0Azoh1\nB4asoA73YU7k1Rk9K47qNRdqIDAzaTUwkQf5IA+aI+Bmbxpx6YBpThI/wqVT\n2Ms3vWPNgMJgktRhgUtRS0j+Xtr+rlfbFg7I/EcjHQ/6ddptQnPgdszkSTJD\niQL2F2Mz/30NDzKxKfChB6884l896R9KWcxJT6KonUGkJrmCg1dQCvhgOK0l\nccM/MRE4xM8ULl3moL4KUhD669NktwzUbGpA/0MA800itUAXqERTvlR778Ji\nH8KCsu9WwrxRLSrbRII0NTmkq1Eypdq6aEFrK+S8Apk2/iud7PcJSsr/Ahv5\neTF24DBPu5uUjoAMLCFLWGvviAST6PI9MmyMgXTBXTsHi8/E+iiW3n1cK9mZ\nADYa\r\n=cZqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"45957443c70b308214c9eb52cb048e7e488153c6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.14","@storybook/router":"6.2.0-beta.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.14","@storybook/core-events":"6.2.0-beta.14","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.14_1615471476895_0.6320461456336941","host":"s3://npm-registry-packages"}},"6.2.0-beta.15":{"name":"@storybook/ui","version":"6.2.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-beta.15","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"803f9396c66946480f02f484eaca40b07487c67b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-beta.15.tgz","fileCount":298,"integrity":"sha512-9u2Vv1jFiwTNmlzWyW/1ZDKBu4vBZv76CF1y+SrvUpm+HYQu/4J3QjAYmxCHTyw76FH2I5OKDrR9/5fztc31SA==","signatures":[{"sig":"MEYCIQD3EzmHqjtwRm6ATsHYhlS1Sp0W3k9M6Urdy+YVcykeYwIhAIUvYWY5uel6W8G0+mDixpKYUw63OfXG8B3Aqs0UOgaF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT0ORCRA9TVsSAnZWagAAN8gP/0QGV08juYl8l7cRnvGy\nofw0hDquiFpgBXBqUpSp72Z3RDZffqK/1fdx4YIUkIVRKpf74cqP3kdQKxpK\n5wy/gdpbesO5j96509QUCmXqWGtvELnb1+mNeA5sRoUmFyfJatvxGY898dfP\nZ/IYsZPiRmFV+5k4troCupOeKKDYSwt0FFJ9yPVKeHhXPNUaAUM3spN8Ru3W\nnErtyuMy09jvZZRvb20gLpopOuebMns5aLnON9dfCFUYqYGF25yJ/vnoPwmD\nMLnIhyWZLm3dy9nn5KtYw20Q/kHWeBqM9voyXDk3Fu9/wFsYJlYuF1dF1XwB\nkPMl6OySKZS/B4k9cBFubBTQP2TkY5J1N3bSlL7sPE1SUHGUunvby9VlkU8z\ncQR/ad3atSP+1dgBu4XWyZPqTtfBKyjFu/JusIQdMUVbH7d81R04wXI3CmLZ\nGbiQxNszjKyxLE19hRavQ+zVfrdQkhake+B/ri0hPof4hfgSovRmXGJV2VCY\nneSwYexkvOhfqGEwsBpR6mkRMkQJBZPtcq4Jf8/3g6y2ExnpUFvvDG7cs1IQ\nIgvfd672x3X+Ho6Xl6KDYM51Fx1Eg7beiQ6touJlB15ua9XE1hsHDcrSRmev\naBZlYYRVSgLQUBHwYg20Hm37cBtoPnNPT3XAx/dSAI6Iiu0ZVZYQuqyZUzRQ\n/clC\r\n=0/9D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5b98c49f03094b94112f719edd5626100b21db47","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-beta.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-beta.15","@storybook/router":"6.2.0-beta.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-beta.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-beta.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-beta.15","@storybook/core-events":"6.2.0-beta.15","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-beta.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-beta.15_1615807376801_0.8190564059762373","host":"s3://npm-registry-packages"}},"6.2.0-rc.0":{"name":"@storybook/ui","version":"6.2.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.0","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"46beef1afa3bf3213a97b68419176189a61c729b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.0.tgz","fileCount":298,"integrity":"sha512-Ky4tCQEGTeYvpFGj8hQUe0fN+gxy6oOoiavAUla9lKm5ruSHQ8As6YTEL/qAVBb8cOWF2R6myWNHTNk0vLKTJw==","signatures":[{"sig":"MEUCICJobOl2i2PY4XkbXsuOz/RwY5QNFkM1Y+kMlZYUJw0LAiEA6uFzoWGriS01TjNngNJtwE7JAx6h8HIUotHBi158lvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT3fxCRA9TVsSAnZWagAAFmUP/0LBbSz8ZLG4CaUkqFdm\nyYiG4KbwVLPmko8UYQPXH8RrOL7V9PE8VhhUBclEtSVleRisX6bCa+UbZGZD\nKgkqVpQsPwiiimr3WHM5Y3JI4nLlzwEblojwO627VPA57mXJvVWBuOMHlp/M\nA4KqaMrjG4RgRDhOLydrrzajkI+G35aonNiJbgnOXjzoxtaqfoaQo4krG2fV\nVr7APLBFchDBWMGhiYSGXnaSBVQJYQYAuL4F2W54lVpmi8StkUkeOW8lzo4i\naVTqXdDRL7RgawARwWuU/BTisW2L9+DfjT51mR+hzBrvigHfcI5HArXm64o3\noPuFUjM2kRiKfp5uZqMokQ1QCRyQ0U78mhDkpsxiunqhKe8wjHq2718DWPMo\ndqlIsDJz7r7byzPw3twcII0k9xvCBL789OuSmucUBUtkzI9N5dl9/svU1xjD\nvuwfs0JUXM0hKMw5thykSAKE5VWv484UudCs68SD5W1x5UCgMTe/wQgo07rK\nCrE3jAY4CPXJ/4nwR4ATqJnPmWECBUlLBKlepBtjtoGQQuXnYOY9GNz42PvJ\nKU5xChZQv8TY8qoLa3TQEFbMRS2/F2EppjuDKY5rThYd/l+htT5pbYW076WQ\ne7ONUQR0KDnZqVpYe9NCXdEFN7StpaJcr6nJ00e60CnEgycCbRsOshynEGYn\nOjv8\r\n=LY5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a5b8c05aea4fa183a510103ec5b0d2f7754b1f50","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.0","@storybook/router":"6.2.0-rc.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.0","@storybook/core-events":"6.2.0-rc.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.0_1615820785064_0.9621351423213877","host":"s3://npm-registry-packages"}},"6.2.0-rc.1":{"name":"@storybook/ui","version":"6.2.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.1","maintainers":[{"name":"anonymous","email":"blaine.bublitz@gmail.com"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"bodin.alex@gmail.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"dduan@yahoo.com"},{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"pavan.sss1991@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"gytis.vinclovas@gmail.com"},{"name":"anonymous","email":"dom@hichroma.com"},{"name":"anonymous","email":"regx@usul.su"},{"name":"anonymous","email":"susskyle@gmail.com"},{"name":"anonymous","email":"info@ghengeveld.nl"},{"name":"anonymous","email":"patrick.gotthardt@trivago.com"},{"name":"anonymous","email":"me@dandean.com"},{"name":"anonymous","email":"wilsonc.alexander@gmail.com"},{"name":"anonymous","email":"mrmckeb.npm@outlook.com"},{"name":"anonymous","email":"danny.h.williams@hotmail.com"},{"name":"anonymous","email":"varunvachhar@gmail.com"},{"name":"anonymous","email":"vasikarla.raj@gmail.com"},{"name":"anonymous","email":"ahnmalik2@gmail.com"},{"name":"anonymous","email":"lshadler13@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c39a7259dea0f3e012a3cbd4c7ed5fa3ed7d28fa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.1.tgz","fileCount":298,"integrity":"sha512-cPxqk7H111sZ8fvo6HkThHmO2w3hzmBMfzVJCrUviVJxRVKJKFz4kphqYETEKgxq7rEA4NFm/az3QTNn/YnyGA==","signatures":[{"sig":"MEYCIQDv6Iy1MeygtkPqU2jnATvMe9bc2ePP81GEpJzoB0RgewIhAMmKn3X9UoH8cW/SePL6oNbiJPeZL32xAZ6C1mqzloxh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMaYCRA9TVsSAnZWagAA55kP/3K9hpkdemRFwXSL7lIT\n/e7PBzfneSyh7S0o1jZxLinp4oZ+vQnvfIHgunIgHKO30+PlE1ImeCWuqjvo\nEodXgHlF2/4/JXTjVJOyxUoRHhM0HTPFJvSGS9cR4JZQoi/382m0hk+6LJpr\nEJ5tH/ycXv8Ei26OsIpgqI7+E7y4xlW4kgBTA1vUbMMfeAQ7yt2yRLaqVB3X\nzyBa7K5cYBKST2z0H4DQMyLdfqNrME6mCV7QXbJetnDzCmZbYoV37RKJ2AeC\ni2If7cY0fU++utPWhQUn2TzODG51yZlprHxM37uK12MrCrAi+ThLPgxm+54J\nzbdtrXwuy1DMq4n+4MAx3khTdr3M42exPlERT2iuWPe4knAFnhUHBfu6YC9K\nN9AkXfgk9SsAtsMN/Klfb8OZA4c/TwzMBVyUdaoTAG5WzIz17xutdDju3Fv6\nMe7Rj9/q5TgC1aNMjB37tqH9kjJPzcAEP3ahIA+u1OfCtk3l5bFRNii7/rRS\nK38sipesuQ1yfl59LaG2LjvzHJ1P8LrpoiNchIPgg0jqjfQ84BmzMOHFtAsI\nKnTfpQ+YVwZlLpVpwFXHo7kSKiemwwgdRYTghwurGJWGSbHRnpXD+ipI+zcQ\nVZbN0tBQvW1roPlfU0w1HeKlHrkku+2I4mvOfrz3aJfzbnsHAaWZ+sRZxqSk\nxPUW\r\n=/q+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8719fe697c922d330220851a341380546ba668e4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.1","@storybook/router":"6.2.0-rc.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.1","@storybook/core-events":"6.2.0-rc.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.1_1615906455816_0.9591656047836143","host":"s3://npm-registry-packages"}},"6.2.0-rc.2":{"name":"@storybook/ui","version":"6.2.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fafbd721623325fb9fbdef7675b8d537a9d6f878","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.2.tgz","fileCount":298,"integrity":"sha512-IDIjNiiKV8K34dqaRNuiC6j+w1T/9e4CM2muqa4HJTBHw8Jg9tmfpBMlkRUAdqeUxrFqzjmxpZljvawVnwc4UQ==","signatures":[{"sig":"MEQCIBmD+LqRH6IcIKvhMxJCsPwuiOL11yO2WvAdO7Seim4eAiBkHWhrjq+mwkM0miIUHZLkYdtEKkHCsB0wjVIhhJrSNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUdR/CRA9TVsSAnZWagAApzUP/j2Yl7/sd/DNQS8Jlv7e\n0Pm3PHTgB9cOO5oqGnwO7z3Wiwh3oij9KNJDEbL4H60U6AXAr8b2ffHczOFm\ngy/vOH+oPcNKdNLbs6wMEf/lD0/mykQCqvf1ApER5I/FUW8r0jYJdr4bVuvT\nACqjQt2zpLoADfFuxxVM5gRt2KwgDMozqhfyAQJ91DrB8TjaeOfCHz5vpTMQ\nX81FgA+NIlsPTWOsX5h1/GxS1vUarXT0VJQJAiUvI8k4eP6Pur2nh/OinFfy\nHfgQcVA51tzVqyIOxbo3lGnWcJoJ7+t8RhehTQK8ML1JbPR3Ahzu5MlHBJ60\nO5M4YS2OnG/pS0nHHICmKegSA9nrFIwxO1KJtHOQEnPyRpSOE1odUGlOR8kZ\nXv0V57oMnhKZoRxxF27k9VJekTpEqL2LE8JWjWe760zJJEFT4bwe5uMgqTui\nP54vb9jXnVE3BC5mc7kcXl6KQEZB3PT3HTXScqi5zmN0zYrDNoM06C3K6E4p\nXgOGC8dkNZgKNGNIzbmBsUA6G+Xex++bmEv1lziIxHu3OqsgKElFSZUxJYdX\n5WDjB2naeldQGETD63+ne4kC7Uk0EcgRXcdbaFRaUZ7N8QWwdTpnXGoX6w6N\nEfS8nLt54FwXEWOXVl6dcjHsLyRXVCODNxTlwHplYbSReP3tmO1aRb+SK6YF\n1KsW\r\n=j3ju\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2d47a4b64557a6bc94213b7c841014bd90ce7ef5","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.10.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.10.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.2","@storybook/router":"6.2.0-rc.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.2","@storybook/core-events":"6.2.0-rc.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.2_1615975550739_0.9674019722220868","host":"s3://npm-registry-packages"}},"6.2.0-rc.3":{"name":"@storybook/ui","version":"6.2.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"698d8292e4a5c4ffea42560cc898b8782ea5546b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.3.tgz","fileCount":298,"integrity":"sha512-JcIdFGhHBT32GlCVjnW1kaAkrSbo6qMUZ2mnsCqvxL0gWenM8fHHyPiMPxyuXxhwQsBht3xmnd6ntB4lM9kPRQ==","signatures":[{"sig":"MEYCIQCSso3Ab/OL1FCLzpFld6fjRsIJ6Ysi0I1i/WpMWKPakwIhAPyEEG54ncVu0X6eGJr58/AwLJ57TONgqzLHUhVhNWLc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU16RCRA9TVsSAnZWagAAPegP/iZ0sETZdOd/CtXmfFO4\nrNe5KretXZuOOjR6wERDfsvAmiPYhOyCmobzFnCE13hRs38lAMTu0gYQqXyF\n+cu54I9zU1w5FgMQ/pT5fTpnXAkwABRy5iCO4bUk3x64Wb2ebZH8eLkCTrSh\n/H3UhCvUotDd8JZoRtpxLV+GOvwBWH++3GeFTlP2Ii/ByOgB7Qgci1ec/2em\nc4hVZy9tD2uY2xARqtk/fuX+4+wFrZtLDIKd/kQMGidx3k8ln9Lua8mqkcdW\nI0pTpkp3spfDhS7lGIeyzB7tDVNEwo5N7bm/s6kwT8eDLDn8xNAqb01apUfW\nS17YJRsiIT9HmNt5scvIfRrCzKYvPkjXKmuvz9FRXx/JqCt/W3v+Eg0BOiVq\nm10WoieLBvAgBceQA2KCEj7H3kCbUV4Ue7E0Zw+X0HeTytNk4yGK5NG98akR\n6ekkpB3VK+T9APN7ASFhlBNk2/NbMWSgqrGQauDzzL/UEQ8/wc9fQi0S4GXU\nwiRoWGcGauC1/U2owyRUD3U/vw3IJ17sv57MRWJF2uh5YQma5JRRALmTK0JP\n2xzK+uCAuPkvQ33elc5nuXGoO96O9ByT7NlUDpl5W4He4objyhKVWdWsw8hZ\nSB3WdXJ12/k4ueFfXMDthZ8xb+O+J39lh0gez1m4Bebwt21rroWwY3sPaz/P\njcJD\r\n=HMHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8330d79a3da94e45418d82d2828cb6f8525fc677","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.3","@storybook/router":"6.2.0-rc.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.3","@storybook/core-events":"6.2.0-rc.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.3_1616076433501_0.24538487911495332","host":"s3://npm-registry-packages"}},"6.2.0-rc.4":{"name":"@storybook/ui","version":"6.2.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"34fbee3b2b93af6bc8ab6b5c6760e26467171e5e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.4.tgz","fileCount":298,"integrity":"sha512-ECYZtnjChMFNeg2gWoRCGv7mna8650Ea6CBlUBclMVgJdVEK02ySjdfKcmhoIKqITnkWT01Dcj1j2SMiJE+1fw==","signatures":[{"sig":"MEUCIQD7P6z0bsC0ikzc97CKdAdSMO/JQDNYTIY/Xlmv/zuKeAIgFw0CqvLeok/Op8L5IWDO7N+MzTFwe+oso19XjaOxSpc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVDlvCRA9TVsSAnZWagAA4pEQAIyf3cgw0VAfhTnIlVYV\n3vIWaEIyVkwUT0f5qgNVz6rk6kDcSGgRATbS495A0mzAnUm0aNWQnO+v+ray\n/b3CjKLIeQWSOLZynVquPmkmaHjNK8fVKtqmiteRP34hxcm5xubRRP9DX1tc\nVTr6Wdg3jSX97qwx6B32yD6VA6nlyoMfIrPf1x0VBTuL3HAmH/VQLm82vORZ\n/BCqm7BgQZ0RoanrtRqDHWjYUZFNaAqWLtPBWTfDmynC9wBG1XCDB45Pp+EI\nbmYuq+EMWz1gGsp1FLx6M3mE5j8KETbf43pEi81II8jvCSHYXFq54z2Al1Uc\n2v1gCNy+e/D8TUmP2YEtS6dzqMNr1gzrHXiBEPq50OB4vEudMl8lH4riQG2I\nyhXIMKO5/kvu4M3OuLvUlShRcfKToh2X8lpfvbMpRJtQf+I17CsQejm+xEkw\n83M57jdXG4h2xduHz3/Im567NW83EUpFZ6OQ8kJziSX8QQ0L30zuCYuX1lFU\nfUiQbXa6Iq+QCYEl9NU/GlIonXAB1l6P0u59hlB9ODkTKAyt1wMbej4mOvEw\nn4dSmymgOh0HVfv2DyhuTPto9d+10g9caoSwnEi86kUuYagCJi0fiSVwfsN8\nP8mNPW3ou5rDNFMn6XQyuCavyMKL7kyczuF26nHaAUWUy88oIipPoo16WJNI\n9QPQ\r\n=Yd9c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1ac1d37eff1c54867ef24623da270f5f3472d25c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.4","@storybook/router":"6.2.0-rc.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.4","@storybook/core-events":"6.2.0-rc.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.4_1616132461460_0.29997638414901684","host":"s3://npm-registry-packages"}},"6.2.0-rc.5":{"name":"@storybook/ui","version":"6.2.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a36d85a151b9883d78664e0bdfed0ee2e1f44b66","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.5.tgz","fileCount":298,"integrity":"sha512-emWwcvrwABJHXDo+ePGuLIQXdqLfWS0H5K0rJt2tMHUhvUWxu0SyW3jGA4BoQKC0iQ5h8DU6aIh1gCUVnG3z5w==","signatures":[{"sig":"MEUCIQDcUaStSjiEfhQPzU9o12ne/5bvcSfqOJr18EbeTEyAGwIgYEGMOCSGEIQBcgsRjJY702D2t4fhBStgNTlHRXrDoX4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVbihCRA9TVsSAnZWagAATGIP/17KlbFFag+z1eZVaG+M\nCsSYx24dKWfIQ2QzWhwpIziWEkXWe2P143WeFsPU49+TLS1ZfQkXwLmZqMc5\nRCGZX3Uc3upsPOFcxrnauFlUdi+qw1vaHXjwTTnDMPLpb4e72UwcHXv0faqj\nCX9sEfc7yuCp/kYw8b9xebkPvEwXOo9o7Q4XipiM86/klAdqombtTU4Xqi9L\nVvmoj66RDA9kMpP5kmgo4V3lIRQc/dlJT+rlmfcEgV4R3mHjp+9O4esooEAL\nSZpSG4ZrEvAXyNQot8bhnrZoFoALeu4fqFrJLV1Z6u5DYH8dMGD/OA3mn6C+\nyjyHsfn85NRh7IlMi0YyUnfsa4vehgXXyT+TZBqsEQhRkl8CV2473jLMiH8Y\n1u9N09UqUZ+mqM2RKn2Ikqt4C677gPwyztnl943gyZVprWDWnsqDlSLjXP4v\n5bHZdt231MvEdblJl7OXHgosumlh5dTgksFsqfWhkLtcTKWYs/S94Y/sd6aD\nMQ2crZPNaHjqe0CfmASmqK52+aXDNXw41RFxjRWcQPem2zAJWtECmE3rVLyG\no5ocA4q+almDLqpTuWgyLDnBdSpoVJpzwZMsB+QB+hsHEBLcsdpd6SxNfDZP\nKhxyUKwAiTbd2I8dMoro0DrPJBiVoS6+6hMHp+qIWUm9i1DMyOFydFxKpoHF\n3Q1w\r\n=UyxV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"0c13a371f4a831b1bd2c0168bc172320cd91516f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.5","@storybook/router":"6.2.0-rc.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.5","@storybook/core-events":"6.2.0-rc.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.5_1616230561348_0.9613590279787168","host":"s3://npm-registry-packages"}},"6.2.0-rc.6":{"name":"@storybook/ui","version":"6.2.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0a7e4919d085b192baf9889d988047a729e1b38f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.6.tgz","fileCount":298,"integrity":"sha512-PKHyfIWRLzEvU8MWmWP00XiQ6/br5FrHOgFOTnytFQuw9fBd/uTIcj5zMJbQNfyQ/rAON5d8uxt8gKqAu4bETA==","signatures":[{"sig":"MEYCIQD/oRTP4FSxdYo7lhog96f+SvNLlQS1m66V32KWcl0vTgIhAIaPKwi8h5yplu5opAtXzN0Q7QgAF0PXaCakVwUsy8nn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgViJjCRA9TVsSAnZWagAAQWYP/ilb7aJ4Y1JipDyUQXvA\nrjdFIM1Kv0lKVISnycxEc5HlHMWdx0BkWI4iJ2iLj6RitMIvCgOKXEA0NOHA\nLY98lid+FKkbHrdWsNRifsoXN7WDM0b5tfxMdDR2DggpmilVcOCIvHT8r+sI\n4y6C+y1Asuwjs75nxKM3KRgRn7VhnAdK101jeSX7gbzSiOiEINO3w1r0lbDQ\nf5C+BrqrsAol6VB8UghS/dqiwFWtqfYTfcn3ScAxI0iJyRsIpMBI02cHUx4x\nTuJS36NE81f8Hz27+UivJ4hjT2Gu1aob0yk9G8/L7yfdnWF05mJf08Y8Dkwr\n4XytO6wfuAF+LH3+XBRfij0ojPNfgd9LVES7/HpPFYtcz44oFhw0lDstjATc\n85WGUtUAKrtH3TgEJ9JLDlWYRKlObQhpEFUvX3vyGEqpw5jrlmoKyL39Nl1X\nGSLuybsb1dL7bv47ArWCXUCmoG4t0H4enVBT8Kt5/X+A79n0Hk2+G/FdH5MV\niR8k9hMzsbtnZVMzy0cREkUmD3oLyTxEdxAH8JaanJRVnTg4u8uR83SsrGed\nQg8R2PeIREgagndCquZyLvOXWcZiVSlcCpWhh6bTuKk8isNHrf+rTZegjKTx\nf0QmJEZFA+SIqMb25RUtAf5Cb68rLRK9JRn8jREp90kItyZTRsh2k7+inOSz\nkcgc\r\n=oB1S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9140a2884503b405d457268fd9ffd8d2438013af","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.6","@storybook/router":"6.2.0-rc.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.6","@storybook/core-events":"6.2.0-rc.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.6_1616257634605_0.9289638141041487","host":"s3://npm-registry-packages"}},"6.2.0-rc.7":{"name":"@storybook/ui","version":"6.2.0-rc.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b3c5fe94387a5b5bcc903d934d755f9ca9a3ef41","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.7.tgz","fileCount":298,"integrity":"sha512-2OCLEwwg//0xYqAvUcvqWM8X99htslK0IgDcOkomwEFHrNF++20BnIuvfJRBZW2Vyy7zCC+ArobegQQLUqduxQ==","signatures":[{"sig":"MEUCIQCzcb7Kohei0CxI8rZU9jJZWn1Z4HaksOUEFaqN7lOrUQIgRIvXR1CJhkYuHu3OevZmA/FWDd2d35jYr4PPvEKBj2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWMTYCRA9TVsSAnZWagAANL8QAIw0gMoYddb8vXeQSNxJ\nk8/pWUEIlquwJfWx3ruTb9sQAMYxhHwLqJfG733sJFBak2RgOP0sSS68M2Zq\nWT+go67CzYLVkkNppfjCq5P6hw/LDOMXK0JTxmCMRv7WF8oHZhM1Dg5rMwtO\nDo6qpAilffDHRx3i/5iTgrpmT9HpPb9jDWYVZ1IUcgeDC5KvlpKNlZkZ4FuF\noAzZHVYwJoKAivyY5FWAlW/IiTgs/b36/6U1SePbFZ8GuAjYkBudHCXziyGo\nLz2diuUVI9TXrn7SjP+mMFGLJOQKjCZG1l/GW4/V+ly6pbNBC6/XthGtm1/0\nOxV53CgkDCiX7EeWmAahZWVnSylirqsO1z44n0Nm/mszdT1oxRFVDVvYEBla\njxCpyEieHx5kn6RnIY4oWQgoHHFIBOKKal+KBW2HKa7xMvczVE/zA1j3m5Ff\ntsfDZYqUB0ozZbOx7AzA2kLVxF2df35zMxZn7nN5v+iuAUi8a3mE1LdgmAGx\nmZdntFhzy6vPeszgCFfj+Sn+VYHkhR1XHT2cc36/2SkzaVNuOHbLG/GHBlmt\nz3JHtwkLN3j3tLPLx8Bb/nu4QIJA+gfdeblmEoIiY/k7NdLMkl8/mbKn7Djw\nl0S8l+Z0nxZQPkIp8jjmHCW+jNf2OK/Xk7bN42UJ4aMy2iSrTuCCPZYJqRVO\nDDJ+\r\n=Fd5m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ea154d612ff984260bfacfeed804820cf00fee97","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.7","@storybook/router":"6.2.0-rc.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.7","@storybook/core-events":"6.2.0-rc.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.7_1616430295383_0.3557501824776581","host":"s3://npm-registry-packages"}},"6.2.0-rc.8":{"name":"@storybook/ui","version":"6.2.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"aab47d685c28a2411419ea4547ef21666ada9926","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.8.tgz","fileCount":298,"integrity":"sha512-st1hM2AWKqTF6ygUCrsDB/1/+eXwghTdJ+jvTwgPvzUw/kiNI3u5Ey3eGf/cW6H/G0QaGuf+XgUfSL+U9kGp7g==","signatures":[{"sig":"MEUCIBioqlLXlCrvtaw9lVMhod7ojnwB4UxhVkvgOxP/qFjCAiEAtKp+AIj8q2ipZZxloD55ko+0ZMhmzeDM0mg6xNDj30k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWU4/CRA9TVsSAnZWagAA2CoP/1tUsqniInO70xIuKjyA\ntDOFLj8kg/RxeD6YLBO644H8kQQg1RPcSzZaw3HeqO9VuoQlWLIJ0x1gj1tV\nmzmqDalaGNFYy4elIskRDw8pQ4YtTZ/efm0yIMU3ABp8KWFBtfbU6J0Bn/hD\n4D3iAzUygica6JHcpEe8kUa2tkSd3wQUk5CfdFZSqTNg8Wav9cl7KE9paWQx\nZVwSjU9r87aXzdcdaJQtxsPqW4IST12kdZoUUDXQ4lfdYZn/62vSK2esbLSG\nBa2DtO3YJSaN4Go6FE6IZZamBeVkHnJNzF/5VBYUFdXxHzIVvf6GJO87sNLo\npN31akH15J+QPNCdCWUl83S2O776wPp0msP5Ehr6jcM3uxgpqAT/2rg2Yol1\nH4Xh/6MH+0ENzt+4kMS4DvzD32CCyYiqMnzoox+3n9l2jr9/fqXQQYdauIFI\nPIVllXJ1j9XrEpWaX2wQjxtjN2XXyyB/RmOLorLrJUKHsoShcBNaxZ3bB6t+\nHaYq8MTSwt9HyxaK49K02YCYbFUqEdCczr/5vooDUXh4x0ZRJYRvQGffFRNK\nJQTVcyibyOTeBUe6RkKmyemMhavgBD4qdDWPZT3xhv5k/WjF9zkLmilCFYPI\nki1b9VtTVyLE4SB14Ku5vE32ubZV+PesGx/eM8DEo52pM7GKae4C1wRlZfKG\nMynZ\r\n=ZpaB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"229ae2956bdb1e49a5dee26d3b6ada991a38c725","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.9.5","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.8","@storybook/router":"6.2.0-rc.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.8","@storybook/core-events":"6.2.0-rc.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.8_1616465471040_0.46772935798845316","host":"s3://npm-registry-packages"}},"6.2.0-rc.9":{"name":"@storybook/ui","version":"6.2.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"36b948af6f8d27040013aa1dc327210ba2062436","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.9.tgz","fileCount":298,"integrity":"sha512-v8JGlNfiw7PG48n8beDfDJ22UedVUsZW9jQgrzIN9GhBXgH/5K+rFosN/lP9gRljZuX9cohv8i+F2BMbJsSX6Q==","signatures":[{"sig":"MEQCIC1WCSx3Kf0+T1p/xBqJ+BgSbwLE04mLsYh2TvGO/4m0AiBEBXlZO+sRHQdg7SWd6rMf1MjQazj2Xf5yIIIerMlLBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2544915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW21ACRA9TVsSAnZWagAAKB8QAIG2N6RgaKgRJCub9Uv/\nAviOre4jh/MjcuaRIUDHp6yM06isK6Nwbvv68bIWNCuTtM2OjaYe8jC1a41M\nBZ5auKXydltxNIfJBI4TWLEe30JNz8+3M6lPhJ0NJOxarqx2uT0v2DOQnQCx\nxbKExm4nRacoA0rixnKe+kp9rHQpqfEjbJFhfKGASVfV+Up1U4EGkF9Wesxy\n/EPg1mG6LFgvBUTnZSZOs9tzE3TmVM8YrsTpme+oxvhmG8vFV6Imcz+uR7dR\nofiyp2OKZ34qFYPkQ6qZvrYxnhIzHyPb8847oYk6ntqej1SE0LxunZaadl7l\nP+nZPikd0oC3Cp4n5BtYIttfV+i2Q2v57BWy8uO6Ef8ZnsM7WuckqMbB2Ln0\nt/nsF9wovPQW3trXZcqGpmsW/74hs8AAiqoKZOF9geT8UYNUI/Y0TFNyxB1B\nf09G9h3KjU9A+2BkgVgFYzJodA2wEZkKYO2Eov5o4xbcVCO6B2cpEbkP4t0a\nj+WJZ7bAGnlHMfqHRpt1HrdHTvK1sYq0iHDOeONbwlSff/Jjh2mbpSgsvMgM\nJJBsEe+ScSnkz7F+xIhi4HseBcP2D5mArAXBr5s9PowaV4FyEk7hq5lwgSJt\nC9DYVUiw12PY7uuw8X84DTNE66RSgB2ygu2Y9R0mqfZO+8cvIZsseLKzngIP\nA2Op\r\n=KvWi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b100a45b69db3c2b9c4cd06e68d9035a769f592d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.9","@storybook/router":"6.2.0-rc.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.9","@storybook/core-events":"6.2.0-rc.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.9_1616604479792_0.971485253459264","host":"s3://npm-registry-packages"}},"6.2.0-rc.10":{"name":"@storybook/ui","version":"6.2.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.10","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7716aabaf5ff1cdc61d9a8df7a174d922bb91bd7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.10.tgz","fileCount":298,"integrity":"sha512-4pmk3EScIleOhJAGxf2JXULQAoETzwW66sUh0E0Ie449qHIpkK+qbxr3VxtwA+E14KksxMvlR74sr7dt44jmQw==","signatures":[{"sig":"MEYCIQDodDI4u57M5Vh+wEUXjuzy4zv+vc6D6uiGsrZ55V9T0gIhAKPmH/nvs/gH4cI/XNNyOKffQLf6cFH6IloTk8SJ6byF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2545060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZS/CRA9TVsSAnZWagAA7lQP/A3u1z5cPIN3FulCmkmp\nPCl3Aq5DctI5UsQvUQMGxMygc6wzwa7ThBWXXFUUg1txBzPZYR4g+7kCeUbR\nVrwmkfyJhHqwVIVz9A+0DH3aMo3BsDcNkFbwMu5KZ8iIqSUPokXSmcmX1+LB\ntPQK/tTUDVFAAsXN4NILwYvlj+Wk09JQjRUtiFGAIBO8blglg12llRZyjTIg\nHKen4AgvfgKJRtPF129S5wKSup/TfRrDKAh4eRXn+Kh1LFGaHuq9uX9LZz/U\nqhlx6bJIGSfEkftoJ6NbhabEYY89YOMI53u/8a2KlT5bj19wwVletROvg8xd\nXYHAOcxoSzcRENccGvzCxpe6r9jTFvJ3ysHoa3/6hTkethTupy6jFGjWus1a\nQXQ6+2BiLXDAujvdReQ/XhCuPkk0El4s+/SlhvN7zPLIvVWnYcBGDVufSPcR\nTH9iGGyZHUEDl+SRqGUfDR2wJVv908FoPxb1qiOPX7J6let7Vu2ObmwMW8X6\nwnlfOVQ1+N4PHwVIHGOmGmh682BrvY1dDgqXoQDeeY4yCxT3utEb6PXqnr5r\nN9JrvlbZLHVYlPxXgGWb35oliSOHZ36Xd9FBg5sFfZ2uEIX/1MYi3ICN+1eT\npu2C57FG2JWLtbv8/GTnp4corvQic1jEywOchIyS+C1rIHkGtmmoR+8NmOqW\n/NPF\r\n=PTIs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"a667853246c625fc0668b3ae54779b232ee33431","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.21.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.21.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.10","@storybook/router":"6.2.0-rc.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.10","@storybook/core-events":"6.2.0-rc.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.10_1616745663308_0.6073337375068906","host":"s3://npm-registry-packages"}},"6.2.0-rc.11":{"name":"@storybook/ui","version":"6.2.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5f6a81631203b9368f79143c4493f2247a6993b6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.11.tgz","fileCount":298,"integrity":"sha512-serHGUa++GBGYHl2BKR4808m1HTwguoXR6TcS7GDOowl80pQa8g/XdGEL/8NDYHLz6cP11n0jvFfngfWaxnTAQ==","signatures":[{"sig":"MEUCIQCf2kqsFw4eJUNiGit0SAz4fsssPB3hnCTPmlDdMZpxrwIgKrS1AD8J6FJC/7mtRnzMXSsBHt6otZ/ItDfiw/M3r7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2545060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYZG+CRA9TVsSAnZWagAA4rMP+wVd3ivydflVVokT8x7+\n/2ityvGOsMmPb9LvNs9QYt652W9v8bfKYyQTEOJX9o5vARWxhT8i6Ydm8Eby\n9T5HawvEfQYNYKRTQ0QK/et0OXAcK9mITx4XskVaZ2FTNtuAvEPzlcdpImRi\nBKEiP23l4PMa5C3xojHYBF2Nf14QJLExebF9+tbfP8TaOZ8DKTDC2uzeFM1b\ngDELLPUHKwj3MYOecYcC76vBCdCnJDjwAnLej4cIObL6OjWbWPMeykVpOOSF\n2EpopRI3mQtZtx3phuUc39bpDD1D30zg37Tw6iaOTVeWMm74IEq70Zmh40UG\nCQJv69rlikOOkTplpYqCc2aDtq595U2CMFTdPudAOKHbgD7To2IwBcdi9DXr\nIY1g+Dirvj27JNGVj+zotTCMmvpwbuXdTg4fE7gwsiAH+ao6OsRqXna49uIK\nAksHwt8MQ1xYhhFk8oJovdAFLyn2OvN8fG092T5SRoXsmIHP5zi1fQoXi6hm\nOJQYr5FE+GrBp3CAT5B1rCZ/PcZB6DlwXWQr+m1iIEQrDmqAmHKc9hpuqqxK\nmkXQh53Mw1wjT9xxRoBPpbhc6vo3JtUcieI1JMgcHVZ4rbJPZQSwgxsuIR+M\nTkG3Ll8ZgoD60/dzS+8lIWv6pJPLBqUAaTGkoNyqneRgC2lEzd+/OLxKQMes\nbdCY\r\n=FhTi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"b2100d195fbb25a0267189dc91b01f9fb1a96b73","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.11","@storybook/router":"6.2.0-rc.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.11","@storybook/core-events":"6.2.0-rc.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.11_1617007037496_0.5255396323732229","host":"s3://npm-registry-packages"}},"6.2.0-rc.12":{"name":"@storybook/ui","version":"6.2.0-rc.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"05d465295f2f62be3fe00b27c4b76430656148f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.12.tgz","fileCount":296,"integrity":"sha512-pEM5VFU4tfj6dzFxIM0qEAN09P0bpgsY8bWBvRhV8KfOQanFq7oPkZXh5HhClepGUVV11enTRyEGhJMWPzTh9w==","signatures":[{"sig":"MEQCIHzz70x7+Qbk/Bqj8ltyDouM0datk70weLmCEcFTWKUlAiB1x20tZWKd/oMCR9ihHd3vTwgnzhhiWmsi5DCLUJ+Itg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYpJQCRA9TVsSAnZWagAAhKUP/1nJydiugP+Ej6kC9Hyp\nnfnKQgXY2vsL+hk/xFitPeua+AjJRbYsh3l5OOESBuNJlLLrh4eM2qISSATg\nf0vvLa4mcAiqXtj8qLHqvqniiVlMbUfSnYumg7fwPzd5FKreiy77aOldrOp7\nyWsmKkUtNioB76TNm4SSgB9aOPKrNJyaAUERJEkT4TFwyf54dsznO4enykS7\nOv9f8I5lp4UNY5mX9NOWn2+KoqgOFfHyQauX0uZPh3Fw3exIXUgwFyG+ro7k\nBydMn51Hrovr/Kfc2XgVeYVK6FmtxPBLyYEV/jQmUv/kDX3fz1hxag0/QzOy\n5IQV2WNvUBQibYC9nPeeZVcHGdGkWbwLHogpxv/IXcpTSZ9Rfp0iIT7nIF5B\nnLQTvt4zU9hFKY/4X9F5oRboJ7RVwgu3IJ7RVz8PQ+gQsSSiec5QDh94gfI3\nh2GhxgyL3FKtl5BflD1aWmGpR1o0wnmzcDdZmJB8xOm4WSklfC2FZa+B2XRH\nEFDWfSh09f6fnaij02PbTuiLnKIUkYPhxkI/TQ5+zR2+xJzIRp68eeGf6QUA\nB/O4yG4GprY1/d8fHySoTNQjgmjSOrzXg5AM3pWpp4dn2uwoIK+rR5vA8i5v\nYG8xq7yVbO5vmX/Og0l2FkOdRhsG3v3eYW4RpYsBmYQhxiBhQ/vIA7gGrYs5\n0IS5\r\n=lSse\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"5ee73396dba34362f070dbb6b8508fe18a3775dd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.12","@storybook/router":"6.2.0-rc.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.12","@storybook/core-events":"6.2.0-rc.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.12_1617072719852_0.9784867267680513","host":"s3://npm-registry-packages"}},"6.2.0-rc.13":{"name":"@storybook/ui","version":"6.2.0-rc.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0-rc.13","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b58bfe9839eea20e035fc07090303acd445f32c8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0-rc.13.tgz","fileCount":296,"integrity":"sha512-a8De8cQQuzacTD3igDiKvqckzk9JyYttmc2Y+F3j+8n/lZFOHcVLt7b3/SAFT8OnOwxbVCAwTDEJQy3G3C7xEQ==","signatures":[{"sig":"MEUCIQCFv7lvStYuNr5g0WLqP0vwMtNQbF6UO6ENxF0AIFk+8wIgebLUB7RxQFZSkj9LOMENL1rK2ctdC/pDZ9axGSUu6os=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYwKKCRA9TVsSAnZWagAA92cP/18YddlapAYlojISSXJj\nIs+RG2LP3TNPymTcEQhdeLdqFTgEDyTHaHDA+g8EVmUPmu9u+bWfEbsk1vYd\niY9q0vPCvKPFpe8PO9F0ODlu1BHXuNeKUP69/e0k67Pamf/MxfzkUnhco7JK\nbzK/oIVH2HMNO2nxogxZeViGrpmfC2yT373CMSivjfnXjQXmS3pGJxBQX1fP\nO5Xuxn9oOPI4M3zJ/Nb+QPhHPQiNlenoSB5TAFwQO5UNH4qqDYwAZh+zkpJb\nvugi5fAATkS40kzPjqSeS6LrOEYnYqYuDptsZykb27vxaZhpYWFpvQKWIbUI\nSp4CpgACferu7Ic+IiqfEWHkPSRMoZBgz4nv8Cqdq4TYhY4OvUIoglCxI3dF\nAMOAvkpuT7+ShnPdxWNoWFgt05bVyqcgvdVMa5oEFnIS8nhN3GvZsE6pTb09\nw42DhMpmZ4XvVitt1Y2i+7pBkrDJK/eJAWl83NOhbbKY8NrWucqYid8YPuwX\nKQ7tCWvhuMcd8EjoscLVDuvg4XwqJnwcSz1DT9K54FDMyAaqijxCLYcrbI4a\nGn9MLh5A/D03eB1s0RedD2HNbmyMNdUad+Ul/7BjKWv2W5b/fHSjUb3ZcAGK\nszBvjtdREci1EkcB6qLk2w1PhjPSuJpuXyWGE5u1/WzHFqEbi0HcwDy531ga\nfohF\r\n=/yCe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"c1dfd5babe14f479db54c9d59fe3374a45a004d3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0-rc.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0-rc.13","@storybook/router":"6.2.0-rc.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0-rc.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0-rc.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0-rc.13","@storybook/core-events":"6.2.0-rc.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0-rc.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0-rc.13_1617101449891_0.5982564864754363","host":"s3://npm-registry-packages"}},"6.2.0":{"name":"@storybook/ui","version":"6.2.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d3c8e063e9a3953d97a44bf878d625cb93cdf181","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.0.tgz","fileCount":296,"integrity":"sha512-uUadm3vmZkt8ZqgwlXhi9G76P0pAIL3aFv73i3SVP2E6/ZiYmg/tMlfG8a+yIYijD+Ni9ypz6sS4+Ub46rm7Rg==","signatures":[{"sig":"MEUCIEk42aQyEb4jR6x+E31lkL8vrkpdnQasQCIr7cRuwABMAiEA64AfZM6LL/99UE5uErsZPZVsBlZZjnVb8m8MVHSJT1U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0vnCRA9TVsSAnZWagAABlgP/0P9idswe4hdioVGuvnW\nPXA02akw7lDvmsK38X8EZv+A51fdjFZ5O8N1YdBrc1Ww8r9T9AwoJAYBJcdk\n/jD62fYDYDhJGN25wnF7oNuznqBuJXRPBlKfLVYDJpqILNL/tWWx1z1cdzaD\nSQCvH4bUJCDoWmuMAj0CbpNFwXdlgclpi9rVhgGZCNMFjygMSzK0nklVBWZo\nqtcqEzALCuyZQhSR6dvNmESI2LwcKzyrwbGN7kLPGtPmJPYH+7LQQO0wpwNQ\n9iBcvKvsxmztWnc+Qwqy2tH5Qzb4BfvppLiP7OY8mPQws9F/mY5Ef8kbh/OV\nFrad5xdFLnjttU9u2CIyhzsMz9Q21fUOEvGiRqiAlO8RBGJAXDDtJbbIUi/v\nau4gqs0zM3Sk7N3ffuvyYC99yorKfW9a4PkOnad3ZtvcF+Dgne8xFUf6FmB9\n281Jprctk4JrUDGF431N+UGUxz9C2UCf90sa2p2g06XDsxG9kS/JSE+ZGO0Q\nuefAG0oBPaoNPprjQSmHIrKXH16E5EnG1lcQ1ILo2WGDx+PdyrJ7S1mkSEgi\nKNA8eAQVUuPzV0mBi5kbfrXUMio4rkETT4j97GJQciWVqD1N8j33gmnYOXE0\nrgg0pQlUUbmJ6TZjd0fs2GF8r8KvBSmka4RsgZAe4zyIq8Rt7Fv2X7P/O+pb\nkrkS\r\n=/+d/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"829c72e4374888ca74ed4e68e0c1de940ac18163","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.0","@storybook/router":"6.2.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.0","@storybook/core-events":"6.2.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.0_1617120231218_0.6171413112280393","host":"s3://npm-registry-packages"}},"6.2.1":{"name":"@storybook/ui","version":"6.2.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ea2567dc14240a67b14a9bec9bc672c01d6e1430","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.1.tgz","fileCount":296,"integrity":"sha512-RUK1feL5XWftXzOxuKvsv8Y6fsznQpOuROgTFhzAJtusyhcqOKMr74BOLX5Ldkb6Le0OVA65nGwxannhzG2dMA==","signatures":[{"sig":"MEUCIQDz4XMmQooPURlCg0Zg9v+qx0ydeKoj+8tgNnhGg/AwvwIgYATszu2RX2lXQ2HlOcOpVSNeAVLQGfrOKFBKufFvPUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY/VnCRA9TVsSAnZWagAAdRUP/2Lj8oHoJGfxuVPHTdP2\n7NJAIiSRJP1LX2KeupPrZmhttr8AqSy85b5VdsuyqivJy394KMqV6aCBjoHJ\ntc6p19OLcax8CiupemFDdFCLeItpdwt1WhpsgoZ+NwRA9Fx3qgZdTZsvyS6j\nO+CF57rbNxnFDYM/TkywErSmJcvfeeJ0NKM8hUtoUTXxonFszE77ePm6GtEs\nzcq6yh2/K3b2rV54FDv9pnierdvRGZlLJvHPQDo4bhfTn81eEgZCw0CVqkG0\nSBxpNoqCMWkGtAzzM/qqtBPZmgdKQARC4VmfC243KC3sQ21xHVU0Fuvx4n7B\noFcDSyW65JWb0Dh/S/rdEWJk7gSTv3DEgKYC16aiu7w/6t40y29tDfs1E1I8\nDOUTvjuAI3FK0zw7Uosgnh0rQy5rs58sfGOSX3snLezJ0/Thx5FbwUeQDaKb\nSytd5ygaABidg903jYFinW0zjJMBaZxDOxN805QyeqO6HoiNEDXGGRE6htWP\nrUxMw7jYQdoruEsQM59uV5bj3lGIGGJdl11HlkstojtUgGYaE6nlYA7IASRH\npeHdvlmrghwrnDO0nyrnXtrAdwaVWE4CHCrEMDq+qFhWNIYUZXWweaRhRmkb\nKCCWtDPw6qwHsSPrL3AhhtwhRY36Y1ucjLW08KUbGx1b/zTMmL+G82tFErXv\nj9/s\r\n=tmbn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"3d5d666f4e961205bfb7b94133c794866f0d7a0f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.1","@storybook/router":"6.2.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.1","@storybook/core-events":"6.2.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.1_1617163623068_0.5682214561759853","host":"s3://npm-registry-packages"}},"6.2.2":{"name":"@storybook/ui","version":"6.2.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b66836e303c368ca25119ffbb333eff6901433ca","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.2.tgz","fileCount":296,"integrity":"sha512-fAR2cKkLrcpPDqquIqvrstkpPTnRLNlim3vSYBM4TkBQpilafElUd0Vc7tnl0yasKvXjA7S8QKVvHFPvdLyvXA==","signatures":[{"sig":"MEYCIQDFIMNiFMM5xTfuWeFlnFJcfmpPLBjKk4RmUwoSY9n8wAIhAIeK/v11A5TkL2ceMMyRFqGHs8Lo8lBmxuNU7cNaEaF+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZumUCRA9TVsSAnZWagAANnAP/1rim7v7rLYDwHpXjkma\nuzt781OEXvnYGrp4L8XqkDiABP/68PkmyxKYO31hK7B7A+6cy4Vw5Ydj8PkL\nlyob6ho0jEnqxT3mSTLhW9y+X6vzaXQPYGaDeuqcvehGOu86GXSD2ZV3Qfy5\nOvy3Ostcx6Z1tKELmPSoERh5xeSr6qoCtX5+6srSxxLi44NCKc49UfhuMLtx\npg4XREknQPr1DqX4O6aJJl35pWx07f5nZJTagcwVVKX0JWe9ancBAt5Ij191\nHVEmvM8mzzXMq4BgPJrtKVyT6qrY01J4Z+iRYHu7/ZoO+Nk66eNML299p4Hu\niC4LxlHBbVrMirv2juprT97Miuxv1yF4mEzQM08uTRRar8FQqhuQkti0Ahgj\nT/xO0t6B+Y23Q+sauOf58OB4ApkbVMjoOi/NSTdi5or6eD20G2RQD3A4IBFb\n1lY956dfUyqUu36YgPoFbf9tSs87UJNe183tS2BsJKmIApyYacruWEsYk4Ci\nfHuxsXogYIt9Qe4TVNxKeyN62d+urVkE+aYNVhScCl87hiNSQy/vq4Qq1vM1\nvKwq+Lgp9ZmaXnuXp84xv8LuMP7XELsNMqY+rPpP3Tm4RRyCcM4hPWjzPJQ3\nvk8usNgU9cTEvQ6sEb7fI/mDi6gZc4ImHw7fxCJ4H889lqOMpBCJM4719e5V\neG4D\r\n=2clJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"10fc28856bfb06d69cb6c6ac056e9332dfce564b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.2","@storybook/router":"6.2.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.2","@storybook/core-events":"6.2.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.2_1617357203103_0.517888199926299","host":"s3://npm-registry-packages"}},"6.2.3":{"name":"@storybook/ui","version":"6.2.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1ab51478fd0716e5557158220139098e0d521c88","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.3.tgz","fileCount":296,"integrity":"sha512-LJetRJBpDrsHdqcO3UmrCMXNNLurbZFWPa5X0pMrkYrXrfNGrrPUQCTr5aYpeh94UKUpr6ywYt1loldWDe2/qA==","signatures":[{"sig":"MEUCIQCmbMBfXh0oI3yRRklmH15yVHxhf/yDw8//l8u2U4m51gIgTlAnIf78BMyMHeHYhBFLzN6NXGnwSo6AVTpgGpqdqAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgax9ACRA9TVsSAnZWagAAZd8P/01bsnBhATjD/mZcj/3L\nQWrehGJjlJVChIoUSYeBDyQnhYrFIpGDmvei0U/UrtsaXgFElTkEUptRFt/E\nDGdxfqeWqnYyZjoLIGfuwG8Q9t9y/qQNN2mZ/UxkcorL3ia+BHjxa28MgchN\nJaSf8IVSHTkw2f8jmuSNJe4P/Pum5YljNDcdWPF7uYXawZpiqnfpgAOf9290\nu3HDkd8swr3j0MzPuPL7USoW64P0tENisLMaUkbPj3qm9vzXHq4CkAE9UKbX\nv34Iz5KsYqVRHXVl6p9ENuLJVXq7Pwvqm2ngMx6gqNAoUpV720mFC60dYask\ngbyM3WaFeTvpcPbKA/yONEiMQoB4tOkaMO+KUoF4gaAoCmxEP/OrqnHMBjXo\nALfPypbHX2lRE3nG8SByue3Os01gjpCYSFHnhTxlmFrUaQSJzhm5Sbc9RbjO\nu1HWaC8yR5wZjMQ/XUq9y1RrkrwQWDgrKb2nOAYdut+HLW9jDsDDal1yH3oo\nkCTb2NVdanYnB4JqVN9cvkiBxXdDBJOHdT6a8HIrqQOLg6LkAux2hozvDEWl\nk+GWVLMZQvihpDzYFkA9CND9cJYZQu9spXQPWCmvV1kI1bUuwfEJFh1KEAYg\nyr2gRoUb7xDNIwK05EIhg59dE0wWxkWcGuHV4S+/0Cja4Vw2vFs+4qeHO/0j\nisJJ\r\n=jANX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"8c2eac34a9605df01c545e9f73d74f69863aa0b7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.3","@storybook/router":"6.2.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.3","@storybook/core-events":"6.2.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.3_1617633087819_0.7279127534556198","host":"s3://npm-registry-packages"}},"6.2.4":{"name":"@storybook/ui","version":"6.2.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"65a2c5d0af611362d2a62b50e18665ac8ddea01a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.4.tgz","fileCount":296,"integrity":"sha512-wo4XEX4j3nHQQRypT9YRRlL2l0VIffosolHL7NtfZnk7RNOXz76dr/ctljBeEwGNoXt5kdkhx3d1PAZ+HtYLfg==","signatures":[{"sig":"MEUCIEhGZR81mMsUnb++otLuoG8ie9WSBDlXSvv2aaYFwddRAiEA6vNDU1SfPbXxrh/Qa4uyxJs3axmD5OzFGZHow5pCHCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbTAUCRA9TVsSAnZWagAADEYQAKPhbocK+xBFrjqzob+s\nbiupWu2OS9NxrjVR7MM+iK79Fk/+KlB+1Zq+di8ZhLkYzg600R4QTktPQhGO\ny9AddZooEX6bGvSuvMf6RoUfbNV0K6RlWUHYNn0niLiMY+5zVMvDTUWofnby\n16gT/HJTMomsebC+6Wb1pByyQN/oqsAgTxyHYWUcyepYpBafZSd4O3hDqCQ/\nur9R/6aEAuYW2//rrBFeYdm9vy25cG/ure/ln30s+eDeIONrCo9KQhR2cdgd\ndWcH6DBldc7owRLlVmVT2/WLipminf+HGgcRs2NqlSc6HDDqao1nxsRxGN7k\nKSCm3jLepkgNf/7K/gK1GW8KrJEoJ4K6Nl+VU4metHUxk7EO14pfAdTpE7LJ\njqEzPixYu7d8JjEl1Veojh1tjkoWhj/+XSbSlsxcJc7eZZXHbY4Zwx841eWM\nHkGT5YwcEfkaZMVrfl4S2T4vq5BQMoO68sTpOtmpZd5LJXrzonqkG/Oa9LiI\nc0Dx1kBJXhrI0WomzWXgYvv2dRn1ei2NQMzfodzMa0NCZV9z0iYKwRVHu9sK\nHRf1m0g8rK+FwvMTRDVPIU0Y4RhTDDXznZlEM7iRJ8KQ338GDANyzQFOreqd\nl+amgzBqWn6E+dHizVUa46qhXnxUitaJTuMhZFgC02+8sS7phawV2Z0fG9eZ\ntTFy\r\n=pzzl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"7d8a84165eca35692cc0cab1a2e820b1220667fd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.4","@storybook/router":"6.2.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.4","@storybook/core-events":"6.2.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.4_1617768467888_0.7770142918521166","host":"s3://npm-registry-packages"}},"6.2.5":{"name":"@storybook/ui","version":"6.2.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1192790da26be789357bd88512fe24856fcd151e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.5.tgz","fileCount":296,"integrity":"sha512-1qitL9SGgROIurdW4P5h0cG20jH/2j6lDgmk9wHh2ZvVPLd+Thg/47JDZ8hIxackYCe2HwfIhvNdzz/unq8rig==","signatures":[{"sig":"MEQCIEezLnaKfEwhCDm3xCGz8bA2NVc4bvT6dfJtHYU0M2f6AiAfUAjBQkD8i+i9fTCqd75Cd+F7LtSc7jkuniZ/lct00A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbYvkCRA9TVsSAnZWagAAOsgP/A94g2s+R5bZnI+wxHN1\nPBmM5zy0CgfHhVSf0KkSEtFPKlFubjdUplZZ7+VlAFl9iYNKhjbSaW2Q2qdk\nNL/M6ypa8W6zg25AkzagmzEhbwfWgbvAU7POVix9f8ouB/LWi41RtPveA/9/\nD58o7jAHVC1giGos1OXj5BeJR73RHaAIH+oL/NX+Hdb1AwevZWWM0zxEdnoP\nMHfA3VfEch7nZBgcQ7sRZnpsUo98d7gsQqD9tUXgYhlTwqpJnPLAi8FeZ2NM\nkGFOcTES0AlEDjRjaXc8WlemKWIqlCG2MYRR/IAo+6iE02NdtUr2a+d4URg9\nyL8TzJ7wRDX6Wo+fE5ktg3k3m5H79GYxSV5nlEMWI3B07xcf2qt0Si/Uh2wU\n1sitMn4HaZJJZIinmeNZ/LOFVyane+3KPxF28FhOyAmevDT/KjedXzK4b9k0\nGY4npcgqP5eZTiu37YVcZKYQLy4t6+cQVXFeZgW/HBR9LtuaPYyVn3PYQln6\nu6Y+tBZ9+wS5iHAOuWsQEpfi3bBRuhyxfVSqEyQa945qT78uG9JrYNfnp2cb\nlVP7Ggl0XSz4iPMF9fcsTD8agTgIqdKDNnJ8xNI/yd/LlIyDyTSPolj+n7Vp\n9xbBgbjrocklIu65rxzgTaJuX6j4QZu8Sb5+JaKuBgoHf1G+PcQMfWq6je55\n37Qp\r\n=AQgW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"fd587f55266ddb52ba0a508b11089895ce8c3b59","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.5","@storybook/router":"6.2.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.5","@storybook/core-events":"6.2.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.5_1617791972457_0.023489635792149466","host":"s3://npm-registry-packages"}},"6.3.0-alpha.0":{"name":"@storybook/ui","version":"6.3.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0c873958a37eb62514beefdfebfea86d2a393052","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.0.tgz","fileCount":296,"integrity":"sha512-YxFK8vZtbAxOLei9FPGeRHrQVax3+K4LfyA0hicnyr9Deo7XWhvO22SS53xteoO8VZ+ihx2BY/rjV64gyTGW+g==","signatures":[{"sig":"MEUCIQCKoixWWgXFUUCzgek21aY2s+OlTHu47Gl1CLGnHp5FKwIgYSYZt8a2XzGZgbjenZqFGjB7/XwNIcv2EQdySiRstL0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2574070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbtPjCRA9TVsSAnZWagAA9rUP/0OPuC1JromPweAgt0z2\ntWs2zi85vsmHMckfv+VHrS8TQTjwKJrHTD2y3NaOea+O5Ossv0FcKtr63n+6\nchXcG1Nr9110PoQbrON5lt0N0wgIFq2YsduDdPFxA3oj0kNEk6NMdG1wOzjp\n63tNhSGgzrIq40jeWBW+Q+VtWjUchFTjwDvtsYMbLxuD+zoyKJdL/XJJSu6s\nGOSIriuBeqPUn79Q6wSwu1n9hlZFQIt8kG/5ldeSL+Duif2dqg1Jxp7x74ih\n5YChgiJDIMrChEYjdcXjWW2WXMM0kBu49z67UsYyHKb/0n9SpdCXa3fKSJNf\nKtdrIYnofILTpF+3Q86z9MiJxp5dSn+OoCrCERga9jk1J0mGQW7ZzVg+t4c9\n6Lqo9BFS8QnQaWX/lak/xddO9aAAnclpues1eOJWf/vbfZmiOqe4KkWKfhcS\nP9adRg2lvaEQN2LnGN+Z/2dEATRZVZJ3TNZbKZP613X/V7VlVGhEm9rq+JpF\n6W7/57cfAmVfmDmw7UgEcSOqxbmsYnmeU5+BvKkkY/JcHgO41i3JI0nL16uH\nUoUzEG8PW4/DNxjm+yvfWb5oqiQx2eRj4RMK6pEmjhJc28mkNtXeJdCURnzB\nhgtTiOj0YFlECp0dD5oOwOCNgs/CFNPetfE+eHgqrYvbYjO7+fXgY7gEvKi9\nXOHb\r\n=aLQz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7739aace24e8614f2acc9972b2ae44cf7f228c18","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.0","@storybook/router":"6.3.0-alpha.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.0","@storybook/core-events":"6.3.0-alpha.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.0_1617875938608_0.12741054897711934","host":"s3://npm-registry-packages"}},"6.3.0-alpha.1":{"name":"@storybook/ui","version":"6.3.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"53202013dac5d091ad1d8ec27fe28ddcfdbc4c29","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.1.tgz","fileCount":296,"integrity":"sha512-iFt2qClCGCFQRO0KLdXPLbPRDgcgEVY00cCpopMyxAbxejWAnAnEvE0adDMyqUNPaLgvMykT4osuwjEiSDWtsA==","signatures":[{"sig":"MEYCIQD3cVF9pU68YFxykbamM8h0Q+erhzzgeaAw5tHCwTLDKwIhAICKg2pQmkgwMJVwCXG2YiwogK1Qd1uH8TTURVaJ77lG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2574070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgby8/CRA9TVsSAnZWagAAtUIP/jCWUmvhfi/2reIFGt6i\n0LvFlptC/hWOWK7liLaLLHdxWIwBuJqXkrQr1H4IVYgEjqUNNCF7biL5YBlD\nA5k+3EmUgta2u6ogL4A9FAnYua+6TQsfkHoVfWiTnlo1M+WEgDyYGdS/FsbD\nKVQ/VOG4/S8+2xl3T2u7gUxyvA1XtJ8BMUZRqf3ITBPskk1khfDtfAyfPojy\nKX6FqZglGK/bshJkZm3YIbJswcQN6dN+fVXXFxlO2OX0lqjHL8aXktJpVFVe\nSlxLZv7Mwm5KZMAZscxj8scKD4BxmQc/P03ypBBRuGGXBVunmwLb2eZzcag+\nu4t2644PWS9kqRJt6HY49bGUvRfhUJifVmOzM3yBkfovCGppGXUExxj9RXuj\nqsJZ2fNzut7a1dfmmVYMuLRJ/V+wx/CN0vSXpJFY/92ybOYoW8ydyoB8yjqc\n9hw2M3B6oauhpfv3z5wCJ2no8ukWw8LlFPXzyC/s9xRRh7tjjUpZ4JNFMlS1\n++lsM5cd/VRsSDSyuFhN+NcQ8EH2hqzE3EJoYnqktV+LhT5BrD2fcOC76Hcr\nbeIFLia9Wi/naTa8FZ0zEr9rkpa6lgP48JmKZmJx3FGQLnJE7XqKCXxbezk5\nkZL2+YyRQ/KHbBQ2EVvqVnUe6s+Qq2vkbaR21Q0VMqY3/vBZnbX5iiuCs377\nVVld\r\n=jNV2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"7d99c9e0bf8b8db56b16bca470c9f27245df5a39","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.1","@storybook/router":"6.3.0-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.1","@storybook/core-events":"6.3.0-alpha.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.1_1617899326671_0.33167630503527135","host":"s3://npm-registry-packages"}},"6.2.6":{"name":"@storybook/ui","version":"6.2.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7a0f778721ebe98ea7c5f67800523c3db073d2ed","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.6.tgz","fileCount":296,"integrity":"sha512-Tsrq5ZzTX+7nZkP1cR5YclLpAU3LQwokpBhTwIpm55nKa3OYKeswpM3N2fv/GMgROCJWP9XYpGiOOot8StY27g==","signatures":[{"sig":"MEQCIF8Ue5v+zatlQvGUyTVTRtW++KDhb7Y3SpKuCUkdt/v5AiBcOgF+dcmp4UTzHw8zpPYBvdx5S6Cm8FxSnnapsQzkgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb7pkCRA9TVsSAnZWagAARyAP/0qi+Dm0v4+uyX05RA+a\nE9PGgwhP0eKRj+XUWPvr8hALlqiMOzOEhoBvK4zfpi3nIsJSAdzEwreNtKNV\n7vwDGKvGXMG9GqIAjXp8UAJyZ+OF9l3Z+nKyAirpKu2vm1V2pwLqi58pCKKZ\nSS12KZYlZca27x+toz74wZlTzC4XhWw5UVSyqMAgiap+JtYsj9jhnhq6OlwQ\nH5Tm/RTMDHlAoftX1u2FRtqB7oCkotk53z92+Tj7aOBjN4vw/LAZxNJdU7E+\nyeP1hR+zVdtyK0tt0iYDqwzhynmxzgdRda4PHWex8dNA7WemBQV7lsb09kFP\n6uhf4/ObHLIohfAO8jA3m4lpSPKKLAAT66FkBFUQCCVwvdQDpL9bedX0fhax\nP7DPvyd0oPCuwFqnaODof4U6thMlHt/jFLqA1QuNKNa4hstNsGjptSmAe3wb\nFIcOurtNjavvKTCpJXCaOPpI0egiGkmm9NNKbBTxv9zP4V0p1WH9DFrn0zwe\noEDsA/rqMn8VPReprZCAEvtSqoF5hiE5z7RDFzk6PHXsKYp/D2+Ma0MoOz/Y\n1QflgF9Kj1HWR+OQtJIpHlOZyra1nI8m21Eny2qjwSosOR2IODtNmuu6ckgI\nLeMY9bmxyiMr59Mw6f+tFXx/jL1xhGF/SDqr0GrMjq+YwRMaKP59HHnFFS5P\nEr3s\r\n=AL+R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"7bcbe2e2501d034b8b8c4bdd40cb85e808221f9f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.6","@storybook/router":"6.2.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.6","@storybook/core-events":"6.2.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.6_1617934947852_0.8590061062256971","host":"s3://npm-registry-packages"}},"6.3.0-alpha.2":{"name":"@storybook/ui","version":"6.3.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6a3de2b513ab4edecbdf46031ad9c9b6082e95b5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.2.tgz","fileCount":296,"integrity":"sha512-qkyx5farmn0l8HyqRrXxMfVw5E9B5KnW7jZk/VLzvy2u7gaWGgNCsmSabnPkTL2J6U1R8aAtxhO6qwjiswC3sg==","signatures":[{"sig":"MEQCIFshNEr6dt2uAC9Ti1gJP2uAQZEOMfzwchD0UbpJRrugAiArjlkhOc9FMZF0nbFVBraEMczZVsAzLj/aMr89h1+Cnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2574070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb+GtCRA9TVsSAnZWagAALSsP/REfSXDS4nRBBrawVJ2P\nhMhRkyxjWv42GCQOOx6qDRsmo9+sCTxb12Wxki5Jo0PXezlWTyxSG5tbcHHj\n+OymFxocOE6jn7HLkT4CofnD7qLx2mQ3iZHyGg+C0nCylnXjlnGtgUgMRpYt\nL0Qt3BMvl3rTBcFkq4kUHpuv67zQW6NlQazY7B7sa+W4LL2aRryV1BtX/zuE\n2YNF1WyU3ARqJUpS31J2UBry851W8ADeK0selEGABDnekiw+pw2umKdCiCQJ\n6mXK4vp5iVSQ2XFwHZ7mVI6Wv4y+2Iv2yPMIZU7899h19BV7uExfTGOkR2cP\nI68wb1ogKDoOBCtY2LmqsDS39p6RNUWtRuU/GWqWF0Kf0To1Mt+vJoUqTmVK\n/inRv5mn9Ku6GMPvJMJnS5YzTT8joSYbclFtvamJYQaM6zHo1pvyWvejM1yb\nFqeoPYWeAoN4ikhOcP4YcUJGhhlpbGdO6M/FmSlWRK5zecSTm6EUuVopwc3r\nRS0txvBTWjvRuJIEPHXHhL9J6Ab1ofqIkqP/Svbm+6CZzp3KgaN1R6eKE0ib\nfLeeB7RTFqLFU7szt6zfS02x+vHExg1blM6m8GpTt5koc51mBA+Tce38gUcO\nLR+/dX2eMAwrNfwOsOhlyWBDsNvV1KgXH0bRp1UYpEIdrR9yNt/iLj60fxRe\nR9hu\r\n=AW+V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"8a57399297ddf3899d4e0663a8d0f3c6999d7803","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.2","@storybook/router":"6.3.0-alpha.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.2","@storybook/core-events":"6.3.0-alpha.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.2_1617945005526_0.5302967069776066","host":"s3://npm-registry-packages"}},"6.2.7":{"name":"@storybook/ui","version":"6.2.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ff526d02d5785dd9cfbcb9bd6688b7293abe271f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.7.tgz","fileCount":296,"integrity":"sha512-Ys60G+g4leag/cNPTTC9wp9JRYY2LgXREs4HE4tybo4Ga/ZhQZrWzgKXuEeqM3GJZgLcsKz+qtPVQJibDBbOMg==","signatures":[{"sig":"MEUCIQCRTQu/kLu4baygUV7VMFL9fRPke85xZI9pR+KwAiFmgAIgJBYCEBS+guw/EmugxghxvUX67gayTOReZCkvhS91FLs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb+gtCRA9TVsSAnZWagAAu+MQAJkTDNV2Nq2hDz1HGNAs\nMWf+E55o2Rd8qD6ZiL97QRJQs563XSK3+V/nQogWmqMDyz7ObI4MAsG8obNl\nud+4dEHSEkO3UTAOR32anc/kRrgjh+bOj0+ol/P9fU7Y+2NCthdftfxTI/zc\n31np5sDmaOXVBocQ73D1VCulVM9hsyv26brw2g+ZnXc6PKEvjFxaPTfuEU5w\nimp8hc+JguRCs3t7rj2ZMIRATnCua1OqFcE+QnB14Xfwq2KD/nuisedLWHIC\nR4TV0mqsDI4KKu6ck3OF8kXiiI1jy47/IGzqhf1FnbVXEfgUw9/I+UWEZ+eR\n/QB8F8s1HJEkb+5aWT+2WqVE2ty0j4U90HHeLqXRPM0/HFaGW1+7Ne5F+Ug+\n2/zQo/I1RMkkbwlDxAvCy5+9Bm097aDgHFVJjszx8ksZpXdyUreJFb7qR6zp\nZkvhO+mvXrdNPmqshePLvPWtZWBSZQ8kbxxbY24W0nwv4ozOFgaTa+mBm7Pg\nk3Q334zBXGG7SO8boV0lWdTFK7fi41nvZYBAkZqjSOMJDJATTr6+KLsNqyqb\n5FJiMCCARt5dTH3HBvCrAyMlprEDuySTvNo9VlPX9sObY76Gm7BIfIXEUMwA\ncMSvVm/ULCfYjr+WGBtllJ5QQkzyIiX/fsXApmjuQmUcUDFQqcwduN+moLyv\nQXpk\r\n=2dhx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"4cc07e57a9e6399dd71e2af43fe3dabebce6ed25","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.12.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.7","@storybook/router":"6.2.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.7","@storybook/core-events":"6.2.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.7_1617946668730_0.139595997276857","host":"s3://npm-registry-packages"}},"6.3.0-alpha.3":{"name":"@storybook/ui","version":"6.3.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e0ac2df88b3d5737c8a23ccb5bdacb8f59be2315","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.3.tgz","fileCount":296,"integrity":"sha512-MFyhtAw1oSTEtTGACbabOSdSTIt5m8rFq4rJEhjw736SJCvKHzN0nYuNPnkOEjeD8Ob4UfQaYxTd8kePo0UMAA==","signatures":[{"sig":"MEQCIF4VuizVvNFWZmCEztwnM41qM0Mb4CZhsS4F26BhhZdyAiA0RdpfN+vWYZW52Olh/PApXlYKNDDGC1EnzpEZQv82yg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcSwTCRA9TVsSAnZWagAA7tsP/0uKDoepqz8HnAisN7M2\nWtrxfFRNVEFhI8Qh/CDOdA6LsdodvKdEb7aQ1jhZ3B3Hnwnkmpi6AOnm9kdH\nlJQXSQqsOetFXeTYpnv+GZnsOtrJmcQ5OlQu0bYSWSLP50IQHA8Uv+VvihPE\nGSoVFa+sW7YMOgZ/0HB0U2dC2DjuPCbOVLSCKsUobRzHVZ4rIRYlzXcijnOW\nzSN1YAh7qF3m707GwdxDGCm8LJrnGS3CDBZM/SNouViFA4cFsoDxJu/MiEZA\nnFZC1HTV6W6aSIpgvxLx67c/268jqktf1jIvZ4a+xEAKYv6azDyIZSxGwLhw\nnWm1p/cPPFMEjP7gK6CH93HCcbX9PEWiZW59Lj1UjxIrhBEf/xPRcWEDfze9\n7TSTf1BmfpuLYjeFmOv4nQsGq7FrXGrAlBYZahubL1BAPMkmE5JIIGEioU/L\n94ZrjFr2ZNdH130P7qQTnPAvuyAviW1x1YB7S02+BCUzYOZ0/Lx7C1zlC37K\n87yCogrOs00qDxiEuWnQ7x/bUPZgRR6j4/9lqsU+k04vNkWjIB3NV392Mirt\nHbkssTAD0ndLGmPA3Y5ZGFd3CfmccOrooF12UfpuwvQasycSGzbJZI+XuOMf\nBKXlGC3Uf4BJi/hUXuNRQK6HHGfUB9Ybd8DGqgzV05iyi8GXtspUriC1tBC9\nBYqI\r\n=6Mv0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"4797065261cf6cfdb5aa3b1d451dde0361c3a19a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.3","@storybook/router":"6.3.0-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.3","@storybook/core-events":"6.3.0-alpha.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.3_1618029586593_0.3661022040444546","host":"s3://npm-registry-packages"}},"6.3.0-alpha.4":{"name":"@storybook/ui","version":"6.3.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"591719ab67f8d2a92a40b9da0ad9f3afbb75c57c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.4.tgz","fileCount":296,"integrity":"sha512-6lifkrIf8aRVPsMJguxiMqo2mTzmYJ8EX1y9+URcQvq4FGRGjX6p0hymxnBo1+94BE/JYDZFNqonCNcogp8Enw==","signatures":[{"sig":"MEUCIFBUNIufaa1HwJpQ6fQhsyTVlwZPnXlQUXUt3zvcJ9b4AiEAzhw616bhY2bpik6LKPThVepWdDDDXUz3nuuN80kCdDA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcZ8SCRA9TVsSAnZWagAA9HQP/0SL90oMTRQ5FAJlqZYq\nk3OgWt4IIWepEUr1lLfhwvSO9h1LdtkHjOQ3ybgG9MKFbUWP+1Ic1yy0Jbau\ngrl6XKZ2rhBO+JLKCv6X5R1n0wVDIM7GZok9JP2330OMRHfWihxJetL5eEhH\nFd1zU0v1muqcmGG825sYvwX8kyizf3BStC0xtddO0bFV9mjXEKYQDwMYC4jF\nuSfEsTVth73aOh7t3J5mHff09JiDXiZkrJBO6ZXCIeKtypxVpivhEaBZofx2\nivQwcUO/q37pgzTw4ue3uDeLBhqfKW3gO/D58xJ4MzI7AIfh5Y3Wz1W+gtSw\n2n2fYE7/kqVNU0o96+qbL+sHJhE4GVJheTIjo3wgQ3HoyGHkb2rgDm7ukAaL\n1PEV9tlvjw2IDNqqfEuzmOwarQ1Ww22XKAnab3c44Tgku0eiGmOhVeMWHiwM\njdOo7KcPyUu7dzWTtijAIPGoj+//RowB7ttBJsy49gEvh1sJXwUtAaFmb93R\nQRXLBKdAhGEdnWLLVEzdI/rzYqvT1wyZ/J7o/M65j3C9jsUSNyFTmJdg9NsM\nrvUzYEpudB5J/UmxwXJbRcvFveqc3ZQzAcgtiqIFGzPHx9UnStfuhiwu+jVf\nnXTu3dU3h+l/tgX+Nwoq6LzNtZHw5cEW82pPbE33B86dl81KRXm0Ycjp4EnL\nfPwM\r\n=2OtX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"157857bbe17910be4c5cdf6f75a39dfe9b17becb","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.4","@storybook/router":"6.3.0-alpha.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.4","@storybook/core-events":"6.3.0-alpha.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.4_1618059026348_0.774863742029855","host":"s3://npm-registry-packages"}},"6.3.0-alpha.5":{"name":"@storybook/ui","version":"6.3.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1f2336fc82b83adf1268397fb7325cf609195a08","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.5.tgz","fileCount":296,"integrity":"sha512-aF8qD6rpuYVbQhmXWrfiRs3ifXm9Eb1AcIAfTMknTo5HBC/k5bUyPWsAn5GexgRynO793wIay0G1iThDNMvfew==","signatures":[{"sig":"MEQCIEdQOh52WZuCOUHxF2zzBHJvodAOVjyCng+iG6EE8PAlAiBPD+5f6NkIC/35NTVAXDYjOTk50IGFgHUsRi3I1Icjeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcxkXCRA9TVsSAnZWagAAVn0P/0TvT3lbNGbc/xeulRIv\nxPbFgis53rY0bXqb/HChSI0X/4W1/NeC8f8aJFQe5tPDIkAJQe/B6ZGXfGbm\n0LsmEzssxAFVXHT30YrqimbtivtNcAhvYJc9Bm7G9Yn2BzEk0gUqj/OEXPA/\ng1i8pAPyIS9p8jXGEn018Ra8pWw7baHkmnlkMbXuEPU/3fVXMZVxI08Ci5K2\neYX2EDoJz7oOt6wc2eElxCYqlqeFLnGKGU16sQfvEC9+gg/SbhyqJIdFpfG+\nAUojxGZHidG3iGxEOgN/dXz2oFnoY6me2WQ/zPiOl5dV+C5Uq03QwJfwDHnf\nhgxr64qFXcrAlXA74TvdfANt/CtdF8L4loHqotP21BH7mKbEd4ERAVi66FnX\niEcPKBUy47zXFdriGIiRqHEAoisiz4pDrHb8ZFNIer5EM7cLWQeYYr8RosaM\nbmPnNd8y6ED/Beaxuf+nnXSIumWpzMZxOn7NKWOSJvNh88VF5l7b6c+xNfKE\nlVq1w1cGvnX3/qbFbEoX4gzQ5xzQWhgyjU/iRyc7MG6fdSYyf3DEzX0/u/nt\nwYTCBW8rAXA6FIUSCTP0sQLZC7tCtcV92bjNQ/G8tnxbACTAU5J4FMZ1Mg2u\n+oF13ydNX7y5Lj+CevOatu2+4mq+Obz/Nkd266/NAxZEi9DGQ2X7RrjLRQkf\nZ36C\r\n=hBF0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"9030fc7598b26f94e209c26152a021b218386b3d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.5","@storybook/router":"6.3.0-alpha.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.5","@storybook/core-events":"6.3.0-alpha.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.5_1618155798683_0.9084408452215198","host":"s3://npm-registry-packages"}},"6.3.0-alpha.6":{"name":"@storybook/ui","version":"6.3.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d8ed7e01991f2d79e79d34679c47c5d473a7d2c1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.6.tgz","fileCount":296,"integrity":"sha512-iIVgqYUnYcMRYFKimQMQGKQXSvmryUmADVdDlMAmUZAxwJrFq/bAb6qT0YnVTX25Po5wwb3Wrb4js7rspk4/Fg==","signatures":[{"sig":"MEUCIQCmvT1xz9w49lz2kPwnBTtcX6vzHHhUk63dtjzDPDEWyAIgMH7QU+71u47VlaWYK+Ra82tiQKhld6hIOnW2e2vLlzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdVeRCRA9TVsSAnZWagAAfjMQAKBl2OMJR46xjDOdl3Gt\nq0S2I2A4k521ruUyG/Tdr+4/TU2KlZlvqxGDUj57SPE6S4lhxHdqE2EqwXNn\nBaTiZT+ZEhA9quJyrew7+KFHIh288qpK5EkZCDQoP+7LZcYt+2FvpQcxfFMJ\nqd275lf2qWiJ+oCC8SwJNwrYFoCH5sOB0yDMLur3W0PQWACBu1SEMYw4iQUU\nD0Rw+3+0DJcZnBuy6yn0x3zKNDYb/NRhAAFbTZPj2tbNHstBCUMpE/Me+xmj\n3KIJ2kSGGoucjNktxkm/1hr7YC+N1ctrSaJ/FRFZpsI/KQo/QoRWj8gJ5ual\nKa8mDmFRLzW7EDjumBdJbJiNy+Md9djCMw05YekCqN+rjkPBjOJo+pqN9kyk\nxQPaNvmmekj+6NzjQA38NfCO8yGj97Ppe8EFoOdDwlMmsWVRDdXhUoAn6pZT\nB1IZhNshexZxqsqpjz5SJDQFEt295+UdAfwl27TIgPl+NpbXrVLyLTAuK2wB\nPb+c5Vu+3vpLpA6HqarL6bwZhdRZtHqBxjdOG2me+zgqyFWZApFNHxo0Ch7A\nCohCxvthHQYwBotXC2MXzlhfG/Z6nDAPPrQh2uNkTWZPdQSm4erp5fQNzfmb\ngdclYKWPrhSuIYTEYoHAStvmmfrsrH6Ozh8eX2v80HTvtOs+w79lLJfUnBQK\nKfao\r\n=gOXT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"60181528cff41ab003f819524e83285f2d24843a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.6","@storybook/router":"6.3.0-alpha.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.6","@storybook/core-events":"6.3.0-alpha.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.6_1618302864987_0.13174748133577507","host":"s3://npm-registry-packages"}},"6.3.0-alpha.7":{"name":"@storybook/ui","version":"6.3.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1c46a56ba1b73aa0ab8249bfe64fea93043d8cbd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.7.tgz","fileCount":296,"integrity":"sha512-f7PvOUqmMUmdF3e2nAJjrw6miGpHgUj16wl9ipoK5+McJTZlrk0a/0k6ZaI0ghYBB4dJDAFyTTvEi1OPHWkcJQ==","signatures":[{"sig":"MEYCIQDmQtWxY8xCeliEMByyYeJeezJSEGgmswgzLUm/1WfeOAIhAO1OhO1IjeWEnVyfiE20T11aGn2e+2M4QvlT5yvDCaQP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdlH4CRA9TVsSAnZWagAAS0sP/iFqG9Za1ZWv9QbCWOyR\nugT6ZuzzP/tREBCzSnBfX9hm7fsDh54LfwWJBDANBZoPUZ0XVVNkygDosz0F\nHMbZX3NOEpRdAp9wSqjmvr1JZWmID4X5v1UnbJE9/+A0DxUGmrlL/z5EnWNe\n8XfcoWYnd4FgyAZ+B77g/7+VKMIqPokW2qFhGwon3EhrG97eVPBLaQFsDNqs\nezFoOctqWEtluyYTMOhpPW13mLADgNPaxAtlmmAaewMtOpyWPVsPgQidkFzC\nORCYUcpgNSaEMlIgC/7x2nLHKh9IpIGQHqL4RHKZS41TMNWuuRhKeuRmF8tz\nErFlGqyx/PIvFiZzLm9wgGo5Jo1nPl/TBSYLpHbVQzzxeToyajy2q/BwTRTq\nAqxKchiVFWQZ3RIIIBqga1X2L2USHu0nGB3eOvGsxpIlHFtgVUMbj2FPWaHV\nMsjliN7iDeuyUtjS0YZKdH7JKeZkZmh2dCuW1mocXKDFIFLgu+PP8FYsiRvR\nlsdS029WEXOq7KRckOO05kg+K0L8+6kdUfsPguyS5mPwqQ7HqCTW6tLwWMN0\nj0CKCkXr+bqZ+3WXXUZ0vwVSAxYC2GixJg27/rMC9gBgZs9QXomaj+4bk7hJ\n8IcLFGOFKkHF3nyOI5qcek3FahZ2SuvkBqqlPKhkiJVtzuEhIl+6DHf0N6ES\nnEnw\r\n=g6T0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"ca7182ff5f2ce82ade20e198fed65cd701bf6084","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.7","@storybook/router":"6.3.0-alpha.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.7","@storybook/core-events":"6.3.0-alpha.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.7_1618366967487_0.7428197028992893","host":"s3://npm-registry-packages"}},"6.2.8":{"name":"@storybook/ui","version":"6.2.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"331f8f5bb8e6feaf15a3a91b23eba48509882650","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.8.tgz","fileCount":296,"integrity":"sha512-lPRa6z3ArHEewuIAAtHFdF7VwK7chMGza/PV1gAQT2ywUDibJoTen/qtUP4TKhLSJTOUsZK8q4X7yiN1KJBu5w==","signatures":[{"sig":"MEUCIQDMJX5zk45I7janmb0mLw96FWcp9dtQ2GDJO1xlK0CnFwIgepCSZGzwrC0pwrQuTnJdEiUYflBp/KDS6QownLcSHhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdld6CRA9TVsSAnZWagAAJSsQAJtffIfHnwNULCn3G6ff\n+gY9NX6oufJg/H3VmHBnB9bCyhUhvhGOHpPjKkaMG3jATkj703MSlp6CHSNH\nlnO1RKpe0xX/M71KgVb0gner5sjO69v8cxW8gG7RfDS7r0RjoAMpOGLTCyEi\nJmKNvqzgqRTXuuooW+eK8V1zc5PBsKixQVOdRrMWgfr4lKdWgCWFymzoRX9y\n4/j2aP/EAEQmFQoMZbl/SmEmPbHJSxbG0ZP1A+bQ+RfixWgymuPjNGwnIFtA\n4gzE+QUoe6bevhj3tO+3AygHeLUF6gqLtvlh5rsAwcOfG5Py1VLwuV7/ucP+\nM7AgxYWpqeP38CS3RSn25Y0Furc41uqeL5EUd0CyuzjakrVICvVLLs35tpLU\n36eNBNJcJhSVrYKc/9Hz9PM8jiMy7JG/fuo7NkCnINRJE/gJ47smmhuZbQj2\nsWr8pEnJiv3p/+RbUtB7ZKhULePLqUtZx8cOcZnFEkD2o2RBTvTeNNcU8BxT\nDaL+XYepney+1HochtpI6qKJmcOUx6xuYuakAbZQvmeswe+vFM97320CQ1pZ\nSptzzdP20eCTAE+VmmCJH5iAPH0dFmtf9PvV7n0Ol103AtAVgRvXqMuXMAGg\n9126AHEbx1e77FXHaHtpfY7LRU3U7WNAfJBfxet93GO1vl4hegYhYsmuDaDT\nQYTl\r\n=gCOE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"63c944f232fdfd95daa1da073fc2abc6243194c0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.8","@storybook/router":"6.2.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.8","@storybook/core-events":"6.2.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.8_1618368377674_0.31166906695294294","host":"s3://npm-registry-packages"}},"6.3.0-alpha.8":{"name":"@storybook/ui","version":"6.3.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d5db0babc9936a76c37cbc4d6bebe5d69b13ea84","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.8.tgz","fileCount":296,"integrity":"sha512-UL4RAcENsOrEx559oMECz9m9NsE/YXvlSavP19zXVhwOnMke6qsWOn9j/324DlMh1XrFtMTI7ec27jQXTiuKZw==","signatures":[{"sig":"MEUCIQCntjLkIt8VHVWiIALPvdrR/ilJK1dDfbfQtXuyBovYuQIgL4pzwRzXAHjzCcUlrctE6qjamO2aO3Qvs5neAbatpDM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeE0gCRA9TVsSAnZWagAAnfIP/2kXFP1hO+3o7ihAKpgj\neVsbrRSg9M4B1cb3uvb69uNalTCeGuO3fOh665ViVQeAygHBtskVhqgo3len\nnh4gASmWFg5HXp1ZIhsH2NXJdUfI4Vc8ck3rSSqPyTOYBlojr1+w2HWpVwoO\n7u4RbjmPOdbuoojBF0qs6D74hmpYVKwmwfZMzxl3TeEHlrDxk/GtFs9lMA7f\nZoq72Fw9wX2prTnluZR+XwbnGNkDctYG8ql5nIir/KuIyY7lSBQRE2hvFgKd\n+IP2sVDw/N2KMYou+HwAsccKh5QP3B4l2164Vgs2FpmDT3el7S7gAreQqOn6\nk4mrs4gyYjDJhVQXlYEAGN2bP7QOTyzWmoI01oNe+pGxv88B3rPvnhp6thHV\nJUM8lw3vvkyN0EZ0Rx7F9x9XxT6ANIoA8X8TdsO6Of/crf0ASF97RlbcCgMm\nt4snJfLenIWsFyVXbf4M5Bw1BRM8hnORQHG5efbwt9Kkj1z2YRrw8MUmCagP\niVxDit7myj3JZwYifjeR3MLrb3jtSjrBaVpaQb5qUpsldPKE/YpixEjvr334\nt2S8zk+PwbPkpcCQirAl4r41TyLlhuOEdpJFRnBgxLnJP8A9FOK9rAvmyMuc\nncVaksTvIOrXvMsjM9WB78n55AzmUceltBgpQGGIKZU5SjhKrjTDz/4KYlH+\nqPFB\r\n=uWWH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"2459eb428208887e4eafab91256c72389e60d934","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.8","@storybook/router":"6.3.0-alpha.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.8","@storybook/core-events":"6.3.0-alpha.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.8_1618496799968_0.7301161814296642","host":"s3://npm-registry-packages"}},"6.3.0-alpha.9":{"name":"@storybook/ui","version":"6.3.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c7baef21a05c5c3ff78f8c2ef260f9886ea62d9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.9.tgz","fileCount":296,"integrity":"sha512-OYoI6pX2CwBxLk3c673nFQbqYugE6u/EfmEY+O4kGiMYMH7IE/GPT/R6wkHKXofH8j4AfqE0tSujC6cR+rZ+eg==","signatures":[{"sig":"MEUCIQDiRRXHvF4dywihJpw5Lyz8A4Co3B70AE9hjVye//aaGQIgJdFP4WDSjtcQOym505ZMvVx11hCKo9aLtEn4tksqZwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeb+rCRA9TVsSAnZWagAAfmkQAIGM3WXmgCqHo/4B8fyT\nTRj+OH41ddk+eKOh3mHpfnPykOQMba8HVMijs2kPl1ZMDaiGjUxrwehb/k8h\nsduRMgRo7qzZLk24K99zi297DX+JMyAXZF+rPJ3Xz4nL4pnnn7L27gmZUUn3\ndbEZa1Wb4ZeV2VH2/57QzAj88LEticSZUVPj+UJ+VOq533zgEP/Wh7zL2/m2\ndsWbYijgu/kW5vYgBKJiPD/rbHLEFC1zltt+HCtNQUVb1O+pI7XEOIFoI6Gh\neWrl0kAUaNhFDbaWWWqjInHUW6I0Ck01f95WaKbikgmnkYKZdAklJDymfiB8\nQr7bAfjvIZJW4yq4FcGTvZ/LNZRBq5fEKGI07JWMN5Q5lAa/oHRPvK12jwRo\n63rNdq4uYG1ktROT8Jgny393yR0jL8HWX41JontPejx6e8c/PNAjt4ASYElv\nD8i4VQ47gV0ynIQwvECHtCzmo+2W6l3NhRqS0MSmHhF6Rimfa8NDVV5lgWou\n49R5upVBKA6PD/FbaI1XVpKtRrpsskrJBEcF+cy4JeOd2L1L3if5lRqwvt1u\n0SG4CQ+jWIIE9usNA7KEtIz6OZwYLHhC3+2Y8z6/6V8vapHGFfR2aocbdFc8\n107qDSzjkvcQsQFXCRQHRwOexU8v3QA8360Y577i18Y063OAXw93GKtO9s8Q\n3KYl\r\n=zCU5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"1d75ab7fc1bb8631bb5f47f96447aa53aa5da46e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.9","@storybook/router":"6.3.0-alpha.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.9","@storybook/core-events":"6.3.0-alpha.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.9_1618591659215_0.7547727217949378","host":"s3://npm-registry-packages"}},"6.3.0-alpha.10":{"name":"@storybook/ui","version":"6.3.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.10","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"42c83873b4758d80a4f0bb86f17e9c8a4b4bb49b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.10.tgz","fileCount":296,"integrity":"sha512-0TLluYEWjeiOrFr8CTPJ/ipBZJL7cI68aG/GXMBG4R4nxQl+fH7w5bRc3Dq9m9g0O4nyO1okwrzu3vF6kIyiSA==","signatures":[{"sig":"MEUCIBogcYTs1j6Wq2UK5azINYC+kujcbr1k3e2kVRJRZItpAiEApjGmktgF65FGVFCy7LNhmhm7VA2jjm0Epo5aPIe2O1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfDJeCRA9TVsSAnZWagAAnHEQAJEY6dQ8Zb5esGgVtGMR\nKfgjSiB4/Usm6tjbB0o2Zg3Mvf+HoVfC30uCSn3NqGEku8FyyGhpkgpJalOg\nLjdkROLyGcLI9gO/ntZroajIxCbDjmt+goGPJZ1gI0/kVuaUAISnSiGuuKRA\n7/ivTcw3yccl30YOWET7U3nb/W7hdSZ1iLYEgt8ErWCDfbw7cutvvPwXtxV2\nkGSll3mYRcsdLt548bVurALrWR/uSXhZNfrVisCqpjw/hQV85xl3sbK1ag8Z\ncGRivzqW7tcB77AZhg39LqURWPjKZJd7LZzVJtGRT3sKc3V3aQH9H1JSoa28\nqF9sEpSUKXmwV7A8+a0RGisgTmLDL3tteb4Q950yxH5PXw5mb30CTctb64/d\nz7opsgo7y6iywzXb5s4JkpXPIZSbZzaPR3vRw3ydQlvmz2tY81PUbBps1AoU\nSbj/NRjrCmmKT/wGn/iowK4qZRlnOrQZKDDsUZrUvblDXU0lL7fUL6kV2HMK\ngocOJQKWpXvghprcdo2f+Rxor1VtVdQosctHVBV3x6iKjJ2PzDdTJ7xS6Zax\nUB5Zfj3D0xTNmHIJvrnKePyHsqBbhd4i8R4wKFs8ceeNTGQyz0Li0f0ndx4y\n7LUO0g2SZ2KRzyXsBCrpq+XuxSLuzGCZCP7mhKl57ka/9+qSznC6Rp1qv3Wz\nKubV\r\n=OglS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","gitHead":"080babf6d75b17cd3fa95923858408cafa1eb374","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.10","@storybook/router":"6.3.0-alpha.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.10","@storybook/core-events":"6.3.0-alpha.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.10_1618752093892_0.1904128178433051","host":"s3://npm-registry-packages"}},"6.3.0-alpha.11":{"name":"@storybook/ui","version":"6.3.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84d6c8b6c4feddfb654e02c09136c5f425068d67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.11.tgz","fileCount":296,"integrity":"sha512-pL9VKZeWVLPAYEoDUJAd6eeF4qE6iSlPA73/4IujF4HR1CJCFfVWLJDK/kSQ9cSiB4favYh8MpuD+30nBQWDbA==","signatures":[{"sig":"MEYCIQDiieWXtGZC/Icgn3HXcy2W61ZMlETYuHaz3349JKd20gIhAN6TzbihZeIjQaIJZDTr8DzXGR6+HzGeO6EMadgQvkUG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfZF9CRA9TVsSAnZWagAAkVUP+wT4j+xAPxuE7GhoQwGj\njonT/ZeOgR3jooYlDTPpCUwWqQ+1sMAAsNl7oRaaYuyOcslYZMtCcRmQkkl/\nl/fM67n1gsIUtTqyUoE2PktwF8zj4PCET4sTAZgT5hbvhwNPhjOnpU1bru/2\nZr8Ge3+YHYwZ5tFGYlfEumX2i9fxEqMdGm/mAO9estLQOsqKryGHaYmnLqoC\nYxWr0U7Sb+vaF1RoLJdx0dJ6gHGz7AanEAa9HplBMFgEAr7UooWKEuaekzR0\ntDcwRc0qvH4OqmcRHeZpiHNld2wvBUhbztjFREfR4GRzzGhhkvUpUCYqE8d7\nhtBBI8nyKcgr+e1cs2AmXhlDsag1cAmUU2K0yhzMEPP5dcgcmJdI8vkKoV2E\nD/HIUc0MEPZmyvp9i/0j1dw0Q3fRc7kBFOYggL9yC1oVJva/zYNtI0sGzCsV\nyFYtWVJZd/j2IzjzIUqXOso+lMyoaP6OwhwTCBIDLHC2NF7UWeXxtwRYW+F/\n26a4kJsTtqmWgPtMP1oXs+yYqi4rTCGYB6VkBw2rxSVDlnVYG/brg3tYsrZC\nyEElcUOCm4NDgw0uHVXZZ26VcQIhn2/LRfE4dnYBjNTSg0tRVWMuFSybq+QX\n77yGwCtd7Vvsp4u3301zZ2DignK1rqL2ZmlWEcc4TNnLGuz4Gs6yuNJZBp5a\nxZRj\r\n=HDmu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7620a2978c6c85168b5d922f4d994cb57526998f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.11","@storybook/router":"6.3.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.11","@storybook/core-events":"6.3.0-alpha.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.11_1618841980940_0.3221614381533666","host":"s3://npm-registry-packages"}},"6.3.0-alpha.12":{"name":"@storybook/ui","version":"6.3.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ed0e380063d6210785cc5b6c45d43ef52af6cfe2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.12.tgz","fileCount":296,"integrity":"sha512-njTRGCLnm1Z+9/KiWtobKcKUEZQzwYLt+faUYxDJ05VptwHWW+y23iVvq/tImsFLF8CahRjnUSN0lIRgRJl1LQ==","signatures":[{"sig":"MEUCIEhnvLzNEzPpdCIhimTYmo4MPFDcW1GkSLd8gt2JqRt9AiEA7ep3sCjUE89/Ca3xdANPpRjRATYB2f71BDjrpJl99ro=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfcWYCRA9TVsSAnZWagAAEYEP/0t3+4p8wsXhpPkorp77\nQGMaJzP6P7MrSRK9h3YJ+YQyb/u6TLeQTdWxkvx7atbHCRpSiynT/RrP7WTG\nj8wVhFe/SPZdYIL0KHoHOjOpHZdQra+MaqRVTzzSJDkFPo/InLOSlIWwTYaR\nyQYM8Z/V9GdHBHBR3f3NY0ryF0guGqRbkra+ZNYOXvd+KR5p2TmM2o35DGgu\nB9rUrkmv4XwNbptB1VWL2EVn5CT+IOocOsVHQ9DhtMhvrRIUJb1FClnl9abf\nHDXgAplXHv94qIXHISwpi+wPbyR6DJfZqu+Vdk2qRleU47ZwMWdqL2qXDNXG\n86n4qVXq4XAZ1F4FfC8Ftvw2PlRYIfH4xPMxlqEkXQckGQCoHFwkTC5guIsd\nCrJl1ylAbKuLMZGyuSPgi7hxBytd9p+dhH2c2LpVqoDBVXX6YWEgTddfmIs7\nMqqAC4dHDH+X/SY4BW0gX4I5+KdX7TXtveyUi2rCsnETPjDbsKQiirjqig1x\nZNu8QP/0qKJQWd60waB70U1K60HgC/kMyWD7d8Jpe4FisIzqYkWq31EQh8de\nlKZQS8z000piWPbewbbrDY+ePXnwBUrGHMz8ymnGQi/528mEIAdNtT53YJaX\nq5gfP4ITwZhMPTa7dXuDJxIFduDAWKAMXYjDzj6YxD45dHS9xUccBcgHadd5\nYnwk\r\n=PWr2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d559d96fc502634e605654d777bf92924692f154","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.12","@storybook/router":"6.3.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.12","@storybook/core-events":"6.3.0-alpha.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.12_1618855319866_0.513020147824957","host":"s3://npm-registry-packages"}},"6.3.0-alpha.13":{"name":"@storybook/ui","version":"6.3.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.13","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6e07490d44d6fb837aa4cd125cf8a7bb66b7d9cb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.13.tgz","fileCount":296,"integrity":"sha512-z085Bd/qEC9L6UaZBFBRixr34xs4R7DbX06msbfVGvhDRFcaHNZyxzlYZsEowiFtKcGt+ufo33fcPJ7XkvAKDw==","signatures":[{"sig":"MEUCIQDrIg5+y9yMfRWlBxAcNsJi5t+t89wz9XnssStVNEqBVwIgcVpdFepuLcbCDxugGV6mjXCtNtAafqgagm9/MMipeNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf5GuCRA9TVsSAnZWagAABfQP/A19a+HMpFtawT45/lEE\neRpTyd3Y6z0Y+29qitG180V1YrvtTlERltQowrJpTZyL2bEsooMW34UU0kzA\n9YvVbHOUfHrW9tLbV37Mq4ONsYApYWOaUNSCXSpc4l0ju8wHBx84+eYvPEBE\naMbLrB7O4cZtIxXHMByQN+kLSUIil1rRGJFeu3hiVEdDYhKMRg0n1PhcHTQK\nKmQHlBLVyVkdpAQ6f/g85n08vMguKbY1YJtXNPMAvOUusnPGGAVhb0cdrtft\npuDu705qe5doKOXQJGZ8xP75Uvxm0ApPHvA7CNFGQyALRceV4aCFo4z7cZW9\n8Jg1HtE9GfjHualckkHJoIepWgowcq0Kn2GZoEsN5ZNFD3KzCgB5Q6zYY8Rk\nTAVqFxXjttzSa/FhU1WU32O9mzA4PdG/8005dcTgefexZnTs2asPVcxfnP1q\nrtrVtyLCVvutkhCTMKk4WFgiWTS5jjFRqK9Gpwsn7hMNwWsi0JAcrDAXLM/3\nUjuAZKBqiNe/VqF63WoTZrtvmcXkl/1IzjkUYg1sI5F5oTYpZk3u9Ej/I2Yk\nTjnMnd2jv2aLyKA+yFrkJ71jDcA/hxPNT4213qjsOFWjNPifz9x/9ZN9bRB6\nAN9je8UV8vgwYhDtPcqVejsZN/y7gL/kHd9pxTjRrPeq9Ya19KYiCIIyerzE\nskTm\r\n=qqsK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"35287402b58e8c9ec660d28e9fe812f6b1204254","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.13","@storybook/router":"6.3.0-alpha.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.13","@storybook/core-events":"6.3.0-alpha.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.13_1618973101964_0.8191723360827528","host":"s3://npm-registry-packages"}},"6.3.0-alpha.14":{"name":"@storybook/ui","version":"6.3.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.14","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b57a1734f0dc08c2a16154e01ba84e9c7954b52c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.14.tgz","fileCount":296,"integrity":"sha512-5CaO9ML7voYsySUB5S1E9D3eGlKGsxxw6qpS1wY0v5Sa2IDCyHI8uxqVPQHIryiJbGuRWRl6aRx36EaXDP7sSg==","signatures":[{"sig":"MEQCIBWn1vQqo+HYTwtO4FEkh3vD1a0G0DVT4ijmJza9c7/4AiAE5O+B2zFdVTO914QjKN78Q+Q2b+g6Ei+LlWKq2G7fEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2575654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggi5ECRA9TVsSAnZWagAA2RUP/iEpzm+Ti/fSIgIhnnpO\nnze+FAjlE8J1m3o5YFQ6RCkXsNfW3WLSZq1r/oekVhJDPOfj59aIaH//Z5H4\nV+RpYh8M4YzaTV0LTfXnCFTWciXxlIIMnxWXhpK7myHZZz7G25hMMGPVrNGL\n914eW9wmaNDduWI675JTN0TIUWUD5BKjyKJOPi/RpynvkGBGzNC2pCkVvycA\nMB78xpqK5J1mqAyQGhgcnzbRTkJfavqFCw07ulEBSGeh/iBIlEs1o1NnYzkW\n81LdFMILmAwArXn7YCVTGsvwKD6wIRKfQ063I/dkpxl+exOhFZMyvbgGCLk7\n545DMwDs3YvXFpi61taX4hEFlyi3JoJB5q11k7PYISPnFg/hXc2nilYrLDSr\n3S7iRhbQg7ZyzEhhZ4CzSTCL5SMIWNB1E+lrssEwzD8wrvZ8nzTESz0plzLu\nJ1G8JfGzZeiH9X41eRNw9TNS75oNgK+NLcuYg8rrsI2L5BsvxOZvSkVsIjoq\n5x8ortqc3HLA4nic14zrlOP9rP2aOb1MLcfX7yC0kABfymq3m1yk7rAUjmB9\nuCCRK6Yf64gdedADaENTw2zrmodRqJiVpnBLZ9rBpf3QmxqUBTmHdxUalXoe\nKz5BxD1JZO7nMt0A1OU2rYRkQdq5bHUwYUpDvXp5RLVc6iwlir5j5drnIu/s\n9G7N\r\n=1fg7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"eb1e3a913f3c5329539a7a908e7cb955ffaa8100","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.14","@storybook/router":"6.3.0-alpha.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.14","@storybook/core-events":"6.3.0-alpha.14","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.14_1619144259542_0.41939579306971386","host":"s3://npm-registry-packages"}},"6.2.9":{"name":"@storybook/ui","version":"6.2.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.2.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"25cdf7ae2ef38ab337570c2377fda1da999792e7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.2.9.tgz","fileCount":296,"integrity":"sha512-jq2xmw3reIqik/6ibUSbNKGR+Xvr9wkAEwexiOl+5WQ5BeYJpw4dmDmsFQf+SQuWaSEUUPolbzkakRQM778Kdg==","signatures":[{"sig":"MEYCIQDfR0aHuByj9EFTMPbL8PZMjEqDN8piB7blYq/fxOm7KAIhAPxqqx0oZoU5QPXP7/4EGrfYhEps9igdYCX8sL2CMFog","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2543311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggjmwCRA9TVsSAnZWagAA69kP/3T4Mx6LrWRnRJDfptwe\nJezfCZKR4bFm17YVB6ZaHpRulfES7lz0YSHW2Dxm7NteFG+uUpKe7uHCYYVD\nVF65mr2WmLAc5S2WRq5WUtFm8bcLfL3F/1rktj5LixNszpyDcHumCK7lkujp\nU+VIUBDrGSUMy7k+ekMrkNeqbQzp4LyR2n+C7XqVDEsZHWA3C83hc73L2N/Q\n2+WVe4rORC1XDUKLscw3Fmlg2TpoMlBP2MaUIpoNRiyMGxH5aobiUpaPRTWI\nPXtFS4hc8HacSge3Z3ZiUirx+gAqKLkR16Bz/dBwEhPamjkSuVam4+R6bk9U\nbv19yDyYYUJCkIfR+mFUc9jXlx/2fV2YmJROYWyr5NvPOmCEmKDnjILitvt5\nO342X9OkqUz9bEGn/KpTYrJL8NJEzzz4lWe9dxWhtVt5jdTHSa8l9Eww6YqK\nCzYSEPHIcVBxtjHVUTRT8wIMwc2+YvNXnx2mtyMlsbwCENx2nDOCquSUJgKP\nJ9mf0xPSMU7VA6hDkBeytz2BEHJV7xfFqKt/6SDoWAtgNY1x+fXdPCCqkBq3\nErknafaCFvpqXJ5GMWaxsaBkG6at0gf8Sp+zMXlZ+aAvIGSYkozR0ebBazXe\n9ATACIzSqC3URmw5prVsjfWfww5yqOs8EFHa/G9NoL4kwp5IzdJRehh2AD1E\niIQs\r\n=GV4+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","gitHead":"588d1330b80596a41cc6bae7aecc00201a6c0679","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.2.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.2.9","@storybook/router":"6.2.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.2.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.2.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.2.9","@storybook/core-events":"6.2.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.2.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.2.9_1619147183507_0.034991745913550254","host":"s3://npm-registry-packages"}},"6.3.0-alpha.15":{"name":"@storybook/ui","version":"6.3.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.15","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7baa462c7c6f93ab0682b72ddc7492b384ba8753","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.15.tgz","fileCount":296,"integrity":"sha512-NDvEIeD/ce5tk5k5qU3HAh/hHjjuCKdH78lH92yVJpl+FlfRzdrwVFGZ7nk6W6Cz33wirPylxWy8BhBDNO0kDA==","signatures":[{"sig":"MEYCIQDEY/QCCfri1yL9iCMp15618W/mv3uFxq9QzrW1Y0kSEwIhANUwXll8O33o/nMeIOjcB/X6C4GYt4ZP8sQ8QjNnbpei","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiEtfCRA9TVsSAnZWagAAJB0P/A1tzDcrcnjcsbmvlkwA\n7hVPiaYJjxiLyGOePbM0Zb5ViLQZhtYpj6KyDrq2CoIAmrN6lemvIrP+3FJ9\ns8BY8hMgeIoqMTLbR4alw30TbKsZqfJvxN8lmjn/wXJdLYyCFAKxuGyBNR+R\nym6bJqVM7JcT517MdBtwiZvBcSoTqqP9hOW+YKt0zqfUSepMIX198RUIZJPT\nXuLH23nXd6jLYmL00dJ+Ks11/2/EKz18wX9FzZHbgog4lMPCTTa8k0B4Cd2P\nJYPjBfmIk9qz8x3bJYk1D885I0PoINVFOTyPt2s3x4O6wzHVOPixYqmt6Cf0\nh9sngcw4lKze/ukLadlsyFzQeXHkJ27mrFyTlptrYp3BT8U0TMj1wmAtYj1P\nUzdUZFLqC0uhxRdMJSLyre4Tj037DsNY0l4BKhOwTHS3FmlsL75BjXcCmENZ\nmMXDyR2EcFG2mtqNbarKxlxQN0jdVMtoRP5xHmM/CFrIrvHLfbTAfVUDQeIk\nZMgLbJVBTO35JuPaWEQdp50vhpsgq03SQKPukEM+t3VElXHBqi+zUnIizAmK\nqu9oD6EY5K0uGcVYJpeS9PQiJusn56+ESjYP8/MWbbC32jNLA+k2Jw7+N2wO\n17RuPgBFShyuJazThDVR0tCHeE0p1B1KTTrB3yyBwZmADkNknVPh2yDtvFon\n+r4K\r\n=pf4W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"11ea895ed3be540d4a353eed8bc50aa08cf5fcf5","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.15","@storybook/router":"6.3.0-alpha.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.15","@storybook/core-events":"6.3.0-alpha.15","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.15_1619544927179_0.009607550441411039","host":"s3://npm-registry-packages"}},"6.3.0-alpha.16":{"name":"@storybook/ui","version":"6.3.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.16","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5cbefb93ce191543eccf1b10e917f2a54a6a2944","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.16.tgz","fileCount":296,"integrity":"sha512-jg2DpGqgQcLe2SI8vEDZSqfY20L4MpYOuF1nkihlvusEQmRTZWCF6j0vx59cDx5j6yuJpPrV1B9ce7hEFa2SPw==","signatures":[{"sig":"MEYCIQCJ71FzaPDyYguledNd9OZ3zsP2x+Ildd8fWa1T+p5VFAIhAKESF2eM1rjeKOhnRvN7+WFsf3lS3zOZJGBpnglxJKWz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiitTCRA9TVsSAnZWagAA3DUP/jgG5MIGZ4ZSaQS2SwjO\nTAhEad1XVI5TOvAjFy2w+ic6t85jNaoJLhJSt/wnkeC43Nb2sJLROcOrYhui\nrKRd66i4gEphqIek7dZJcNjV/6skVgxNv+McchlB5zXJNkGvH7ys923ulP/x\nP75/NP1pYkqxhL2MglqyAzITJNST6zSofXvdxtjdxJzXxJznVs298mKtRStA\n7zxv24Q1A25fNw30zWbk1dmIEiyQ5i0E9C1WbVfyZSiU5p7Z2WDMNkpmbI2O\nXkMmcfZ7zqReRTsa56Gy+UlL5T3zwTaebLnZZlHwFL/GCr1OgJkHFCHD8+l5\nL5Ed1tqmCvad9bLvpyze2NBFsE+sOGXM5gMEzUekGr1mD/anbJkVQeCie1H7\nqCqIOkJQGUdAMJ7KkYMt2pTq5BUVLsZ6usMN7+xX4YkvxQLIF6lj9OaNulje\ni6m6e/ogPraskrMFRVp3iczkWJOiN71t3sp8ay/tu9oy9INlyOwbwODXOUDV\nEFx4tl+z42XDSLzL5AZDeB49cJrj52qwyBO5qkLn1g+EjPs6rt9pPRbYYMeV\nNZ62SsBBo/gDm9qJPvZQvlkuAczrWNhyQRToBmHqNJD6Zb06GfILTb0QJYTo\nsHRIgEKcV9ifjt2xHdKt5bMLL78mfiHTJwitjiWJpyoRO9g3Nr8FqcfyWxzm\nv37P\r\n=tHc3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f09bb7bf0016bfbc2723f43b3e214e4a1c644843","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.16","@storybook/router":"6.3.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.16","@storybook/core-events":"6.3.0-alpha.16","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.16_1619667795227_0.537885870237526","host":"s3://npm-registry-packages"}},"6.3.0-alpha.17":{"name":"@storybook/ui","version":"6.3.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.17","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b9301be44f272cc05179736ee8e58090493bce3d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.17.tgz","fileCount":296,"integrity":"sha512-aYDOqpuFjOJpzAQCG7bp3EMBf6CxHatEleu6FMVFG+QwZtQGAJwfWigFkbhncFx2m/S/TEMjbNdl7LoNFU3fpA==","signatures":[{"sig":"MEUCIQDqFjOqMcmkk7NhWlV7h7osN7YmxejTdBq4d66CSzZSDAIgVgohvwDXN6Fve0VtbpgFiagN12gpE7CuXNmwsk8Ow8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi6PhCRA9TVsSAnZWagAA+94P/jqi1Lf+Ad2mHMZ1PCP8\ng4dPON2khqSM092wJIxpj3CrHIe501uq7EC910IUUzNylZNkA9ClZNlZL8f5\nEVSKpznn6vKvOehJibzwgai8SmZPAY/hIuvv0MJjtFzcxiu6Rc1B1Gha7ALu\ndL/gLR+aFnFLL6DQTo07/FOIpR3//p1Azmpe5vMityjK6eEQIlynEmYPJrQa\nUGKnYai1eU3vzw4drecQ6lMBVySVQFD/o8DAZJwOkedKkIIQKMqF2QXtl1XI\nORiBm4/7zN1veJW+ekbXl/7m2rUt6Wqseae07HWvyx4RwKP/vmtZO1v1+WrN\nJmeKeoNN9/A2bQi1sGu4Dw02xd0MHwYX7ow+NhY6tvG7TWXTzPwtYcQJggcL\n7K2+PdzOxSGx40gV6LelNk1Voa1oPc2k9ILiEu6WaKv2t3UZn3I3XrqwFhWD\nw4VmIYFbyz0ccusAnaQkU8lPjzseN5J4LA5+njTeKfEaqqy4HvbVMxeLT6jx\nF3mdG6GXKWCKJjG2wGNGQBBZFh9g7kT31o5J6+kpe91MN48i36ExUeXq6KKA\nE9J/Xk/E72pH1SFDwKoVECZPYgqwIh/LWnthQm0HM6J8vqow9IrpO3S0c7yf\nUY4O+CQJvVMYsXfpWntXQjSoZ2vF8gbiePO44zX30ACrnS5g9dRqxHceGBnd\nKwO4\r\n=qk7z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"36d878614dcdea5f06e9ecae10da69fe36358ebf","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.17","@storybook/router":"6.3.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.17","@storybook/core-events":"6.3.0-alpha.17","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.17_1619764193110_0.1331525389655397","host":"s3://npm-registry-packages"}},"6.3.0-alpha.18":{"name":"@storybook/ui","version":"6.3.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.18","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a2231d97c73885ff77d3dee1e4a7d42a9216bdac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.18.tgz","fileCount":296,"integrity":"sha512-RLXCJ//IRzcsZfuJ5U1EG2Y+tjohnP4RosURiLpU67gc8EhTuYahXjlf6IqWyq0kvfmMhemkgaE6wjR4ggVKMg==","signatures":[{"sig":"MEYCIQC/ACWy1oSIvcfWkSqYE45jTQq+4wx9yTPBzZZ1b63+BQIhAKm98NINdzUgPNuyhmCFnI7CA9kqjMpRRBT7fUahZTa1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjs5/CRA9TVsSAnZWagAAlcMP/2+U2mNMbRu95YLmHNCa\nCFpaieE2+74AuXV0WNkU6ailnXRzGa8FmINcn0F/Csaw9PU0VI89Z8VvXmwN\nNF0dw+/Li+Vw4uEcB5TWgo26HbZOqdQkzWxigJP1Lp6MTIkP+OMFCdth9Vix\n98iLrXwHwWsRAeLo8qZa7FxPByAtYRnbcy7POwIWbWIrVvM3CaW6Orx4HXZj\nwMqnlClKFiID47Rb5CrkfF7DSL2LZuFwK1n4iGKKo5f7nLS2oyRYvPTKH2II\nsLjdieneMD/XFtTP2pQ41G9bKlbOQ+8Y5LENfnrje8+j6GzQWcTnTIhx6iOh\n6713jYWJqi9yeF11VD613GBiLYwBbEh0tlKztgL3eYUJ6q8dx8uf6Vjffdpt\nqifSf5WUW5FFGtohNqjPJxCYe+fyp2ug0Tzg17teNI9xFg3gqrK9DZ43KhJ4\n/BAd+7Xh2FejUWQxUox4hld4JbZ+x6n659QadarBhDk0v1rzEMYvK1/2Z4LS\nd7fAqKpB1GcN7SnxMQHE4PkrTxbkc4Bw9Xx53sild/inS9VCt+JPuLDKRJch\n3EOljkEFcvjJUNyhrvfHecmv3ST3j5LgrFfYjrmTbXw5lfE7pcYeSSM1MxF9\nq81PRnSQu+yt3F4yNwjxOcvhnYW9RHuZRH63IZNIc91xFAfe/ewYmMA355GS\norwe\r\n=jyQq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d3942573e1cff3aa16066b798b22fd732259e67b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.18","@storybook/router":"6.3.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.18","@storybook/core-events":"6.3.0-alpha.18","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.18_1619971711531_0.10678882376116894","host":"s3://npm-registry-packages"}},"6.3.0-alpha.19":{"name":"@storybook/ui","version":"6.3.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.19","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1d34f31a56c85a0e198cd8dfc3117bcd19c6f241","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.19.tgz","fileCount":296,"integrity":"sha512-tWTmw5dLxjMuxhhcil+8gSHGj5vqIsaQXaMViVczQlgmZ6/WS0JFpzjJtBtwp4I9q0lVCyowGBlXx6ivnfME0w==","signatures":[{"sig":"MEUCIQCQg0y0+jccK3nuqBaI5yT2aHiygiBqixQ4Wucubl6EIgIgHsFWSm3XpecNelficWklWEC2phxYnJeuJOxtIsR+Z3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj9j+CRA9TVsSAnZWagAAVdwP/RTH2ujStbiZUJrv4Aik\nBEtF39tBqQBq9fjF8vl1fwolQFzMBbTqbfACd1wR1fyASkVUYnEq3qdouHTH\nvhgk8eaN/n4q5VOZSMWkeHU5X2W9i4MQJ8k82ZjYwqxI055BNA5s+CSO4n6g\nDR7wpGMbisVbTdcrgN6nxBbxytnB/WOLpPVWsFqwxaBZFpBcIlqjNhaG7FF9\n1wjCMFEWRk6Kh05kKX4azAnzTJsXfHcDn5eXK9qZNdnbxm6M9vK0SgrddhXO\nUeDdIyGgj6UyBq70GIP532sfSDlb09j6/glwY0pV9R5jAtMaLXRxudyC/W0Q\n74Qk8rXqqjyUVp32kTtCb2W/ie/c/GFrZNq9SFUCCiMh2eOYiJMzt9fMp/Vl\nZd14k4xEwnkGx232Kxc2Jk8tcSsY2ilncryRbs+N9UvXyFI5b/1+YS6f7TIC\n9gwkqef863ic55HuMOdTG/fSx20t/C8VOD4oa06DUHD2MBnlB3pr0ixjB+d+\nhIggHKfw7EYz6hnctOXk4fw3NGvsmyCJATPcf+InfGer/fbwUWfsTIH/xRrC\nI8PvDcG1y37eQI5dwtf7wJlnIXjnRo86Qef1687FNf+5tYeJvQX6JGcXXWVf\n/4cy1kyCBJUxlGvkpnkOTurYPv5GqYSquudFU1e0IEQWGPBRtRzL6LWhFktR\nBm8q\r\n=d/RU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8ba485343b31df4e65fce2494a5f615d6d6c661d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.19","@storybook/router":"6.3.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.19","@storybook/core-events":"6.3.0-alpha.19","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.19_1620039934080_0.5459866136149827","host":"s3://npm-registry-packages"}},"6.3.0-alpha.20":{"name":"@storybook/ui","version":"6.3.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.20","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"560f4eb5125644f8e797ae661b6c0c45eae6876d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.20.tgz","fileCount":296,"integrity":"sha512-PYouFXo8ZXnEf8GKFKPsCJ7E2hagnf9z1E6xLRX2qs5OCxNmtqySDh3+iqgDTXCaUwJekxQ+svbHmKRN1Cvbgw==","signatures":[{"sig":"MEUCIQDTSRYK4zuymiLTxU4Rk02GsmUdtDGdYzGL1FD3wmietQIgZuUNySZoNZQhvj1z8YQRksEkl9a56qY9E4afyZEyjic=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk/SbCRA9TVsSAnZWagAAkeUP/ic/OzFdcg24MskS3KHh\nZdGVWHTW6Lkt2DNQM+2d9sfVoQwdtYivKvmntfdHBqdsFQLjGJp9w1hNW0tx\nbEEHoEE6z5zq0mE6haivlcl4qCRS6/huGsEvuRPJAN0MYVmx/qOViXOetChZ\nDbwlQA77D8lZN0vStP51ceDeuoRW2o7UPKA6OCPzgmjJYhYXZtotC1yqkt/I\nlJAXOkdd8aB+aVdrpZpxp8Odo8ixht5DebJ7I5bvOovj0M5983jtdo/OUeTy\n3OAixzyjGWw3RUGmxNP4Y8zaaR3nr3r2yeEx2YF9MZpgJoXjB5wW6pOVJN4u\nyTqxMDrloPd2JWlt9LAQxjLK02zzaL1BZxp/8roirdu61cHjZJCj/wP/A27g\nYJ/bWGkIUBaSkMX/JrIpO0CvCcNlm0mR27BmRX6JwcN62sPk/qcY1NsqSTbB\n7Zd2EBudx5j2cV/X/QX1V5e9STJYNS5Qx/BvtxkOqL4KL4Lw0Id9YOfgKhT0\nDAaEoA/pWqAgwNOtUfcX1s83HugBsO+JG96Irjw6cDiK269+qsS2Q1JPc2hr\nexTocUzdD8IbVFiAZYfnY/5trtGKQX39yvK+fgh2pH2ORJZFfnJ4i3dRek1k\ng2Sh685LwcrsI7KCvAFcU71b3qFBknyKq7ptdaHku5b4re5EvVYSa7cGJYet\nmhbf\r\n=oKNI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fedb50ac466a65a406e65bbabb95141315ae22c1","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.20","@storybook/router":"6.3.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.20","@storybook/core-events":"6.3.0-alpha.20","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.20_1620309146495_0.2504489904403453","host":"s3://npm-registry-packages"}},"6.3.0-alpha.21":{"name":"@storybook/ui","version":"6.3.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.21","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9297547a73d83e5d78a7779efe894781da8b1d2e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.21.tgz","fileCount":296,"integrity":"sha512-xjQbyBXcOac21PW25EcqP5tY7hpiq3l3IUxX0dT4WSvw+ce63XaQITMIHDkXfcvJS68wV2PGPz6/eI0g83er7g==","signatures":[{"sig":"MEUCIQDsG/pXn+jLR+JxWrlP/Na3wJ7le913RTstsNb2BCFALgIgbxiaCjpSxbuifaVxzV8fiQJUDJcDodk05H4RHfRf/gU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglNhoCRA9TVsSAnZWagAAfOwP/iauFBYw/tiFnt61H+fR\n3Kx/fy9vLmizjNIkaurgmnqQLFmDtVoQVWGj2aQ6f4XvwcB91nm+4I0iqr5o\nAVTlwbarY58q76lMP2JpbIM43BZw/q64dHIX3xo96HYRcaCHhXyyeWxEGO7z\nqA+36yCG5Lzpdc9TPnJCPjkHF8zuRxFaRJNGuF9P8Jor/2EyXdScPHJ/2t2q\nrgIrmLjQgFJd3G4l88D6UC9Q48okxaNut7zYxuAyXePNYaynnuxNPn6aLXEH\nPQQk4ypjgNlUqYRNdO47VXim0nnMxRPJGJKxSUZa4SZOYG6PlVJMermDvsMf\nt6WBrK6PafBxvS0yHNdrkiS+2mckWOucCrjI6TaYrossMBMIK9tbfgEj1+RW\niI6UkZOAV93L7O/SfkCNOZgFmDg3wOdoKQpMukqhcQabBe5np9qtEPG59CSJ\nPdfkoaf/4iMnbuTI3fEDkRQ3g7oCCmEGawyvZqbGe1bAfg0s6iIYwAGl0Fy2\n99Bee2JPCYb0gX9iKFAZf3+WWa1noIakgThAAoTvwHiPnuYPHfQZOIrajGVQ\n++ebWnxwepMhQIIspmMd2YBF+qpGGbseWXeyZu4aMOE4ztafL86VFUl/zE5I\nHlTFYGEjqJ2xUX7ziriM2QmGqiGcMlyeELLwlzAG3UuvaQz64FgXmy/3QnhJ\ngL+y\r\n=eN5R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c3ffd75d5ae104f678f2f0bea2042b017373aa4a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.21","@storybook/router":"6.3.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.21","@storybook/core-events":"6.3.0-alpha.21","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.21_1620367464243_0.7941617831979735","host":"s3://npm-registry-packages"}},"6.3.0-alpha.22":{"name":"@storybook/ui","version":"6.3.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.22","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"620afa68926ce1635adecb4b7a09412bc2fcd832","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.22.tgz","fileCount":296,"integrity":"sha512-k2wnu4CiFiKmW2qE6euoA+oEcdqwxZnKQAEBRgQQjq68LsHjP6IILe+VjTIrVgOp1mgfcXv1iOzYD/tRyYFKeg==","signatures":[{"sig":"MEQCIEx+HEkCJMLeZdNIJALvBCEcTovg2BZVZhMnQdXSuVf1AiBvgZ3Z1eCz+42HLfSVWkHhIHpkw/MUfIvnY/DlbsMGtw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2580337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmTqFCRA9TVsSAnZWagAAocgP/2p43lpkZSYe9M5GlsQU\nDcuU62YG4DtJKUXPEc2xcUboQUIr+JuHe8raolLdsAfmlfIAj0GaGMhVUVQz\nI6w0+X2E5f3YIUGuuJWM7ZhDZiMNCaP3bPy+WsS7fcTx6IgMifrSvm+EjhhO\nAOXulwHx8zp/VwXqIUwZBgd0UAyjl4rxoqOirLqaDBdDy/FxpTFo6i933ovd\nZwYAi7Z76OpDHC5bVKsQ/60nECOZc49eyslid4Po4n7HTF/lNimw2nxj3gDN\n7dhYHAKzY7RrxnlGoXZwY18Fr3KjBF4RG+s5rgfmRci3/IF2KOGgns6uLnRE\nOXitp/GtLy5YZwElp9NMsda5Hq8Y98cNBj/e4lYLKnsvL+cREWe/YrE2ZIA+\nsQmSzQEU2khAX5uN/ODP3Uk8uLOzN/20HTX25RLzt99IbRboY7GtDxm4t/OV\nxphZLLyGxTv8yQBD/vEQB9gmyt1pGjWyQGDEVte9YLNqWKepoBaBvHyA99dA\nY6g/UiI//Q55pOkcezZh3yadt3aikusyWQkiMuNl5V2tyjOZXZGYtqMQACus\noE7r1p5lQrZ8PXEIIS+tMSKKwjzlgxWGXQsi5VNxElellu3diyZIUcpEApzk\n4Ik4JbvNpelh9klFE1f6Fs3hdXqmGDG2puOkp/jbL7ml0isAHnq3hA1lrX9J\nED+R\r\n=Z/Qa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5c8a5090dafa0cc1d8d66067c6ed6af73806aa5c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.22","@storybook/router":"6.3.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.22","@storybook/core-events":"6.3.0-alpha.22","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.22_1620654725561_0.6020133892874091","host":"s3://npm-registry-packages"}},"6.3.0-alpha.23":{"name":"@storybook/ui","version":"6.3.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.23","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2bfaf915d2a402c94ac41d594db44d5726f9ba75","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.23.tgz","fileCount":296,"integrity":"sha512-ZmTf6tBpJKXp6FvUjqdH938oZeipo7Utjde94CKLkUdQh0LUq7Enak+R5m5mfnu200vVB6xz75S5zqFerXYzlA==","signatures":[{"sig":"MEUCIDWV++jZIXszwuNX43l4vUFzmjxKGkjeS3PwM3SjtylJAiEA9fBXlrMA1Hpu6z9zoAaOOYzmSC2KbtmFFRiWdy37b28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2581343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmiSDCRA9TVsSAnZWagAAZDMP/idoRa5vXDV1In4EgfPi\nXzAUm4s3KeiZPWDF+zGfoOs4M5fWD+FqQnVOyqxXdNZfyKyKYHxiZe9POsQS\nKA+3AeGwL+xIJTyIEzzHL9zPIMZ7m0R5fQVbYCDTMstKz57DXNGaW7vWPuIM\n65IdBszwKzADO2I9fCa7Nc/K5jWHN2JUp+EIVTYrz2HAKcMDEynK58WTPS6G\nhkuAjsj/9PQc0mGkMS11pOItmsQetmSqKUEaj1k45+qSr/vR8mNTnbXty7wH\nBCNLhd9ucpTGWGT84hofgfrPA/2SBSghg87yEutsLppCwbP5Ju1icIfLxLqL\nOqP4UpJM9lo+mBqbzft9CRzc72TiVA69g9rlpnaD+RsoqTGCaOScfpcB/+eI\neALWveqwaNTda3v6PDW6wNv3jQNlw7to4L6p68rpqnshHqZseOvasTI9LsBo\ndDGyuaXDgsffW/E5pTarmhI44F4p0n41I7pzqjH/m8+px8nadezwoTZel1eT\ne1LWmsy+wpeG09M+1V9mqPtaTwHS9/uE+j29HpoYyjTFiiRE7b94A3TCHS7y\nRJp1QaK/8Vkgxx7SLwZYN+2tyYtfmB85/YcSHAdw9sBp2ViIRaUjNvbHxck8\ntWMxmcZ7jxaF58Rcqcyhmd5AQQFblBe6e56C3WoPwGyOUMnDBuWV3ZYG55/B\nbFow\r\n=7NBA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a3d63d6a3fe28b6e3577ba9e50370a0d14ceca7e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.23","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.23","@storybook/router":"6.3.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.23","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.23","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.23","@storybook/core-events":"6.3.0-alpha.23","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.23_1620714627001_0.6690394578991086","host":"s3://npm-registry-packages"}},"6.3.0-alpha.24":{"name":"@storybook/ui","version":"6.3.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.24","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0332c84cfdeccec4dd25bdeba332938b83f76204","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.24.tgz","fileCount":296,"integrity":"sha512-D9m+YlNxMwkDsepk6CMeJytvB49LTqcg8RO66TDylrv/Uqgm9CjaGPF+wTUQW3CY1tmwSXVG/bFRfLq5LpW7hA==","signatures":[{"sig":"MEUCIDTvOfpNy9o5IEaS7k1MHL1Ksxggt0VYVzcNiIk6gf2bAiEA6mHK04XRuBTloyNrS/kSskwyMVOL16JCli6/tG7+E9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2582038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmjiTCRA9TVsSAnZWagAA3EQQAJ445ehcneq5BSPHa0YQ\nfol9/6Jvw+DPxY/QZBLZXcWAhBZ93N7D1B+stnEufi6pP/D+pEH23LncAs3r\nb/Oxw7hpXnSqFKHkDEmPHWhJTSlYWznq/i3i9VBEG3LWNxV5wsskuBabCiyl\n/JXBa+3RC9nmceFNwllTTvne529kspDHd+xmznMllH/5pSQZEW2ux17U4SXL\n+REgscaVCcKEJoOIB9owD/sqyqikcDL6mAwq+RJ/teXSaTEuoASZ6o5kKDyG\n2r8FbHeWj3yd15Dqy0rQxpUK1s/jXoTArlxKtXt8LRvZUafMhEwzFXSn9jyo\ndZn8TIrqac3s2u739Gc+epqjj93j64RHiME8RVEtEHxnMNQnNscX6rEZp0e4\n6D2G9zFaylj0o0em3tMTArnfs4p60QzXMAoFqhKIMJH9VTIs1mA+ZSQ5vih8\nAVP1mQUiFBcU4e5BlA7cBTfyvd6zUhAol3HInPs2gP65DJHsypwL3FNI6KfT\nBF8s+tYwAwq3fVjIz7HYeItHsXkZ2D9tdNL6OQn/ERFLBKzACMI1bfrmOLUf\n9X85Q5mznZ2IWPoCrexuDgzzJzEfnkMVDt2U6bXFBVw7zMLeIhgLUdP5vMsO\nuinLGewudDtZdYPajI5AewaLpeZgQ0UNGxdHogu+h3R9Qjlqd2trTucRoe7g\ny9zD\r\n=O+0l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a8870128bc9684f9b54083decbd10664bf26bcc4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.24","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.24","@storybook/router":"6.3.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.24","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.24","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.24","@storybook/core-events":"6.3.0-alpha.24","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.24_1620719762519_0.45755361015968155","host":"s3://npm-registry-packages"}},"6.3.0-alpha.25":{"name":"@storybook/ui","version":"6.3.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.25","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"06c4f914390c228bb46ac1ccfab8049a56c901c6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.25.tgz","fileCount":296,"integrity":"sha512-dWPn/Mw7EC88BYhEBB1hQ1PqymypODTfBByK/+HBn/9G95fSJy36x48g/Nek1iSdbUYFwEDPwj8xohq2wn08UQ==","signatures":[{"sig":"MEUCIQCFKMN5uBXK2Ii7bwvYFI6DI/eDYkLm1l+Z6W3QIlkWfwIgX7uYTHkm8HqBC9It9BdHNv5qAMCc1YIdAOwUa/V7oTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2582038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnLHJCRA9TVsSAnZWagAA4tMP/21j2bMRCpyrJyowR9ee\n46k9D3tTuX82U8fwAwmaY4I1bc9v7zndPfiPUiVo59j4+ZdyoJ5cA8o0enm1\nmcCk2WjRNeLiEYGEMvrgfLTCwM89SvzOdR94ZgknJbeSmIoKl1BkBmWY+4ZJ\nB76Sej2kovK/FKU5TJ+mMQmvXyuoKebMFKccQ7jA5Lx8+W4VXXjD+UzbtiAW\nDTeV6GNQUDgV+GGnbkQr3Eo353NozeZD6zmAc9EHa0Y1f3ZKHCIvqkPIIRSX\nzZ+jLZCLVHMqVMT/QCDgWFoSHzieT7Yk07nLckkjz/YFENcwoayLOQ6GQuLC\nzqEK2yq3/auZBnV07WvfWF7hr57CYu0wqi1ro9MztQH9eUdNs1t/GDDpW/LA\naD9et9GGRAlx3vI+n8Ly74ILjoJW7KSMcpQPnUmWvCbAghJdx+F1sTsUWKOF\n3MG2IFFgMxYwNiFDif8WaqKm3tJY/IwOqZPyzIPjFzyc1iF2bTDZM7elJdyE\nGgGtvxKNv835zAyCL9254VxAsRK15kE5TxhB48oZbUgaE3QJi0W4emhXu4KW\ncEkaed6aI4kbfUhDuJumWI/ntNbXQXPtmbDE1rcDAnc356f5fZvMBQtLmQdK\n3IdB7AtHuCD3m3lkB1kV6bw3wWieOVACQt+ipMjGmrkFBHDpTg3/OTXAS6aL\n0k03\r\n=jywv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9938e2194b1efab97c1b93c3c7961a793de4f4e4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.25","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.25","@storybook/router":"6.3.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.25","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.25","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.25","@storybook/core-events":"6.3.0-alpha.25","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.25_1620881864932_0.1857602353343999","host":"s3://npm-registry-packages"}},"6.3.0-alpha.26":{"name":"@storybook/ui","version":"6.3.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.26","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a5b177f2979c3a4624b46fb6adf25ef9f47cc68c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.26.tgz","fileCount":296,"integrity":"sha512-vnlDtdpTARWL9tsNgOkrq51AqnUKAA6RxmtibYoPAxD0zBCDRnWbwTYDmU+/m5NGu7x36SxK4H+ZU0MYsqWAaQ==","signatures":[{"sig":"MEUCIQCn2KXRCEu/agN2Ix8cCAZ69isGA85nXJf3lRUKxN7z3gIgMWYrJ4Td1DsYjMsDrUlv5NSxXJO962pWszKilRVVpRM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2582038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgneflCRA9TVsSAnZWagAAAeUP+QHwXULe9FoD0yLUUu73\nE1UezU4oEZU80ciQX21Ciwi/mpKm0EPLzXT/A9w/MTxl4cVn7++nX1o7Scl4\nYkCxwwsOWxZvy8pjKnDE7980ztoisoqkYz3mOCp6nAZ423gUjoJyMkRjvXs2\nmVZvBEiJ9HhnLEeYKcHeL0uzZvUUNlxCvEko0bbdwqvqYfLLbE6ucfs18W7U\n76m6MphsoIFYKunvrSGj5NndMH06OXyLH03v64LWCLVYtqPAkYCcCkn9KTgf\nnQ44qHU0qoXPWLEW6Xw/yuIpgFA32uQV3uVmnCqYasVcAKIXStM216zoU5Wg\nT6exlt49fJTB9lA28uFmggKk7tKR128APs43PDF8oag/Wq9RgjLQffIuhb4+\nXuUBiz/oPVLYkya2aWrzuBqVu3IsMIXBHTHzxNEZYupXYK50wOlDVW2ZsW4b\ni61dKa6gSBGLj6Nhjv3fWLHlk2RtXCET04h+Pn5bGcH3p/I8PO2uvBePNttU\nVdZmuZsnbqCt5QqW06kccmOVdTBorNWeZ4TiM3zWV2jpFKuJFajEqpQ8dtyI\nW+i9Dnfwm7C2OJCO6jjdij52IkrtxQ8uE3fi5bDoOZsbIA3qXtZg6d5HrJVW\nGqq1dwVTNSzBkQRr3q1t6mOPtsJOoxDOTxX+QpQtXR18H4wLX/TUV6VpdbKt\nkUE9\r\n=ir7o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"10b42ef0cd54ad9a248287d6ffc9d5d92f5eb733","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.26","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.26","@storybook/router":"6.3.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.26","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.26","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.26","@storybook/core-events":"6.3.0-alpha.26","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.26_1620961252567_0.7028913516913284","host":"s3://npm-registry-packages"}},"6.3.0-alpha.27":{"name":"@storybook/ui","version":"6.3.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.27","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1c642849b96bb4aa5cdbb9f6d7c4a4912f8ee5ba","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.27.tgz","fileCount":296,"integrity":"sha512-MfFOVL/AjNHE4PdB4SL8Wpb89rPw71yFF5Ep0sEfKvrf/VfS3zs2um/n9YxRgxJcWPEDhAjnGyUlObHYFVEVKw==","signatures":[{"sig":"MEQCIDYJGlEwhNEQtvsuC45otwAjWM8ZlrolmZB+39S5oBqyAiBJJ+6C4WV9eRdBcXs6sJ/wAw988H2axsJTIg4k2JPL+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2582038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnkZ2CRA9TVsSAnZWagAARUkP/jWzUgwtS9U5BSGO8jPl\nXz2wFjiIQHeIxp0D/dSj0/ekk7qFt4uBmQ+bSoheChkhx6Ye7b8KoBG2xFOd\nnTvfhoDR8XfnpVlgTx1WhdsMWk1Hpsu3f1XoaoDwvfihH51WoUXwmZJXPuvX\nCpMQ6BDGs5JDvaDxSBUn3ijeBNyyzaKuPkr+9RgNvD8UJ0zrCa/2Qx07lfym\nw91bG8o97SLlW31+57t5KVhQHG0684qPfOiomfB6hhqmA7ki8idZ7hYYh1MZ\nRPhDD0AmOn8yQQKhn39foQTAaPwF6Wwq6seRvGUNkxF4zIRnnhIaetJxuB+f\nnDqwza8TQkUUa0Ws3hMJkz+/scv/40CXP+r4fLXUm4PJcep4LXnlqH2c37+c\naBdqc1WHoYfekVMMVcw1SKLf5q3qMCO36dHXd4Pb92kSvwgXN8W0w4tXnMdb\npQ+TnjyBHNf+TY/Pb6M2DXMxKEwRRzYk59+aAiuK7NmRIbwM9nBiEORiIHZQ\nR9GfFazLCXbn3o2XuzFezAP8JFs+FhNu9gfF/S9xBNOgbgNrBGnfqsssPjyy\nFE8p44942Vwos+hbMejq0Nus9l0Ioagbb7Gf4ge0rGhYLM3XYbRKk/9usJWs\nrxaluetZOMwISrbfaIJHfnid/cxw30mqGNiMcANGIJQ7ewXCgFQuPhE1MM+3\nWF1l\r\n=S3i9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c48862959a2c0ba676deaf0b01ded9183d88b94a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.27","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.27","@storybook/router":"6.3.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.27","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.27","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.27","@storybook/core-events":"6.3.0-alpha.27","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.27"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.27_1620985461981_0.7248962095615417","host":"s3://npm-registry-packages"}},"6.3.0-alpha.28":{"name":"@storybook/ui","version":"6.3.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.28","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"50b1418f731853653a83142ec5d246261a6da36d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.28.tgz","fileCount":296,"integrity":"sha512-aVGhfIOkrvGBddar8jhLPdqbZNoJVzebr3Xjgtbxi6sZ53KrxyYiOqAJYCmfWsNm6pROSjvk7KYBhWGS1WY2Gg==","signatures":[{"sig":"MEQCIGgri29o/x2SYJSMa29TY6mcLLYtEq/j1QiauEd8J08jAiA5RLiP0Li3rYHZBQuyVIaLj32MtqsRS6+UoltXBtUlwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2582038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnxqOCRA9TVsSAnZWagAANEoP/imt42sdeuS8waCB6sMs\nIpJTHGlMF53Nld/Wg5YOmhCqgV1iXoYd2XcqLO4KbgAwxrM6t8aCW/RHGExr\nF9ziaBuxY6ZeMOmBgEoEGxRYrp97O2Kyb8AF1NIQDPKsSNQFvKPBMvThymWb\nKR8X+oLx6ngVtKvFXt1LRF51R/ILEA+SJohKwEEH6j5eRMcCpjuqxhnkwewG\ndq78TqiqKIGMZKlX7xDvYbwrCvRqRhrbFHZfLJvgQ9UiLHf45tZTvmkap2tm\n6FEuD+Zchf3kLEoXcwe94+w3bRAK+aUqSpwXymKzQXC5fo4Kyyhr+ZLQ3d54\nuCS3HGj0a+tw74GhvlrN0Q7Yboz0ZIFzduZA+VJcYXRHHnut4Lnw8GMNL/vm\nofQA20pQ92lEVTXLtOZy5V5ey81o93Yh6uYUhke6ZdI8KFR+gg/ZcTKhXwLR\nOBJla/EVSY4IdAIBloQoRRpNrSEakSz9C23qAzj2h6lbKRIG72Q2IfLCMpiM\nlzzQ6V4FWYk+FgKjYAkM82CqEha8B2RnjZtdF7gSlv+Ld+1NBFZaNF8PcH+A\n8BY16OtjsVJpowhw67XkYyhMFTYq2dl7nYSE5hOkVohY1vkMRJK33pEcJJFA\nBNmDuebUl27b7X6ejS6mVgoZp7OhiMew06TUNtd16LY21cpryUAyvjXY9TLD\noZHh\r\n=e4ke\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2f7423e38558228c3b5b09a3afc5047ac3523241","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.28","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.28","@storybook/router":"6.3.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.28","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.28","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.28","@storybook/core-events":"6.3.0-alpha.28","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.28_1621039758034_0.789677177638495","host":"s3://npm-registry-packages"}},"6.3.0-alpha.29":{"name":"@storybook/ui","version":"6.3.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.29","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"36f259768cf8cbb61e2615b2dbf17a4469baeb96","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.29.tgz","fileCount":382,"integrity":"sha512-v4Xa3nyoy/o7yD4MOUg2tkk5sD+pWBotbQxytd4iCNWHHIxs6wx2pXtdOTduHqaAOt1922suvfpGed0UHYBjUw==","signatures":[{"sig":"MEUCIQD94uceI/m6fDXgwbfcL6YhBsfup8EJ+zjoWUkWiN897AIgMOPkOA80gP50o34OxmnDKUfv0Os+hJZTNOqhObx7A4c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgooS+CRA9TVsSAnZWagAA8SQP/1mQYR1DIipQ5ZdzKWgA\nvYi1ffMofq2yVMkOXYNG9MENg1PosjeAP3TF025XO5+bH4bvlQVETJi45DOH\n8abkOstuVY05nWpAxnpb16ufbepiOpS8vtEwaebRHHDY9k+jMrQpS26bNS3f\nMehVRiM1R7aTVHEheAue/Npm/A+1nPtk7qm6dPqj4RtbuEA8kqm+/tixzS3W\nW4or04icJs3/6yiuSMz+YVyZMq2WZ9ImnIhvjrbWuGKZDkH31K3gzweZErSN\n9rPTAjzU+bGwAYfmxeq0lRKeU0ZhvTlaa49rbPj+QKVjHXdI1M80ETeSP1lg\nzDNs/d0itbre+A7uHKsZC5pYEkE4CRt9CrhH2oBNVdy8PXeY3cm40JqOE4+W\nmepSb3j3CDpEw0dJwhcgoDWn31lnLEzsFdU1O/IKvnPFRs/f85jNBmT/YtAV\nANJFNbP8TqsETBsyJTNE+nLFjJrb1lkCRZ8WWXdO8Cp01NgVgI9bgvxggwhY\n6KEDY44V5lQMlrXXqSnV6M1aWxPwUoU22dxvgyc1Ott8u9c5G2nSThzQHrhf\nuTIy9a37+cB9ykgq0HByGWQuFmcyhsIjJ5dJiHxlzQ91oQC1u1XkbGr3kVri\nDU0k1mPQ/AsIu5I6rPu+TIVIz3QMEUkDI4X6WFXYp+w3YGDIeiWDFQHW00Ff\ndLwt\r\n=p/La\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"db7aa5aecbcbbfdd5d6956bc88774dbfecf73217","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.29","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.29","@storybook/router":"6.3.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.29","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.29","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.29","@storybook/core-events":"6.3.0-alpha.29","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.29_1621263549703_0.24971940131638437","host":"s3://npm-registry-packages"}},"6.3.0-alpha.30":{"name":"@storybook/ui","version":"6.3.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.30","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9119721d04ccf0ea96f02ad7262de88f04dc083d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.30.tgz","fileCount":382,"integrity":"sha512-w9re3s/UDKIV3FeS3loCblATX6BUfZYGTQc440Dx+GRxCEx1FqwEKt9H1OJHopwGxV80zsO+jnKDkqJbWQVulw==","signatures":[{"sig":"MEQCIEJQtIkhBAgWUWyix3DKaySNP4hzLBLAq5pJ0cAXg8K9AiAEYcI38wrrfU8n8hiITSYzUnXfPGhYA2BPT47Y2x79Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoz0yCRA9TVsSAnZWagAAz3gP/jWkPDojYtaPIZ++jzuO\n9cmQ4tC5+bbd/u2sz0+SoVlE1dG6kJkuvupwNhZAXOw0vMlgLWUKkA9Rj8TS\nnRUrt3RpmtjLFqvcjFSo0ThUiI8CuUCIHWSw6qVqQPWbWMWBwUH46wo91gno\nMDWKYMSb8O67A9gcHabsnzWm5i/rA3AtuLEybpK61fRVMx5v8bY1RaWchdZt\n4YTHxzLBSJqlj42/2PNDBKn/J7xEt4bykZ9lu3IDIHvNRKk4dRMwCGc5/pr0\ng8NxP37aG5+tkbMZVaySXwOejWVhCH4GkHSeTcrn3ffXcXeHVkuPxczNoDyf\nAyDqL/oYd0Axk2tIf6Z5uqvo72GqjpY00E3K4o+wW3v26vEBpvdG3vfgT6uc\nneMCEm1+svPqJxlgRihvvAX2rgmpfNKcyI7zJ4S20jsnK9tkScqOUwqwuXpG\nDql2YXiGL0jyCiKbtQuqku/sLYjqjXu9pu9Kxq7RBuoehnPvovQmpabyzEak\nb7SofU3uKLfzegyODmGCiZkRd/n3teXcd9o6l5PBFAB0jLt45Rn6AtPpYDeJ\nKSzErFTVRzTkNdow2258DDEqO5XpMIaPQaC+iM6qMVGGu6inBvUh8LzJej1Q\nmn2INUlqqD8KMBYmxi3jqTat2cNEmc9bQxJxRj9VCymIOM3Yx1f1kjaBl+bZ\nEHKp\r\n=Q/O/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"eec56a5d9365e214f050a25daaf87520486015bb","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.30","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.30","@storybook/router":"6.3.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.30","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.30","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.30","@storybook/core-events":"6.3.0-alpha.30","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.30_1621310769687_0.4556635931895243","host":"s3://npm-registry-packages"}},"6.3.0-alpha.31":{"name":"@storybook/ui","version":"6.3.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.31","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5e3696f025c41c01c3296aae8940dfda270164c1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.31.tgz","fileCount":382,"integrity":"sha512-lQIT5cP2qc3VPI0MN3o+GYGP6H7BQbx5urFNtv9+DtVwUQWp54NJiEActVh7dIuFeA1wxcxdAuATPysZOXAN7A==","signatures":[{"sig":"MEQCIBq4mHcIAdVKm9U4E7LCLmrWKseGyOOSHPzuFQMUPneqAiA16FhHdnynimrB/NP4deLlhZIGh6HShf/k2AUj9bcWYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgo2tJCRA9TVsSAnZWagAAWIAP/1/4rsLZjzChYJ4FMjEJ\nnkJA3fNOghZWwTcUyxiiOQK9h8IcKHb2V/WqEsEPqOuEvegKxvPC5FIzbQNd\nwcmnn9hUvO1VFQH5UMydudBZ951A4TEOlRG3qfrSPrxmhqQ6/95xMOthJD72\ndvj+8Z7E8kwud2CLVkQ5D8mGOuVZlhGbyVkoCBMR43xekGL4ifHI1uETSRj5\nxzimWAhylwYhv/k9fqIED2SWR3Kxzi5CGPHYxkzVC6HtNbQUmmvcWUqShG32\n4amUHsDadq5vSzBTqQv7hXTIz+PrBiHIiMSSpYLGuPrI7XBS+8EZ99EEYqLr\nsEaSHWJZPE3IcXOVNO2g0UKXsNDj4i86018kYtLksgH2NDUtTpKLKyqHbciG\n+6QpDmBpehsymOmvtPTwhYx7mY/dnwFSfcFg3tBHMW3yZlkJpnh0hufegTiE\n831/t2MfsfzxRARKSfdJDYP6rAWUic66qdAqUCa1MiAoba/d4JLCsjlwi70b\n49sGBb1FcY1+5DzWEtihTDSUaCfzNrSY89u0n5CMlDZKbY3HFF27/fvn0ZOT\nZyahyibnVXjHxhmql3DqC4oAN6ACQTwQwB7WyYZQEzlXBGu2ZSBm83x5UQeL\nHbRxdrNaVIJ4DVnyHrMyRFHMl0AJKngQYbgpLSHKo8tyxUDI1ISHY6XBRBD6\nmYAF\r\n=tPnp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7c52ccd131b1a182d5d87ff416ac9598797af0fa","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.31","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.31","@storybook/router":"6.3.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.31","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.31","@storybook/core-events":"6.3.0-alpha.31","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.31_1621322569272_0.4317486099907595","host":"s3://npm-registry-packages"}},"6.3.0-alpha.33":{"name":"@storybook/ui","version":"6.3.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.33","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"364cd26969e0fece74aed47a5a3841f7465aa516","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.33.tgz","fileCount":382,"integrity":"sha512-Ocuvkqo5VMrJcMJs0qzL4TcO9B9/UbP1SCpypgqdHWLPxCORy2pGjtMUozU9uPiD81drn6wdLMyP/lcPeLUWdg==","signatures":[{"sig":"MEYCIQCByCLJF+KXQoOj/TevZJMpVmfHPAmqgtR73AUABPFPegIhAJt22UfqOiJf89rcLGjNwGOHnDCZMRNJYNQ+HviVhMoS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgo6KKCRA9TVsSAnZWagAA0b4P/2ZfQkK276Zqh98CdhHQ\n95jEvbcrt2vIuo0+lvqsCY9a08LkniobaNbinsqXdAZqh7ImeNqQ0ZtGrMdO\nBEQhR0/KRYyDs0ZS9YCseCD391kFYA0HvZKBVkqs7hywGhf89KcpJ/Ujw6rk\n+evFBetQ5/rC+1ORxfY0s6yRxS8ItXgKqAHoMWpTqdyNCjaB3sL1iSTbAb0a\nkZ+Pp9cUHqzXF397Ogdpt27ZYK8/koWCgS7mZtBnq9Fumnx4/y3QqwPB925z\ngqw7Gf9RKNewqmP9kZ+U/QGckAqHd56yu/45XxEGLVNV6WcK7zkfWnD+xDWa\nYBnxwTxa+ItLFTL9g89JeD+kr9tjJ94D2eDfSWzntpD5uUodtk/fCemk5rgW\nTsRFXygmFeSzkMHAMn5YwWxn6ONwBRDHa+FXguE6eEUFBAtHqVDD4Q9k1H1C\nmdGeFf6O0UmDco8/b8GNPIiTeBQKcjsXl1goAbvDCGto1QA3pF5EGev53FfO\nfTT2XqcqwVPpNOa7Qi3gNR8oHcYgw3IltuRTctNoCHHEPst3XAEdou7KCTY3\n1YEj5XQW+IH+U+bHqH1A5Shdd6oD4d59HrxF/9QY08EILzA1iAoxIxvGiFKY\n2VkWj5ZgMcOhV3u3eqB8+KYSDCSGDWTwcr9MdeVfgk6aNWTyELIpD4I6JLMC\nqwf7\r\n=onNs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a70d3fa1577b078011ae1fe56f9acda0daa95ae7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.33","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.33","@storybook/router":"6.3.0-alpha.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.33","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.33","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.33","@storybook/core-events":"6.3.0-alpha.33","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.33_1621336714385_0.6708062417008627","host":"s3://npm-registry-packages"}},"6.3.0-alpha.34":{"name":"@storybook/ui","version":"6.3.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.34","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9443ca9134c59487199cca5ba4ed70daaa1e5a16","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.34.tgz","fileCount":382,"integrity":"sha512-thp6Bu5QVxyqd8BVUOroiVtbJqHILsZ19aI3DxtRFsd57DBnUew+gX7nofPAaI21b0ttdfpfNUQ3Rm6sPriPGw==","signatures":[{"sig":"MEUCIGl1RlQfesOWjEKkT2hunSUcFpBpoPuJ+KXD/cJNLzScAiEA1SPAHuqz5Ml7yHvKLsTJEqht2rqV4CIlmDQ3BEyN3Pg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpG2dCRA9TVsSAnZWagAA0WAP/0anJpZzaEHI1AQLaZOi\nu7CVB0gTIhi4Bt6DKUmZCb1dgfX+N/eeqfIld2aqCNj3qMTQ45I99nNHIHid\nS3DQjTrRrWMpEOHeDwl/TPfjF4uqj2C621zfMErLj8L+0abhHt9J4GR9rjwB\nvotrIgBC4xLDGXM55iS4uG4j8FC1gKvBzWVF+Dq/MkL22FHJjmSmYlvL3Xi/\nBt5TC/Q0Hvycn77V+uh5ZwsEg0AeRTjlCcYjTbn0FckvJgaEi23joWpirDps\nFiIdzg5tp3cxSKxt1clzAtMHnc8Bxf8k+8exefukIjQZ/8E92APJrtQ46YNd\nkHd740F5l4PCRgo5e6mn1ph7f6RUr8a6mPYNZqxSeEss6a3oudhEvb70XRph\nVcgpTIZVMC7iNTpbCnK0EUnoD4ekqskp8p3CLxq8M5GqgcNOt58VymXhBu3s\nley5ZH4Q+fVZFTyCY5hrE7pUE8BKq5Fr0E05mRjH/K1mELwAh6PL///ZAh0o\n2SUQUnV0sLvWfJIqZC8dvOaGw2Ubdywh3MIm4i/3bpMI4dpcfRFlw3JIMgNZ\nKEat+mm08fjodvqFC08rnGlsFECZIJ+GJW1rlRNkCBgnNocyScEcwX0IOgnh\nLAToBorqqc3101PZXAeDhn88jB9o1f27PILThzuiUwIfuHYF9GDFXm5yIZWy\nGSV/\r\n=gI8g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e88f5c202decc2e594d08266d41b2b561e0ceb42","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.34","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.34","@storybook/router":"6.3.0-alpha.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.34","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.34","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.34","@storybook/core-events":"6.3.0-alpha.34","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.34_1621388701241_0.32295877349141877","host":"s3://npm-registry-packages"}},"6.3.0-alpha.35":{"name":"@storybook/ui","version":"6.3.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.35","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"eb1e4b69273864ec3934e070831bd5a1503be5b0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.35.tgz","fileCount":382,"integrity":"sha512-mBU7ykGYUyCXq0ssQqqYJ30n83SFRePXxm5/eOniU8Xed/waFqdE5Fu4l3v4zpyR9IcjJQ2pT3uRebp6JXfqfg==","signatures":[{"sig":"MEYCIQCcMCfRV0hmkH9TuKp4pz4Xf5ENAt8prxzAcZnRCl6FswIhAPiZnv9nnPXFyiW1TKBjJ1jx3DCJmR2wGHnhB33iMryn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpj2HCRA9TVsSAnZWagAAXGUQAI1Qu7CnYTzvaz2Tcbv2\nL1f+joxYMyZYx3d+SQ/BOjp7A8NQzNlsAtS5MV6l8JBfMdi1UZzY8G3TL+Ff\nUU+uO05wZEZSQxvuEDWgysNLXkAHOkrtE3CcQRgkiik8bntUlIuaE2lCPapT\noynE8o8Zje5G/CJSQrtvqzY0aOJerkh3tyy9H/ZoyZi1sopLt0BX+w7osF1A\nvqGNnsq9+kK7lqP3BRnyCNGUzpyq2MRVbTbUkj9CgJ+p3O7k6pDebI8zbZKQ\n4LDv+dluKBfcQpGRv84x2jsLwONth7GnXGgBA51oYWyhzCbQ/udg/yiBT3Zd\nE/wQLuWFDg4bT5NP/9L1WxIxglLfHGjRQRC0zTlOBpJg11/2uOamHyEtK5bS\ntz7ETZ+YhKqPPhQIaNwVlqgTiJSW9WrmSCVJM/xiuw7vz5N2RXlhqNHVbZt+\nw69xOf7CaTJXKSy0Lwk2grWI4qazVvbzCZqbSAFmMxzmOskdfRi/cWN+CJeR\nW4VTld3FmlLEmGu1AM1M9yjAlpgcstfvx7HIsPRLNL4Iq8N7viH+hHTjB3Zl\nVEiiaGKlM0xNpZ1nsmcKYVcv1Wafnf4ybx5D/ax7k5Tu0emc2wkGHl76JJSx\nejOp3TbsaOsCrGJ/o303fCNU5wFQ3TDNbnNNsuLvFZTjM1kub91aiNQjJepl\nFMMK\r\n=0sZW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e1813c0ca106bb029a92cfe2755ed5d9cce0ce59","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.35","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.35","@storybook/router":"6.3.0-alpha.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.35","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.35","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.35","@storybook/core-events":"6.3.0-alpha.35","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.35_1621507462635_0.03943374453853776","host":"s3://npm-registry-packages"}},"6.3.0-alpha.36":{"name":"@storybook/ui","version":"6.3.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.36","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f2eb597049b31a7d51f16618189f9ef94669388","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.36.tgz","fileCount":382,"integrity":"sha512-6z9YkTwlvPnMIoUGGXNAKdcxzlCJnmoblEjjGDlxBYoWMbUL5MCUBirS/O6o39Q550pcclUKLum3gB6njrXJLQ==","signatures":[{"sig":"MEYCIQCVOXt9XmNjWvj0LyKv084/c+iwRZkpUTX0XxaaxGKoBQIhAINS2/Fq90d49mh/uKOspMglDgwIymb4+Wyd1+/G2zHo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpmPjCRA9TVsSAnZWagAAL+EP/2LbJCE5XIXmTRs3U/rX\nJp41O88PAosJYIg6HySPYfwgcz/Nhf63Og9/wyEWhiXDvB56WinB8eyNfhz0\nyYgCswB88S7o5SFtWTSo7zneSB9foiYhAQgzyoqEqnvjetglcEtIM/rzslQj\ncOCY2Ov1ULD5nBIHjp1WfiSlpr36jKADPjzSCTwUvbBHf0pHKR17Ap/YGrBH\nL39DduQtE75cPZvMjlBCCTXI0eNg0bPmACNdc5O2Xf520XObxPA0Rn3gCYX/\nj4KvWQ3/HpzwEiICnQ5WjENypN2SrYU5a7DMBhrFEviPJTTRf1VBxoWiryk5\nOb4fiE9VdFowIum9RyX/OtF7mXyIAgO+YlI8UbYOtrK1pJ0LX/4wO1nV0lQV\nA8DY5JBaKAPm/XMS17QeV8v0hM7jFSCDaDB/UxxhvEp7KtouO8C1qyH57jVp\ntexIZH3QlqDVdiTIreVR80cyJrtHoRsiJ9hsKZ0dNxSEI/ckJ2XB+Be5DjeE\n6DyrlqhK+YEJ2lbACaCrxM9hbIoKybVCBkOyy8PjU2n/yZDn5unis9e6obrT\nBhj9t1Ixeyme0QU5g1o4xvsz/dB7IwUK62Me8pF3EU5QsD+4W8qP8/FiI29r\nqKWZ3W6m1MOUznN5/MAqlS5F8Kkr3xWzTPW/jeIzGeIJTHx2JUnWqCD3CsJ8\n9PMD\r\n=rOuM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9f21c0e4dbd25594603101e108bede75b3d184c9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.36","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.36","@storybook/router":"6.3.0-alpha.36","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.36","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.36","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.36","@storybook/core-events":"6.3.0-alpha.36","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.36"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.36_1621517282880_0.8086230034805622","host":"s3://npm-registry-packages"}},"6.3.0-alpha.37":{"name":"@storybook/ui","version":"6.3.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.37","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"126b6db47e16ba8760e01695617e063835bdd321","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.37.tgz","fileCount":382,"integrity":"sha512-3jSPbpsWPcsIj4AsRB3AMJr/csrckoRMTpu+Oe/Hx0bWfvdgT8euRN/W4XyksaHSi11AO4lwnnp8tMjphP1gCw==","signatures":[{"sig":"MEQCIBXKFO+6JbgpTk/noMgLTnoiR4JCeYLWiIn9x5xtV52vAiB6acamrCW1RMk6+NGEb+7yh8yxZq3+rAdTWhPUp9EQ+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqcQWCRA9TVsSAnZWagAAMmMP/25QXa62sY6PrvaZIUxw\nncu+Ov9OcxN6jZDBUOGqo7GX0wz1q30mjOSjrJ55qmcBnwBvEHJJppQSXvcp\nDhbRHJJEDOpVxdqlL7griuRu/E6nugo0HmeiUlgWioHxAXL5w5aVWw6g+14g\n0nRE4kQ05bTF35SzrKnYE3OJqLDswFKwTksSCXeWJuICE7KGFuiCYE6eqJKV\nwhjEnbz6TH7Iw+Ch3YA9p3F6raz/pMMgieL8UKnis632uVGmTcJmWETX8LLq\nbS0IDDlyYBihXT5Y7m1lhiTKMd3PjUBVr2cHHKEvNZTrCKC6LGkjfa0HLBv5\njd5bw+dAs/YE2RKO5XGBI6N69tl7/pOLcz063LV0Z6Fxx81mm03cBKeCUdGZ\n/s8CtwL5t+RCpOQJhUWUoACazWYGLZLRZRdXJe9sMSMpWk99BS4VOdaU/6mQ\npbC31vtCeD8/xPElOOZDzoy6qh3jLESz7VnG+zgjj1OGqHx4SJpPNLvO3AY1\nEng/JrVmdxHJWrfX0/90WH+Myx8v/gktFmkq+RJZAae1hpWMJ3xTeqWulU4a\nG8UT26wo1uxfaeFD6ctJ94bS+poJelAbGTD8aqVO9Ivne9DsJN4tOHafKnF3\nyL256C5feN8Xmm3s90WwDwoF8qBuN6OVACYzLPg/bw6RWEBLGZ5wqvKR87H9\njwuX\r\n=gji5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"405aa675367b13603bde1ec10de05ec9ce1149bd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.37","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.37","@storybook/router":"6.3.0-alpha.37","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.37","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.37","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.37","@storybook/core-events":"6.3.0-alpha.37","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.37"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.37_1621738517119_0.12280281819551031","host":"s3://npm-registry-packages"}},"6.3.0-alpha.38":{"name":"@storybook/ui","version":"6.3.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.38","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8bd1daf67c16c8764a0a7cb30445e51fd332ae5f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.38.tgz","fileCount":382,"integrity":"sha512-c6S3ylRbjOciYLHK0I3WeXuI+mE2Ye7mC1dB+VsK/RpK3Ym0BlDfPi+xPlS5xjc2sZECEmMyPABxAjI/9iID3g==","signatures":[{"sig":"MEQCID4SVJAVr+u5a4k+JEP+Nz7xUyQq1V0Njl53ftHek6BhAiBE/W7n42rYMEV82qY0MDi9r+RhUqqIlVXd/JCmpiP7cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqcyvCRA9TVsSAnZWagAANOQQAJ/aK8tCsHslTEWJ6qkp\nAgC6zG2pLzavgYtTjIcZd8EmqalbLh15SzVmIMHOR3lffaJNaJ0suWRjP54a\nnbS4vHG12ErMfXeDk5D6Vd4LMvYo/VnfeO1QyQ74yaZ8Gd2cnEtb2bVlLAi0\nyz7kM/dtrw9i9gSPKaqdLIZaHZrcQRibyRGrs1pIXHMjJs6UNxv21buW8vNd\nXT2iD0CY5OZiaoatYJ6bKZ3A44EWyjdPgjvC1zPKlX4715xhsy6vevEWuA2D\nSDzW4kOPLv7Nd7WPQCODMpjTd4q/UYkWWqPjMkRdBCYSyiUcoo064TwNddtA\nkCWDrh8EDNLpDuJrxIJjGHvqpBoMQsoChQqt4XJcNR31grpLdOQBLXGdb5NS\nUPkiVzdvjNMhvsJPSZ18WiWJ6AILK4w0mHBb1hWWcHudnGjQV0PSk0PnP9E0\n7uNduU6B8n7MWOi25+Yj3ekuUuyFcttuxw2lzW16bN8eSe6pAr2GFTAY7SD9\nfLYBX20cnQxW3+vNjHac4DXIRs+L1yNsUfFg2uSoKxDgMVghABuQgvJasq57\nhQoghWVmRyY+dhhVakTio5sausIvpUMyzd8Dsbz7HhI5+SzStE4vGwOYvXxL\nj9g+vV/F0cywEWQ3r6DoGr1KU9aVALRnwrXCvxJR7sZIOcZ1HFg09+EtDatz\nU7jJ\r\n=yS0x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"362e4d37c2e68040ea1385b2da060d2ece62a9bf","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.38","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.38","@storybook/router":"6.3.0-alpha.38","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.38","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.38","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.38","@storybook/core-events":"6.3.0-alpha.38","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.38"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.38_1621740719428_0.15720575016852223","host":"s3://npm-registry-packages"}},"6.3.0-alpha.39":{"name":"@storybook/ui","version":"6.3.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.39","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c3bd31731aa391c95592376383f4274da953fb9e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.39.tgz","fileCount":382,"integrity":"sha512-YH3ZbzswcW/L/JIcwConiJOZsvlE32XJ/Yf48skCDORI0YvD+u3zWYt7jQ2azqIvr2ovOfMkahwqsx9nxTHINw==","signatures":[{"sig":"MEQCIDE4cnsbmxpXZ3qAeS7GWW7Q5ArilzSzVJFAM/JSGpK2AiB8k96kWVFbvqWGJiaUQU/Sg0Vd/ubg6NcMl1EP1nGebQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqmAWCRA9TVsSAnZWagAAtTkP/1u6uc3jyv03FwHjm+55\nrsWNO2Q53XKpC38HCGe2suixmgcU7ZE7zfSVtR8/7wL1iI6tft2zF262ZKW5\n4aaSFbbge+70uVCuEEBVOaMVFrPttRelx5rYfikkEuxoEwh1YcORaxQ5CT23\nvLzXcquADxB2SKgbQ0x+LR0uCv8gB800FaZRWx/Bl/uUuq7/RgnlVuQVSNbl\n0zPz5mjS/zyfIgz1/PRAmX3ZmwM/N+eyzz79Kxm9CdLRPpjgrKDID7CRWACP\nEM09ZzyuzPBTvVPhvRJnh8mTqF1P86ayjmPYtDfWTAN6QAwpfmPNNsgtV8QP\nKz8sIwBOzwMErMiUhHP1HytS89g09ix0m58ySFwqu95OiRqm5d6yUA7KAFx3\nh/j1poE+8KQhMxqKqTTiAIgehNDG7KMJ0H8YrzNotaTwib1pnf8DElUwuf7p\nt+K0zmkxYlvyPbi7CCofe2SS2kqzKgCWQI+plHGvSqjVkQqTwxKpCdgRA0P7\nmqt1BC0qXRQIwk1E9CqUMZGfIK1jE7ieyFVaXEunbZZWFrGntgYy0QCAVSrm\nnHQ4dJ5JdzDsnsRODiOp/+p4GJ3ocnf38GfFay1zgadXC/jlKTdxzFaa2e9f\niDIoMIh62KSP1C5wReKrKLRxO+5Runzlit0s9LGPVJhf2+m3dqhqs8hQTKDD\nFq3I\r\n=sPp3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"eb1fe7eb6be8e8b255514c47ec617a96f4fa7342","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.39","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.39","@storybook/router":"6.3.0-alpha.39","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.39","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.39","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.39","@storybook/core-events":"6.3.0-alpha.39","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.39"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.39_1621778454243_0.6254399844829579","host":"s3://npm-registry-packages"}},"6.3.0-alpha.41":{"name":"@storybook/ui","version":"6.3.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.41","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a86aeaab9f48e2b52a1cb987b6b880d77b59a14d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.41.tgz","fileCount":382,"integrity":"sha512-p/29x6z86Nlr6RlM2wPdtos8Vu5fd/NoFTrbVmlaeRbbAkRCQ5JOqlt4IY+pbXcaanTVcrAUtSiWkfyavQIE4A==","signatures":[{"sig":"MEUCIBjAxCMzszp/f8R04Ej5n9cssIhM0ssFNabeJ3boINf1AiEAuf+mO6IP2whOGYEaBNDnQOaK9cWag7px1Rl1g7VnkVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq02qCRA9TVsSAnZWagAAQbAQAJcK6yFjUihhgXZIb7br\nj7MC0vEx2cKi3eEZoJiMpITVWckSjKWiZkAmVPjFc0fUYEYJr0tqcc7DvHV9\n495xL9SNHsFSqkCB7xlskYpaCrMjTJnhOip3szSsm+detpIK7CunD/zOTYdS\nvwsAuu9MP63TMDp7WU9LyqWDc34u4sJ0iWLJvbzVY0nQPFzAgahQMl3zOwiO\nxhsE5weoR8PKVWEgpZCeY99zrJ+vFlBID+HN+0cBCxCT0gpYPh6DdlNN8/hi\nY70/JX9E8LLoGN4HbyVzVoktx+z6/LVUrtA6Z5wVhxBqWshubZeFn7U2FNfp\n1HVcrId/0PvbPpNKGtySZleuIwSGYdgUM73SYBUbZ5wYC0Wg/R2+mJ5G/W6J\n8yjxrrqB5MaHIS1bjdldLR0CP7SojzUrA8mqaFRwa5c9z3Y7TtoAuYfPhm7n\nb1gJai6g9qW7vXJi62rr7Z/Uz8rC3YWvZa3lFvfpJWDFJAl39NszrlSD/KBg\nIqpiJZDv9oXHBjGmIO7VukAZdC299EsInz5t0V+WBvK4QyZXDoUm4nRU/Yp7\nnMl4PhZ2GYVz4GmXUt2e1KmQgav6lLuZUa6CI3p3faUZw9ohc+oCdZxcxuaT\n7JhWN6AIW6Q5e5zbcJMcSAhU9BvbN77OpxG7JhyJFrxWB421AfPpvoponc80\njeMF\r\n=ScYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"486523d75daabe94d590a5d932922009a606755c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.41","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.41","@storybook/router":"6.3.0-alpha.41","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.41","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.41","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.41","@storybook/core-events":"6.3.0-alpha.41","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.41"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.41_1621839274004_0.9855101941303701","host":"s3://npm-registry-packages"}},"6.3.0-alpha.42":{"name":"@storybook/ui","version":"6.3.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.42","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af018616e34a92e31401ddc917fb2e463f7a2f1d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.42.tgz","fileCount":382,"integrity":"sha512-owd9nvBEQRpPud3W522uRFfbPEO2MwMuQmEt0FoULH/VAHRXow5J6nTGY4B+XOfXiIaW1PYKTEsjZ2wAfteSjA==","signatures":[{"sig":"MEUCIQD5ap+0RQqzmUBtPCBzXowawQ8+NAIaxcuTFm26Qh7vLQIgfk7f6Gkkov82Hama62CMnYHY8n2KmEDZOWWJUEVz2/Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq6wvCRA9TVsSAnZWagAAX6kP/3j+jOVNRyOqP3lYo1eg\nZVc7r/zK2HBMOMWnh+wU9xDlYg+RnAdgqHBB6fY4d3d1q7Zh4wzLBSZk9Tva\nHDJBU9UXWeotyWB52+VLxAINAn9107YHBfI6ib7n9dUMJq71UVz6YnoxUat7\nnaDLZ6xner3odexzpsDgc5xehCCaQPSSla2zq1tboUEuF83Pc6knBQ0hZnEG\n5blowYir7yqIC1l7TDyb/nqzjCRVt+AtHmGpkBtuTSo1230XWEYGGWMKRuEa\nYVhObfCHAkg+PUb+l4HZyu2tzJNh3V0lIoBfjQNpZX9JUTkR0uktPVyB5S8U\nROl3NriaJUTu9CYWNpyMnGfxPRyfH5/FKO0gHAt02liEBU+4tojgTlget15t\najjDQzpcpxhsyY0p9aJwvR7/S2AlVIfaEXcceuI+tuJ7Xu9nhERkwK9ZVCyM\nil9JylkKJ2viY+/U4+yzkmIdM1ymDHgW7JT6a8P3jwmiVQHOoloty527SnGc\nSDapqslpMLQf3U63DggiNyarNVivzzZSNudYWAbET+nYxAANiJgfR5C5gmlu\nooGJK3kwt9K5JAGUqy4GG378eeuX5KOqrz5f0vOJkPfgh5tq+nEcRwtZ0jLe\nyc510EldcwE72Hlct/bUgLwGIk/5MrUEh8nSKxp4I47cVpb2QbIhoomnlqdz\nZdlk\r\n=79aS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8cb665a7789e6f1a6f853a5c2de05448c854f14c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.42","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.42","@storybook/router":"6.3.0-alpha.42","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.42","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.42","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.42","@storybook/core-events":"6.3.0-alpha.42","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.42"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.42_1621863470552_0.9821259737487826","host":"s3://npm-registry-packages"}},"6.3.0-alpha.43":{"name":"@storybook/ui","version":"6.3.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.43","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"729a15cfc8bf0de8af534f8faf5845bf2e9d924f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.43.tgz","fileCount":382,"integrity":"sha512-nnl3mkDub2ZEN3m1r9GA/XJ/viSOGJvbhqF09pgb2GNtYhMNgd7NTTw4K07ssf1pMOJYAkPRNNijWoBhfuetmg==","signatures":[{"sig":"MEQCIGDs0Fg+GH04MyPbfd+G/YpP/EcVA0TOGnTblikkAN8gAiA1tDdyRtFEYgm2ecQFpxuzPG681zCO5XLMJLO77hRU8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrGFQCRA9TVsSAnZWagAAzVMP/3Lwlhz423xjGYBk8Yg+\nDZpuDMTCOwOwKKY/cg4b1oRfehhkB2oJK+tmQTp4REE3jqLcY4YtMJfl40k+\nab5HP+5G1gKJ+eOe5SRpC0ahJA6cmUpkN+01BztV8KRyC+mAQ6EJ8u9W718w\nvIDuVMZTIariWRrxURsU6ZLZgHtuhkpJlanGJJn0CahtQiY0HyO3YIfOEWKI\nmIA0zPPxhpPgJ+ACOPrWSHqtfyEVbjm4p7QfcFps6IDtsMj+Yzyl3C559+S9\nf2JnrfJWmtKZPIgYuxHBwIrOwvUuPwdi0hV+W06pY8c/VmTKtSBlQPy1F1lo\n5m7dRqHvqljrj3d1plslapPjysTDVb94CZdHqPV1XCLEX+oUaaZ+lDdXjyhe\naxEEjuDklWDQlU60B/9tzUFfHT49eSz6laHWW172Nq0w+PzCd9DJcGUs0hwr\na49pv62NfXKJW3l7H9rknR/f6RLPuIhFmQlrejEoD+7hIYbi6kK94syn6QJ+\nItZiEp8uamgFOvMMxGZA1GJbyFWZRmr+BzkJCjXOKR5unRjT7gzwAmI6N5Ws\nUa1E9rBJdoPrQ0wyinjY8dhAlayftntYHImg7tOZ59uyLPZf7Mrr4Emrh3kd\nM7o/Hrs6t90amplR4IIUoR15ef41I2w2wKlBy4y1BVPpnHFM82/DMfoH/udd\nMdI1\r\n=Vch8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5701d147dd15a37f431ccc2e5af30e81fb5b0da9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.43","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.43","@storybook/router":"6.3.0-alpha.43","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.43","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.43","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.43","@storybook/core-events":"6.3.0-alpha.43","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.43"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.43_1621909840087_0.43854340020166527","host":"s3://npm-registry-packages"}},"6.3.0-alpha.44":{"name":"@storybook/ui","version":"6.3.0-alpha.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.44","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2843da0acec02dfa14f476422890c11f0926f53d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.44.tgz","fileCount":382,"integrity":"sha512-YASfJOpojBbkGvBKnqKVwzMj7peU/y0Njjw03vUH2YTa4zwsNm3veL+oQApiYI3HOYQg9pbbLchasa6eoyODHA==","signatures":[{"sig":"MEUCIEtZZ7hLnYFu/K5/vjAZpHjoGSHwUG45L/fPkUvCQgj1AiEAlbApMHIBT6oCSjSf+T4ZG520ECIGU0tl27TJGf7gf+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrMdCCRA9TVsSAnZWagAAhyAP/jGypv9tMiUwn0yyNKzk\ntE+0PBE3EcD1ohSrMUfTlNRRzkM1vfv86lVhFITKwH1GL9n/aw55VDhQF066\ntp3X24g2mvye+tiPAlBQGXH4RzDI0m+TqoDxlRvGt1GTlSdXDlVPDn2MAYiT\nc0/Rbyzcqa3uxTbkvbaVBv/D39uNsBKsM6WFG7yrKntUGqMGuh21VKNZgM2Y\nQyFxCQEjBJrleB/ulOoWHl9mpSrQqReFIEStrWzTUP4k0dgVMi9RWxlrvX5A\niH4N0MBuS8pqQI0to0vmJ4/8ELNBf4nDNWSnOtQ57x8tKbwmZxcRdRBHRThO\nNqPz7wzRhYGsT7I46lfb49j8vhvWDm+ogD7tPhjgqpFHDuSlvQByecKJl0VX\n09BD5+LpJrn9EXlNtFahJx19GGyzreaLmPavdB9bADqlJSA+UJUAVvvZYGVp\nyDFhtBQSgL9NBKuubyJ7bvQEI+wuXs2JpsikVckDQ7WfHvVZRABdQ6bioNsi\np/NBXiAbhvuqCESJa0ULPMwXtra9HXzrINM5gLrW7zshJHkuNbin86Uv/LU0\n2DoF22BYpEHtn7/qOfPM2hMFcV6ZIsT5i/+bsWJC/2sK+nHY/RKRbpQBNLA7\n5gcR+qQV9xGq2JnoYtNrkg//S+ryHCIgHnR5GKwuZsLOyYxrjTOpMj9eQs2t\n6F+8\r\n=00EJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e24c62578976bb864d55b7ef2cb40a2676c6b52c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.44","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.44","@storybook/router":"6.3.0-alpha.44","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.44","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.44","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.44","@storybook/core-events":"6.3.0-alpha.44","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.44"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.44_1621935937064_0.7813439851256736","host":"s3://npm-registry-packages"}},"6.3.0-alpha.45":{"name":"@storybook/ui","version":"6.3.0-alpha.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-alpha.45","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8729c29222eae9c4d36444bc61918710dc230e7f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-alpha.45.tgz","fileCount":382,"integrity":"sha512-iEjqmdAA6kS3VSejlGfT6ZXJR8oAt87E9EFRd8Et4PBhyvfRJ0COJDqMesDt3MlR/7rohj0I2OyJEcgeeE3wzw==","signatures":[{"sig":"MEUCIQDACqAR/G2GUTYkZnmgFJQupd0+BOMxef6ls1LWvx8nDwIgdfFrrL3sp22vE6EeySt3d18XIYmuiV69L3XiGO0JALc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrSp7CRA9TVsSAnZWagAATqcP/1JNl3xcWsAIrzv8uBjO\nuh4uLKMXTw9tjOxrXdKHkxd8dcUzoCNkEwhBxCMtGwkXibpUqCtJdpkl0oSv\n3R7aij5BCVGPgmT2/+3ufuV0GjKjWkn3GGWekUENavOwnGjstL13x+vdTk2M\nGY43mnQG3rPEW5n7NGwGWEx3ixi4VHVCM+YSNmpXSSYtFqjraFdyCxtIU5wG\n2j4dOvhG1lDWkYrb/lBz4mAYt+IC5MLj7Y7AUA7PR5RhShkOj42ccOAS4fn5\noJ1AT8gjfMmarhrrxz7Yv8p1vkDO29eKC1pnnGugP0fzWebeTOu086CkKhkD\nV3tIAsj7xHOhDDLL0CmJsy82g/z8TnsohklG7JcppwpLbtdBITcdZ7pXxms4\nFKzLeqiGXm7UlF7yz1+5/5f5Wz1VstTYQbHbIhEa5s3iLxrngIA5swj43Saw\nD0TJnWBC7eMgQvbL/K5nI9KL6CrVcuvfVkwvNPoZMtD9d0HvTHwGIXTOMjUb\nrKqEvv2c4aSkW3lpni0gyokfg3pTObkMW5e/ziXvLoe905rh1ELj06H1hnHd\nSd2660H9OHqoI6ALru6reOEKS68HnMPO0XvLRDp45B5voTidWTsFi0b6I269\nXccPZznu6wkMrGKi8/y0ggDsk2/GEyfTnYkAfFZLEft8T7dv6gyR0j+WXMnY\noizb\r\n=LG0A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d85be97196cfcdb2e0e16470811f04230f5ea61f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-alpha.45","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-alpha.45","@storybook/router":"6.3.0-alpha.45","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-alpha.45","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-alpha.45","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-alpha.45","@storybook/core-events":"6.3.0-alpha.45","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-alpha.45"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-alpha.45_1621961338792_0.7262142702223979","host":"s3://npm-registry-packages"}},"6.3.0-beta.0":{"name":"@storybook/ui","version":"6.3.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f4e4ff87e3f715e2e2f5b4325bd445a847ffe601","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.0.tgz","fileCount":382,"integrity":"sha512-/ntOZD/kQ131ghwjvRITc49TU3puR2/HH77q1Mbc/UpvIk7l6gFIn8Fvq8CtlmvR+T9kaYUrkVA25xR/1MZRMA==","signatures":[{"sig":"MEUCIQDvAqP7FiBwDDNG6ObhKDCSmfAmpY8rOpLMx8TUsbAgKQIgDRaN+SMk1KAd2Mq2RlHVHmy55cZ/TOQqEjyYt2VUHqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3540421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrbiACRA9TVsSAnZWagAAPikQAJqV5hvgNugRju9iVUFn\nNtIbk2OwW5/H53TXxuv8tOZXbIkLOFiKGMLwx7Kv1lO0vkZAhy/GMD5NFPYd\nQz1LmzekRHRkXAbetAIktp8BfE6+NNMldz8CER8oX89FAVeCB1kc0ZGiJzSB\noB+2qE6asRtlIVnHL7UtfW0FP3mRWoT73Z5JDW+vpVTs19RJux5pWtrIAug1\n3AwnptKytF3IgxeVC6GKbLGnf5ClIf23SM9v5yuObjsRZ5G93ooBwuTk4rs2\nmS7/U4lZJ+JiecMBdVNFfloWQDkLZD9Yo8/ViDCT92Xf/P1Mw8+b+r/AbLgK\nA2C+1UKii05j0Rp3r6Iy1gN+TnPsEitrUC2/siQpqJjbwHNMjql1Qwkt2DWF\nhaMN4GbMvc4v14VI5Zl+W4De65tzp+zPEnxRABQxhLjMmJfZP+HomWLZa+Nw\nJdrYWHAeuGJ9qYsom89gOT2f+5ChKDd0D+3TnGkSKgYQ2kFadnALsvxFgmN0\nDiZikfTKr8FDyl2mai+JJgfSUocCGMKEC1cSP4tRrMoCXtGcubcF6T9FbmOV\nciX0YObHOTxfWx0lscjctM/COasBgtsDgRmUhaRFemgYtx+FKCvuPwepNgj/\nO2RNG6T0DY9XnSk4kLeGRE6JEsrWdmvB4Jhl5F9lDvWsPLRnLRqF0LzOzk+F\n5Q4Y\r\n=Mp0x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport { document } from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fcc428b77bbbc555f0dec87386d96ac7d2b5d218","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.0","@storybook/router":"6.3.0-beta.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.0","@storybook/core-events":"6.3.0-beta.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.0_1621997695840_0.8768324639484164","host":"s3://npm-registry-packages"}},"6.3.0-beta.1":{"name":"@storybook/ui","version":"6.3.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b435711b4b16d0b30ab3c9316db7772e27ef14f9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.1.tgz","fileCount":382,"integrity":"sha512-ejVbbqL4kQx0b9BqumMBRWvdoWPkJwtJv0K8N+bc1YqKXnsio7VOXhqJYRGCHY5Igmv9gZ7Il0k0XjEEzXIzIw==","signatures":[{"sig":"MEYCIQCjVbRxT6bbs7rvtpEIACHogVcxkW0spDHRRdK969VunQIhAJCtmRLu7U629XtKklokRr/it+l9ZswA38scMpWwwOBR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgri7YCRA9TVsSAnZWagAAQ7UP/iwucQhJ1Ues4g+wiMej\nkMWlocvJBcgqoNLh953zaw7dguwomheCODqdD4MCtsKcgc9L4zGJe5EHvKRq\nd1OfzyEwq2BoOnsoRzo1zBoXOfgaiVta5njM5RNdaHEw8G313px+YgvS9bBQ\nTK9CQ0xvIotUpQ1GEkKgMnIIaB2XJbPvQ8/AAJr6pVTIueF4SlSFCUI5TbYx\nUWUmnCvdYNlja9k0xxlksUimkUsfoWJdXRkdq5i9kgy1IWEJek20xpRMmHrk\n2LwthETmF4IdWiY2YpRV3om3OC6B1TZV0EYfm35Xr984VNuF/D1UFoDhrzJx\ntem/VK5qcFNY1ovqJacGRy9o/moPBBSORof/ZKxDfh7RTKyJxG+3E6CecHIA\noAqgNDb60gnGBIIcPU3B+2NggwDtQb5gpiNQLHG77CyjoZ0YZNKys02zrRj2\njrcdQYy54pxRhlGNbcM359M2U87R+niMU901689+QqYoFIY7XltAEKpzCSfx\nAH9QbwWgJBkJSfMlRRcFj48i3qna/VWzB4DH4SqKaXkHIx/dZJdtV73+e1Aj\nd+UIpeCHGk2phtejkakhbahktrzHtwV7zw9nbSxgW0Q3pabdoAH1wyQkb/y2\nXtohVenM3C26PHUwIuiaF9BaUwvKEWOdRwHnDCzz+hgy08Sy69gGEjYKZt12\nyg7j\r\n=1MWA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"356a2dfd1a7de292e50d0c2d732b2e28bbf3de6e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.1","@storybook/router":"6.3.0-beta.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.1","@storybook/core-events":"6.3.0-beta.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.1_1622027991630_0.9026407903680944","host":"s3://npm-registry-packages"}},"6.3.0-beta.2":{"name":"@storybook/ui","version":"6.3.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"967e7c839173df41d78bea21962b34d0b6f2269e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.2.tgz","fileCount":382,"integrity":"sha512-B1SeV+RQXej3N6zG60rqoLlqEbH5hmQBWh3wwmH7DfUaP7F8L8Ra+7E6ldZNxINWRh2aTltFIIohgdc+eRHjrg==","signatures":[{"sig":"MEQCIH06FaXpN748rIepJKsVVJGTcToDv9vttP+MfGNQOv1YAiAV+H0cJ6+KVcmCJhocXM4QbhywaVDA0LA7bZTCOOrLsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr44LCRA9TVsSAnZWagAAdw4P/ibtDvBIGpDbMr23Lxvj\n7jQkKB01O5Y/kSoAwyfS2zrRvO8l+Z7JVbV+riMk3JP2XhgGxvHY4ZmfCDv4\nO5seKVmbtFqyu17AJMftGuAxWFO0yGg45vwLLJJ8F0k/uzvCfewguNwhGFpm\n3Nfo2HHJunPjzfr0dcD9m2JB15LAF59TBycO+oc1MWoNC7sSRPRRE6B0fzNk\nwBzgDGP50NAdlssCUIzUi0VwZY7oP7Ty+usdaGAynX4wK9AiIhumBxsTKKNV\nyWk6o193nO9bzp6u8a4O8ZGFQLnwVRA9qPqjPVYPaNqMstQIkIYFCS/Xe5iP\nJr/+5DJQSjEQbLzM5PJIQLwaX0IOjN1dByCcSgOUr0uZp/U40e374yI4T+eL\n2GNVTXfa6XCTv3LavZSGRsHVtjyC+DKm3qTeWC8/t2Tr7wR/ciufSQya8WMU\nRlUDEhmYq9tJL1hvkhC0NVzz3m5sOew6PpuAL622aBEjhCGAU1E3vE38cK/+\nxkZw+8M6f85OslkNNk7k4hxQCKSIJ2IFUNYUNhVYP8LWdnlc6hzRSZUEK61H\nOVFZ+61igY4EOF0OhQLb8f3AJ9wDxeDMDZsS7F6Fo//WeYwCU0MXoDPDwCHp\n0NRiy0hk7PkcK4XL7BHPsfpWb4Iz4U17eWqX/AV2gSXIDgQJIY9MfaArUzD+\ntpsa\r\n=A2Uo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"75c1cba133eab8c39af23b5e35426adbb57692ad","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.2","@storybook/router":"6.3.0-beta.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.2","@storybook/core-events":"6.3.0-beta.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.2_1622117899162_0.8390050097725508","host":"s3://npm-registry-packages"}},"6.3.0-beta.4":{"name":"@storybook/ui","version":"6.3.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9d12af50dd2286b41a824e6ca2c798a312c82477","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.4.tgz","fileCount":382,"integrity":"sha512-7kCLE3s3HfSU5b1kJVvBwbsDPO/DwPZTULBkNmmygPGrPSkIZF0tTNmxHqtD58iEZ/zIf6S44IP/qKVwEepOHA==","signatures":[{"sig":"MEYCIQCDBmlR5E6t3FZS5khdCxOo6B1TY1W8TLhzsnuQTm1ACwIhAM9cos1OBjQqgqStJSjo2XGhjhPLUACl2ZXRWYO9aKVz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsKskCRA9TVsSAnZWagAAlJwP+gKXsb3uHA5Xqwj894eT\n50RzGTqhFytrIZfIbnuKbTV23LsA2IntRb5DQoSfSlRz2vd+KIJkUCgxXn74\ntGH+cWCmSyv/IkED/PZh8gi4QiGxt+J4ytHn9YaBuBOu1DkZncuYw2pq4R3V\nYQrN4fjAl7tPH265k6g1peoPwr+X3/D9r2Tg/mX+TtOuS86yNdUGkuihSzpk\nBqgks3JKo36yiinHglAejUyUiahY6cJns6ymlF6yw/59o1Pe4JM+kjsDgGwQ\nTiuhCmEMdFfjFiXQtrq/U5/2cb/wll3vV6uvZz1RcMPDYliYKsFaNjxMT0RZ\ntV7WmknVHI1nlwaxaydX/YVC7RA48nrwLqgbQTs4l9M7caCOODGQSmj5Cjlw\nXs5NMVKUyP0CoRxM6QlM7rmw2cgIWZkivCEYSXBph5hOa+b2y5SvRSXQqkdV\nPT+RvTqIhhjvTr3LcCBEajX1+ptcNegd/IKABt40X3yhl+Jz1JXZJz4vZLlL\nhr9iznlxLdA76NfGVRFWenPK37MaHaRS7c7g2U32pXuz7s+TJBlUJgqwTCVU\nm4JxECJzDlHVwCqyXFxGohE12m0FUjZgPFKF2xSqd4lP73J+382qLeMBHEg+\nK6z/lr82q2Tqh/uqzymWXFTAH46eWhJREcvmYm9grFrnWl5s5ofufWEy5kSe\n6W0L\r\n=ltkn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f4d1305d01e935c368d91a6316e2144e601d8ee0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.4","@storybook/router":"6.3.0-beta.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.4","@storybook/core-events":"6.3.0-beta.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.4_1622190883572_0.16158587970564975","host":"s3://npm-registry-packages"}},"6.3.0-beta.5":{"name":"@storybook/ui","version":"6.3.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ffee798280d99269c42054b0313ce9e9d822f918","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.5.tgz","fileCount":382,"integrity":"sha512-sjbCXJWRF61LsBD0WGPWyO89IP+ra0pd+F60ktf7LGhsMiOITtsnhwLtO0wTkWuVjApS9w5xH6zIuHEpBJ4j1w==","signatures":[{"sig":"MEQCIHTmcctE/hWGtFuFY2BVmjN37xzDICYa2n9Wn3qHzeQtAiBczfTmwRKbiYiZkaLof3tJu64Zfi1WeuJ38wuq9+Eisg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsx3WCRA9TVsSAnZWagAAGsgP/R0hghCJ2bulF8HUstuW\nGaIp3Y1nqRUNYZALf0W85ubbOg8trgZGIj+cUEiH/ZYguJEBSFGdLYK2mW8d\ntKdtC9HkDfsV/AM8rq01buacEkZHeLJWXF862f59FBXfIl4iaXEX8Qi8UiUR\ntDGp6H3hCP4rMbXOl+8gT7dP8G5xvdyKRKYaHhbRvrPl7yGmjri49xQ0SD+k\nZZNLSiolUzyUZvAL4fLmOjWbUwHUbYEqDxcIAZsnf2/lxN6zybHG/WaAePgE\nN+XGUl54EfG+C4+luDuKBg+djDGIjBWJhi6MKZ0jr6IRa2Y5NhfYVR9jCrLo\nlhlnn8Tb6HI8/u3lAx+/urA3O5U75z+pCSxqQr0sFR9gnUo5Vkw028XB/3jK\nx6n+uYNzxpV4olV0RXBjMygAVJBfwBivxZv18IgOyhRoQIVB0WHNAwfWdeHV\nrhbc8x5zaY/FCga0GS+D0Ak8+9yj6G32Tv/6RxgkY8CgnY8NTrzUZ7v3ghez\nTjPHEjN/m8lcapGAATsNq+4G33Q8VjYCdyXdNvXyAK5gLncdQPfaoKPFoUNO\ncBeQ2129OXHKI3Ce42cvtV1tp6VcKlH6im8HXXnV4ykgC8/atGA3+GyKV9t2\nfI6diAF+wcYwf8a+hXDgqEfjEw2LV8bK+AwqX0szp2p+VSHao/h37/r0oS88\nKPUl\r\n=cnEc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7ce19a9db3879b3a14ca6d1f7d4f6f7cfb19aca6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.5","@storybook/router":"6.3.0-beta.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.5","@storybook/core-events":"6.3.0-beta.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.5_1622351318456_0.44986157915861424","host":"s3://npm-registry-packages"}},"6.3.0-beta.6":{"name":"@storybook/ui","version":"6.3.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f65346d38a0ca8c52787e9340443d2fc3fd4a735","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.6.tgz","fileCount":382,"integrity":"sha512-czl4zZ55dTN+kmhi63O0xz8QklXdbqaJc4bdFuWNcQRqQXDQEkfc42hWu/2/+KoXk1rNs6k+IOECg8DI1FirRQ==","signatures":[{"sig":"MEUCIQCDdkjIIhzDM91P4e4MMGki/QtrnyglWWgKQhdDC+IkaQIgYdXfQRWzMEyuiAU4ONDFbKwKLPz6AetH8F7FzLHiuoc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtgRzCRA9TVsSAnZWagAABkkP/j5hfMtH3SAqbKnx9r8R\n4TH8zKwx5rnZRAv0DNgslEIEoEQiMhYM6c0l1Bu1e8evcN+yukmfnawCsB8L\nqk75krhxFPInAclPezs5r0vOHooNexBN3PW+7y0fsHUXmINLA4kIoiYq8uiG\nfg5vogUupEsZWFmQZ5OXC1aGqRJ8V0sTh6kgByCQSDUCjSLgNdoH+u0DtHBm\nSntrUxquOpC6A2O9AuGgOemXAkRmKGd7e+CJ7/miA5f2AUPNvb/I3pDxx+KY\n2ww7L3lA4MMB0CSJkYRaYCkK1/W+/4SpYC7/RlfTjI3d0AnYJTWpZ8cYzKCb\nNM7IDKc1bcTotHRipD/fCtiEqrbSU9VXSgG/0gQqsCsN24zuQHz3F++zx7hY\nXkZx9UmL1ZGfeuAU8Ycpjh0x2uOkWnVVTmBPoUBHf4c/W9zaGu/T3McAq8S5\nK8lDjbEddZVTPxVpm58unTpuHpXQGEhBTm4XpdcRIdIvqAjm9jc6rl1LTj4r\nFKcqUrpDwdAjfihA2/9zSpX0M8XG0JdsFkGlXpURhbpVsIfv8yBwerc7GaTs\nnmQAkQDkcMf/wixJzwq8SaNsbxaA12yNXfgpR1lDPw3abchPlJ2lG1Szuyjw\nrXcjmc+yXOtVUGIXddoISDwVXzqJMLPSmKevyyGMKjXop2dP0ElR9BkTawcx\nNh/3\r\n=xAM2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7e7270ea5f8fed7f768c91abfd724bfe55298396","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.6","@storybook/router":"6.3.0-beta.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.6","@storybook/core-events":"6.3.0-beta.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.6_1622541427300_0.5979368680729986","host":"s3://npm-registry-packages"}},"6.3.0-beta.7":{"name":"@storybook/ui","version":"6.3.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1f7ef72fa998efd338a929f3dbe944dea1ee5bb8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.7.tgz","fileCount":382,"integrity":"sha512-XBJvMWQ5ymaRktRCZomZiXtYsR3/71h0++9Jfi5T0vP/nPclKpapHW7FME1GaMa9jGl7zB5tCQoTb9FUOpCoFw==","signatures":[{"sig":"MEUCIQDCzyaur3Fh4+X7ZdClACxSvJvXLVvJneLNDy2Se5icjgIgMGblq0wDhbbpPgz/dLpRMBOsHK8g6PwGiUxP9jsjK9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtmJiCRA9TVsSAnZWagAA9CQP+wZoufuBh8jPWnE15and\nCG31XvjujigoyAJzU2v56846YIxX2wvR/x3YhKKSGtiShzWL1WxkTUSAD+qm\n9d9LbH4Rt9XqEbARlYkbBII1dkOLkVLQ1lvV6r+i0/indsadi90rAZ+TzIOk\ngCe/FpqBFSSbyWkcD7gI7POIWmD98lVBhj24mBIdtTEriUjai4nAPZoXAKNz\nSz3qk8ELDiSoIq8oyJXOmXtIIPk/ovbIMFz2GTWk/0v3HaSRGhMliKTCxSbx\nbiZo/qgynmcbAx+DWNVF/BQfoGRhoUoa5Iv5BHSXyJ+PgYhXXUDG5Weht412\nYjk+E0xCXPTYzXYkqoJjcsPsfJNvbWrNIVHdu2n9ziaKck48ASav57fGei4I\ngsL+TgMNtalNt6hqUmrpzlxn0elvfhJkjk+gubOo2Sla3ub7cURXarAbIwao\nr8npnj0tr0ehv8WimfYV8nFyH+ur5nS/geL2PlO+ZxY3GMyRbBT5pWanzfqv\nH1ncVjGS3hAbtXo8mM46u1lvpTdJVhk5NRrc7/wgflZhCI4nfV/XoqFcBdAE\nlIiXQ+0g/AI11ZI5qdXUm7cvIL/5KDJFOb7CFvwo+GgMqkHCpixmBKXnOdMh\nx7wuWvTj/SMyLqRYV/00e+TU75yDA1Te9ITU32t7cb37dAninpTRkTUoe/Ky\njw8k\r\n=OYs+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"273d1aad5c54cb66bd8b968e0b6ff41860ef205e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.7","@storybook/router":"6.3.0-beta.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.7","@storybook/core-events":"6.3.0-beta.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.7_1622565474092_0.333908868610165","host":"s3://npm-registry-packages"}},"6.3.0-beta.8":{"name":"@storybook/ui","version":"6.3.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e27f2ac44c0749e5cb7165202571f745e41315d4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.8.tgz","fileCount":382,"integrity":"sha512-cg9EnWEaYd8P5AIQhz9o6n+EQ3yCCSBZ8FhA/dBETwRRzrPsINavotOADCNtvPsgBdgdUhgnaYuhjSN4Do1CkA==","signatures":[{"sig":"MEQCIFRbETKWC7M5XAMVOTrl3d4DOMXim7+yQu3+pJ4WvId+AiB/S2cLpGYNFH3b2FAWprNAEZAMn+ZaQdONO4IlmogKJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt30kCRA9TVsSAnZWagAA4kAQAJMQBNvaAZyCft237kGT\nzPgGkGrwvM3cT+apcdrThRmnl+lnCoCBlK4bv99Ge3r83yxTdSPoX7b+2Kd8\nUd0tmssZUFYmgSRSBvP07CnM6y5JYpt1BqyL4rk5IhAy90RuHs9r1VkFJ8Hr\nJKyAZzvn69SBhujdujiAteC8A/zgsJgKI1Ld79xAhrkCPZiHJQn4/++hGqoX\n35Rfyh90pbhV7yXDGL21BVnP6QBojH/VAW268H2ZwVCC1ue9VQgPfT0h5dCO\nPnX3kM7FZfyU+T0BALkAEymJgDvFafUTz5Do6J1+EKISW+BiDw7iPA9pfcaX\nF9YmdQWAx9FnlijvJjxr8YysvnTaR7xr3sT2Gsb36NvKWWxuE/oorZkp7P/b\naE11KotnDOdBEynmhSFdSJbdo8ktSEqWj+NkJU+4I1PXq+lWyhGwKKW7L8JT\ne4GEgWlvHQru0lhO0Ceb+ucfKNdhzyU8pH2jJSa6qScD5ElHfDBh66BCGi84\nd/yYsFJZJLH5wYpZPKkgdY8K2S6yX2gA+KFUZrZ5QO94zfrFi4ViKrwanyPM\nLRjDluzc9NPPBf4PBFNhmkW/WDeDY08fiPiH6Y1IxzFWWJDLEmUSEhwBV6Cd\nOjWxFZXyhbOBhjtDF8A8+rFEb2iWKPubiB9+JOhOZBWE6Tk3SevON8VJPuNo\nOn2r\r\n=6mIn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4421c26adf5c185fc6f81d20a422aec122d93918","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.8","@storybook/router":"6.3.0-beta.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.8","@storybook/core-events":"6.3.0-beta.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.8_1622637860306_0.6899304589831581","host":"s3://npm-registry-packages"}},"6.3.0-beta.9":{"name":"@storybook/ui","version":"6.3.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"46b75db4c4cb129b7a9d97cdec42dd547e6aa55e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.9.tgz","fileCount":382,"integrity":"sha512-h1EPn5ATk1RkBmVMCSSmiNx1Ngw0RE3XCRGx+E6JkIuVDOv6ITKx/o4BlGKEqJBzHcj1Hwc8iapspbqf+13cdw==","signatures":[{"sig":"MEUCICG0+fXtfFQwRxvXJw0pUIMWZNNWzABFjJP0OjNaC4iPAiEA2EXteRg25zXfNx/+XD9yYm0Wlw3qNc1UXY8gYs2xniQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt9y8CRA9TVsSAnZWagAA9bMP/0AQDQiWXxR6d/kRNVrw\nk6vHh23XlkTpkh/tf/hKQnKkMbDjjIDtTdoE64LJZWNErbDr8mHotSULDG2v\nm+eBGyxeRC0wrB0PDQFCZv253qCpYMDe9mARrlyXvhvTmv81VtxdBN+Iw+l/\nFHIMTurAY8BlBEjk1WriK4C6iCFoY0UNOHxVKErQ011vz8oku/QBEzHKKY4I\nBW+lPykATetIk7yTzCOx3SKUzs5abZWun2B35ixqSvx3vorx/JV8Kxz/Nsa2\nYxFMW4Fde2TnLjWkHTkA0qM3H7PSy3KhPobiPxdMXHMWIAYN9aF/vinLPiwJ\ngbxYXKwr9lmsO46eg7ln0N0PENZTC3Axe7PsdYBGJqZ3PpGpW0BthJcbC1gR\nH55AYwZ8oOl8vzlKfuZDRqB/1slwWWfuA2szq9C21TpNfwHshasTITs630aF\nLD5c477oAjRJZ4r9/tKR0a8+D1e8515yA8UP6PFXQgkei1gfuf+W33A78/xv\nI5qcGvifJc5c2sQik4lloSjNUcfvnikOqS7OqItP4qTsBV3PBno1WXvfg1fk\nvuCuQ7EuRCpeeY2CZh0oc+sWcTxa/9QhP+NK0lUo8BhNz9NB6wBGqw0VVRo9\nu9fB0jBQtRbL9MlDPwCy/O2/pyC867ZojCqG0mHQuNld2l6gFgSYKLI5UWID\n/AV7\r\n=0k8v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"df59c3933e319f216ef41b6a516102884e54e7f0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.9","@storybook/router":"6.3.0-beta.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.9","@storybook/core-events":"6.3.0-beta.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.9_1622662332429_0.8473571899188534","host":"s3://npm-registry-packages"}},"6.3.0-beta.10":{"name":"@storybook/ui","version":"6.3.0-beta.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.10","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"44b024ee5df779e1211111d13b5bf9fd8992e247","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.10.tgz","fileCount":382,"integrity":"sha512-QkrViZUUN2v4bBsMNgmANbnlmGytIggJQIJAevWMh8Yei+2UGtPOsWcQfdO5WDFpxo6x6ryC6QLNAa9kzZHOGA==","signatures":[{"sig":"MEUCIDDuZcdbZGP0dpwP1NYHV6PXwYqZ9bWjiPmjRAL+N0oPAiEA4dpgw8AzFU+Cl//D36iTlODUQuBr0Ymi01538aAH7T8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguKExCRA9TVsSAnZWagAAJG4P/RBhbeMk9rJfNWR+sqFH\nMO5zB3wVLgl3SSszdfTJQ4Vp3VoOtWTk272KXiv13oSh2ZdSuayK1qT7CS8x\nXBISqd4WBvM1VWiy1FcMiT6cO+Hue9RibfKW67P+lN1HSajPODrldoKL25Ak\nsyYFHEW1yiQf2poup2ZhBwB8Y3dDOOdVrCnKFWtWCbhaZe/TZ/EEJ/YtexEJ\n7n1R4cMbkmu8Beqvtf8BsgdaOCIfvzRuWr9Ux2cAvcrk2Yv2yR9kW+PElop1\n0WwDaL+cWxaF4b1LU7R0H9yqN/w2ZIQf7xCzvtLaRCJrjjQaqyCnBdA20u+i\nb4s3vWtI4WlB3OF2hR0WzHHC1CSMjwvXUXNUXP2A9XP6YMBy4rgyrco1fHue\nRnLsR+1SQvTy+CiAnYSSSfB2tC9PE8rEN22e62QsJTjal2pbB/DBv0XJWkHz\n+VyknVv3RX2eMZ+0DtFjzNx64n6J/grgQHqslxMvnL2Hcn+n+pTb9jM4vdxa\nkC/RaLvIhl/aQBiLQQR/vKjTM1ZhRFiF349zHitNcZ74l81cveaU8Rxkp4yo\nCGfJKeUWYicgDsgzYFFmDjpztlTCUfvL4AUcGH3m5xbequ7EjBNYQBXHgbrE\nk4mxTLvXcIYsel5FRVJ9kNr/YgohxZg/z4G6x64FIozvi+VBe1/lRG8Gy7yR\nMUjf\r\n=DcCZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ba0841594211c4e5df7340f7b904b030f21fe4aa","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.10","@storybook/router":"6.3.0-beta.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.10","@storybook/core-events":"6.3.0-beta.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.10_1622712625500_0.1414407057509519","host":"s3://npm-registry-packages"}},"6.3.0-beta.11":{"name":"@storybook/ui","version":"6.3.0-beta.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"68042c0bd17ee3d141d3f254510889a674cb810e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.11.tgz","fileCount":382,"integrity":"sha512-vZ0Eed/Ge9i1920VW6hEHV83jOK4+RtxxansXVJk5XC/6/zZ+pLm3ZaTjO8CJBtI49d1LhFvoR6SIOiRyqpHoA==","signatures":[{"sig":"MEUCIFOZAjirzta2QF6fk4jwq9cdaoQOZNvUGIWznt/lJfgLAiEA07ZQDctW84A8UJb4NVexLysiqVceBGFRl/mDYNYMRbg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgujeJCRA9TVsSAnZWagAAHf0P/i67vLJl2Y5nylkkSNv/\nIMcDuX/tCpoETpfp8yL0w9++yotnIuhgOQRSKodgcW1QTHeJC3dcSaLoKgpn\nxcXIPI2sPw4diYwDu2+j5qr679ZA3iqx3z993tSTVaz9JK5HY58Rqki/q6HZ\nhqWPws1yavAOgjwF3NZtlhTZ1LaiXQAYP81Sme1LbxRKDZwgMJgRrvYQUR6j\nPbshZIg735d/YqvCqeY9Z0TNLLaVgRZHLFq5rJETUH6s8lF5dm+P9HqaSKpq\nHysQmwCsOaRffspm85p1KiectMxQTF9rmSrmIISfgfxbbg3gPUNbmB5hja0l\nlqRTGF/R4U+FY3SiO1HTpTyJYFqq5GT3eWd5Tb/ixmsycRi1MEJes9ShtPOZ\nRIguZM30yEEJY5+hfVSUsYahrrAKd+xK0jpS1DOVR2Irvg1yqiA1gX43ErfG\nmXnW2YXQ+F0Iho4m4odznykEFiQuWdklWntRhQvJcFumtOyGR2rpYuynDQx1\n83B10rEfUVBXJSjLC+l2tdW8/cJb/fIzucdkDLYHChddvup9Uuzj+FxHsk3h\nIkQPZlIS7+nkq4TI0I6Sr7yhgQEjaabph3KI3V+TNI2fB56J4ccPTBOTf83R\nI1Xpu+3okokOuXXJgJxfeBCOwgTCqT83Z9Mb+Mw2nQoCTU5dKUySW+6PR5MM\nanTt\r\n=SmEy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4c0a14de3f7d0d360933c7dfb6cb8a8e3fb548d6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.11","@storybook/router":"6.3.0-beta.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.11","@storybook/core-events":"6.3.0-beta.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.11_1622816649734_0.22027783533195855","host":"s3://npm-registry-packages"}},"6.3.0-beta.12":{"name":"@storybook/ui","version":"6.3.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c3e7954d52a79c3eeb676d5622ee5b256306f5d3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.12.tgz","fileCount":382,"integrity":"sha512-ZZmE3aN6F4QEQVlV7fnLhkOmf1pxzqwyuUvSLh2fD67uLkoDo1Rbzf770FO6zoN8+SsR0DoOIP7OBPCItQp8dw==","signatures":[{"sig":"MEYCIQCZgh9csvGqLWs7S3dB7xEVjSBoJNSesWDKIJajLyvGxQIhAM/rnyDtcZ3/1WGqq2BSIMDkEJGt7hxSm6xtnoCsAUF8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguu6uCRA9TVsSAnZWagAA1HYP/iFzbUfChow9NcgSoHcg\nbJ6kD2W278VDFVks6DMKzBI6AIxZA10yct6wgfGM3OumtmMK5mnPVUKD0aAS\nqRDr38Iu0AXxhXkb6qjvuChkKbeoxINbLkxLHqaKQRXhYnApnpV3fubTfV4Z\n6Xlmf5elvdAyVyNa9yHRGmUEI5WCno8IF1GLr0F6AfvZdXre6E8Njf2tzTqo\nEMKcYC5WrgaCczLLuZ22NB8QUG8tbfM/mq3Fcs0ciqJazrj5C8ssN6L3AK3A\n90+i7AzTP/y3x+c9VwOKlagejY0fqb37a5qBc98S/ul3wDiwSojX70bnQWhD\ncqyrfhcExBqGx887gMLeOx3YCu/l7e9xKKLJsXEDBTE2pkvNPskTkIiXRT13\nDwflzzxsx4RrjkuPPqpkiXkFCiQgHML6oYTosdpjUVXKCxlZThQhwZJLop71\ng+MXrKw81yz2moFyqFiFCW1Q2WThzn7SkdgwUvHH9scT/xui8DVr2sl7jdvg\nVDpLY7+iSSNaG/6QSlAJA6kOVGTiZjTvl9KpDG8y6xAgRWU98ay2uUjbuNDx\nPScf0LWJ1JsNeXHn21dZAsr9ZSXrvMqkxgltOC0PYB7079VjbwakP7xzA8Ln\nTlLPSGsM++HgpLAUOggcQgIu3WrjfYZIhGUKBIxrn7tjdlz27RNl2ho9amMj\nZd11\r\n=GrTc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"38d2cd7f9c33fcaa3bb52effcad385700e25c750","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.12","@storybook/router":"6.3.0-beta.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.12","@storybook/core-events":"6.3.0-beta.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.12_1622863534443_0.4496485755725106","host":"s3://npm-registry-packages"}},"6.3.0-beta.13":{"name":"@storybook/ui","version":"6.3.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.13","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b20886b1619725e59ad1af170b4d3aaaa516b28b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.13.tgz","fileCount":382,"integrity":"sha512-LKIbQN7uNR/p9OzEdDgyKRKEGRs+eGecU2glrPbrrM71WFp40+gD+zxHiWV+bUlthjeGlT4k4tRrGiabKAgHzA==","signatures":[{"sig":"MEUCIQDVk2zyb7jr3xvxa2F8q0wNyExPk7l+Q/+GyNsD4TUNSgIgF/yXtlUvBixoIwouxR0Ta/eFhoBlOO2DIrWxd9H3epU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvF1kCRA9TVsSAnZWagAAz8QP/junqJ7TEXbk/P1N14BE\nZhI0WCxMO4I3YyfHTAJGSeUnArbWJ+6SMWq3abZvIKneeDjB183vWgUVCOck\n82rGRbECv45j/bcmd9JBQffr98gz4qUU+TluKTgtzAksnwzLxE9pqykcvWKY\nsxuuVvwn84ydMTO6qGohEbIGyHkkO1K7fWhQpyZ/Qcw1R9k0N3gstkCm+dFN\nG9BzQiY50ZRxPIUwK5TvJmUDMUemJHqT6SCYBZAZBkKD8xyK7Xuxwocup75Q\noCkpFJtmp6WM7kStNmjVd5iHTqfYMyiqpM/Z8qhKRGPkdUtvzMFugHSvSzor\nT/G7h7H2iXcx88BVqh9oo55YqJ7AUIenQLRsZbw/c0xumRBcAjxQZwJjG9kV\nEIouttzC/rHWAAzUZgoBC4cY6CQfoTliJRHGmg1vwma5aIUY1EIPeUl8yaty\nYBeVKGXcLf7EdsQVr6UhON1jLOXVjAO4Oh6H8oifvANEUOJooFe6qzRVD3WP\na1w9MObCS8kAd8cmJRvRMAjd1NuTx3oIMNuAbjxKmGwBYyckGPtI0eTdUStP\nbWQJNyQbnV6/3EpRQjXJ1Nynzet4lrca3SnyvMcPUpYOML49AtRh4Zzcw2kr\nbJz0l4DlDMbutuXSGEmddTITiVJD7fb7v4JE+Cefei5LIJNwJJoH+46Uqjeu\nIURk\r\n=/RQg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e60204e288826d7a701d649c2d74cabc9f7d9a74","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.13","@storybook/router":"6.3.0-beta.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.13","@storybook/core-events":"6.3.0-beta.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.13_1622957411883_0.9594276232900365","host":"s3://npm-registry-packages"}},"6.3.0-beta.14":{"name":"@storybook/ui","version":"6.3.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.14","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"828d83a99e837058987f0e1ba86790d7ea2a8ba2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.14.tgz","fileCount":382,"integrity":"sha512-DWNtFQo0IoOZjVdii/5ZhbSxPj+STdr3Z7KyfLkq5UZ+buf0RX9jC1svnGYuQj7dO6n3SvUuDH01jDGfP3XVqg==","signatures":[{"sig":"MEQCIGezpEumn5X5YBlaHmmwwegNOzXTltumOYf0n0exjUsVAiAKxYlSgzM8YAPB5i2+RlEpYX1jGv+uO18m6B1GdFXZjQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvOz4CRA9TVsSAnZWagAAFLoP/RUR2LmVypm3mulv8+W7\n5b2iXvkcKN5LYHw2i5eNjKZq+ylYWsdi66BZNs2qvdRxXiPsvkQrt15yFqRV\nPvAmzQCy2nQkU6YtY4Dhj/pYmOYa57+ofahwQG/rdQ+ThnmO4rmFbHroyJ9H\n7ldGPyKU59tahnXAMZSomcmscPrcTnkVXtUdIR+YhznjtWaD6GhSJ7IzgfjV\n2wyn76E63emNosm1Zd55JZtrSnd6bgM1j18CisxljGElg2QZhlDegFVnwas0\n0xOG/hvCvcNI5w8X8st4FIBpaILZRDn4/T0S0rH5jYzYBS9ATW4UGgisdFBe\n3FbJxZvaJ3WacIepxY1jZ5RdnqCVV3DlHimjoUnWv0DcyI5UhOsAS4eabCW3\nnmOmLUMoAjZiUkLdtWCGvv1wIkdTmeK7q3r0Fpp4RlKQUBBiSFltcRovEkew\nZ1iFtW5y4h3eLNYsGl8C8nQnQheXgBbpJvygco4XElkSxEA8acl5raX/THLU\nsmHTjNp5dskV3TqVVcUgd57PDusKotB9lhIFYghczwXhhAQTj+9Khf4i7y4s\n5NPp/mRYFVEGNAcsbFfWtwtiY7W4y6/563zynuQSSbc98EeD2S9Q81o1lLOI\nJPfMYtxGFTJgSK89SaF1kbpYZuVWeU0BlYQebTgaKsG1dahFd90nGhcrVTKt\nkG6v\r\n=4ps4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"74af84cd0bbddd12669b954559c3f85001029808","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.14","@storybook/router":"6.3.0-beta.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.14","@storybook/core-events":"6.3.0-beta.14","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.14_1622994168036_0.06314761307946104","host":"s3://npm-registry-packages"}},"6.3.0-beta.15":{"name":"@storybook/ui","version":"6.3.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.15","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a914e7e42de8af48a59106606d566edbfa36d05b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.15.tgz","fileCount":382,"integrity":"sha512-1pXvQjF2xXmFfkul5/Ek7M4XsDOwAFBIhUHDZwQAsQPDYxfKoen+aub/o0qNTsCl2eSwjdZZ5hBL1fFOlR0R6A==","signatures":[{"sig":"MEQCIEiQTP3nCQ4/tJrab6KtacVl5BNlDJJ5gXUgwdjUWsUKAiBhvqeQO7aT9vil9O/4a3bCWR7lzMH9JKJdsR7SIV9Y0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvgcUCRA9TVsSAnZWagAAUGUP/ik6w7S2f7PhvsaMxORa\nRyllawiVIrDGRwALN48dfALqzjBmMJsZTEb57wtny7hkQMGo5dWR1enmNNKQ\nzLx9AIIm3/1Z6ayQGmoNQrpJq2Yyg9hjITTehhkopcgtEfsWAjK1+Ajml+66\n3WLqpKWvWxBNYh4w8zmHY1reBnrS5Arh8xj2prNq8VLB1koR2B1I2igbrnnP\nZrtv/YnA8wFWHkiRl5C9Epw1x9NnpBDeb2iVPL1pNKjWYqSIK68Q+NCcuGIx\n3PCa0NZGmB8mTKqNwHUPKFAMmLUBMTz4+tGa+HE+jpvO/9ybCDRmImFwqb+G\nLxgSIOenre+E4pOPU5ZXavfg4jcffvNM6L2zclBygYmp9qwzs+ppN6qNVyPn\n9HOg4bFduwi3QBhLMkc7vnir4+6/vW+veGqi2ZRF016XZ9GiIrJw5DJP6acm\nwAkITHEMRiVkeTquf1Rk2rA1XXUkbyF79ySKqoSQ/FJCvrgGjdjDo/e8I2cF\nLx29gUt8xqApjxM9qT3lbWIf7UcEOFCrm4TxkXJ0HP6wLi+lh0bsJz1OGIhQ\n9ma45XuB6ISWU7HGuKS31aiNkYiNPBEwRfnBTTdAYK7RjAoanHHR4iV6Q2Xb\nNFOgu1xnb5IREJUNAixP4XSopF/WNu+0RwJAmKSVImHQf/iOwv8aCXWfRGES\ndNxO\r\n=YANo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6b5425b747b6d4caf46a93b2d3d33da656e868a7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.15","@storybook/router":"6.3.0-beta.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.15","@storybook/core-events":"6.3.0-beta.15","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.15_1623066388513_0.1544021045804711","host":"s3://npm-registry-packages"}},"6.3.0-beta.16":{"name":"@storybook/ui","version":"6.3.0-beta.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.16","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"37610bdf5755cdea1e53bc8b837f2f8174ffb9dc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.16.tgz","fileCount":382,"integrity":"sha512-q6UVgnXPp1AEDfPeyxbt6JV86YgzbY268ht22gP6J3tKtyaVtL4Y82HXWG6TOTk4xdglxIj4sxwZUf45uZuHQw==","signatures":[{"sig":"MEUCIQD0xvrPfUaFtZsy86eVJRT2tkYH2O0UELC8dj2IIaMU9wIgZHAm96+7ttnZOYWCv93qXXtZC5b5D1IF4ByYrHCIIII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvmeqCRA9TVsSAnZWagAARmkP/RBULX+WY4Av8JGvK6Ty\n0XejjyVja6vHQDxEKIoNNpmQXPbRNdImY2i5WLzeCbbzNLl/EKFgXA+hOqSx\nNawyZZuIjlFCahtuhRU6zxhbM4Tijq0xEgFWt2+VlErj2MRLzVTN+jzs4BxS\nl9zuLkr2AnpEYRPvdSrodDeju+awRWXsKdVL1DNCceLkpXGirUfXiG5VU0yo\nMUVzn9maEoTlMn3oYXD+ocGRR3hUnjkdshUPoLLgARq3+6d1l5Mz0UapSdnM\n2Ev/1N7T5RkWNQmEeniS0FE76QPWOYiNQLwFLavzDrDPDC+wwOKx9HrLyCWv\nHPePAOtVzzJuX18Wy2lqxfiCOwO81bhbFsLunIJw/B5uMp1JIVsu4BxjYLiE\nHyEfK9gQZMj4Gu9GwnBR90hmSysHOYobgblSRQG9NNdmfmIJQ8dzfK36X+t/\nH5+pqiyP7Gd/GH68j6SS10z2aVoRF3422EbQUvJ4To6h6dYjCW/n3RCspE/2\n9DjTNIKnFPUppeQgP3Lb6PNWhmUoo5TSj9Snr7+HTmJ+jElZzC1zM7Qj+q0/\nNnyOXMlxx9D/b3PZynVyiE4/iuyiCSvvF8Y+2SUKwwcu3awetW0VHrZtjV6L\n3qTxn92SU39uVW+sKCzM9G6G+p6CP6z+mqzvwGHXYo3n+KB4CvUQaxx+caEj\nAOdZ\r\n=vBlo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c0c79bc820155513a61f98a1f7f3e97e9313a28f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.16","@storybook/router":"6.3.0-beta.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.16","@storybook/core-events":"6.3.0-beta.16","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.16_1623091113798_0.5018550283199719","host":"s3://npm-registry-packages"}},"6.3.0-beta.17":{"name":"@storybook/ui","version":"6.3.0-beta.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.17","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ec6baec8a116a017e2d78069b178e271a01e5f89","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.17.tgz","fileCount":382,"integrity":"sha512-Mc14I8xgdqVvEoXkSh57oyagmeDxCoAyAlhpR40ddcNO7dKau+lSP5PJtxmoK8BX0qyb7/boGkfdJDePUevQuQ==","signatures":[{"sig":"MEUCIQDCndTqYG3zs7bwR77R35+dH4pT0XAPph48SYdelnqT3AIgZE1sjClhGuNCAFobBnAYg8d1BTbTadbj2ceF0TS+maI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvvOlCRA9TVsSAnZWagAAdg0P/3mITVkquJS1K4yd9ir0\n0uJxjf0xABcmhrvgt1IBEn/mOhiIwDQS1wUVgsvH1V4ABYZg9zGSb5fnazpX\nytlcaPbjlINhmcbMxaeMK1G4lchm5RVo61Q05h664I8Nc7ElcrB4pPa4UF3r\nAz0SOMY1ztmhZIZmPF9mrRY0PXTudmT2cQjrUUpO8JDKZmD63nAR13zxR4iq\ngeRJRkrTBsmmrvf0zo63IF76ZnDz3uV2uaEXPmY7iO5XKv2/SBseK/xtrBsh\nuRfsTKLv/cKd9P0dBs4xmNfjcby3pNwn1CO6TdNc2686G0W0/0aiyD/pB2Vw\n1rFhQgrQV8bNddkMm0BJfAOTVv9sCtzO2rP/Z1sWz5njJZeOqTqwCGouSNV7\nM+wl1/I9gLi6vgBp9wVSyrJ6XqRF+SLw8rdbt6LSdbilopDwRefB4shHlfMx\nFhgLyoc9l495hfraJ5HDVgK3dTW780BXrIS2DpO74oUVjyyxtDSGXNXOPDmC\nUHAa7haomteWzoAEAuCQ86qOM2qPmlCtRJUcdbrLWEw5yDSjdTZUwJle3Hvv\nkX6py2Rl+Pz0JvlczytrgRLSSD6qAS75qAlDa7qonDU0TMGxk2XpTd5nYwP0\nKW7w3nBJrAO4M8hppJMKF7jTp5o4hS0Ex1H2QXtMruJpNN0xQBySpqeq9LwQ\nGDTl\r\n=SPAd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"71599e3d3ba5a90cd258a15e293de5662434a326","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.17","@storybook/router":"6.3.0-beta.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.17","@storybook/core-events":"6.3.0-beta.17","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.17_1623126948951_0.370361138585404","host":"s3://npm-registry-packages"}},"6.3.0-beta.18":{"name":"@storybook/ui","version":"6.3.0-beta.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-beta.18","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"69f348a16d6479dfcbc01b80a95e6d138656468b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-beta.18.tgz","fileCount":382,"integrity":"sha512-CWlH6IizNbwTUYVxw+EMulYlTlEEcsvKxIxrAlX8YApCEBnIyDnQ7YzI+llccMRmTblyiXKE93gZ9ocqvFEKKA==","signatures":[{"sig":"MEQCIAaP11S2Rhnkq5QEsoOzfwncbyB7inabBMAR2U+8SMOiAiA5LqBa8z5/sac4xayRN01pbTkur8sY8L3VXCf5l4uorQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv7bdCRA9TVsSAnZWagAAzYwP/3DRisFNJunmRSDel3UH\nrNixoMxgTVBl/nB8mww1BAFrX2Qihkw4671ckJkfvKC0Fg4BIB13U5LXuUQQ\nIGj2HbPsK5Ee/zod6YMU/YQ1mdgJpYI9et5BkpUHhDCfEKlTurxvJdmquojU\nRmSx2IH37+VKgJ21e28gAclChbRaffaFjsySbX+yfKWHpv+wLP4eSFC8qhaB\nq+7sWxEJ2Antyw1zAeT7P8exWx8syzhfSWRlE4UBORBuQKtn7wf4r7tQbh/5\ne7Z1ug5Z8bxwK4Vt+B3TKhhVj+jhsET7hxDPui/7WejyOEmWEm21shyCe7K/\nQskYZpP1DGYgnbu+R8wI+jrLBB/YGjkI0itogHe1rtfRDzaNsklrRWPW0bd9\nrSXjSg7D7JBMUlOM4CH6eqWeHnfFjj+jT7BDCvZ587vIlllp0vCP2nm3x/UI\nxA2dSjMKFn7mndn9fURP011ieOSWKlqjzJZi5Yny8Ri59BKnoJISVkFfRxuH\nzSOxR4GvBuZi6d6guuPYuWdE1yuQ3dLCoj3zihk/8XHqJFUcUI6DD+zWxsnd\nh+QYnWTPISSJmQurAs3J6yBiK2PfgEGXLt0jvEbPGN5gflIbI+zf4YIHGWFm\nY34Ns1YwF+2zd7BypkHCCvPCO9H8YlD4lsbXEKrafA7PPYJm9oX+odK8KxrQ\nYGlE\r\n=Qrwy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"68f6461027b867aa2a328acdc2c0c7b025ef9d48","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-beta.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-beta.18","@storybook/router":"6.3.0-beta.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-beta.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-beta.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-beta.18","@storybook/core-events":"6.3.0-beta.18","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-beta.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-beta.18_1623176924965_0.624245891360194","host":"s3://npm-registry-packages"}},"6.3.0-rc.0":{"name":"@storybook/ui","version":"6.3.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8f946fbbb87d60937fdb55f0179af8d8e5d73599","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.0.tgz","fileCount":382,"integrity":"sha512-3/ejtK4RuEXp6ya8IYFjpvZQT84MXP1VcCL6PdJK3tjbVkgDaDf/+Zs8wiMU0HRNdIs2ptZHt2g4eeElPWCAhw==","signatures":[{"sig":"MEQCIFPooFLHKOd4UZaE+FG8vUyEV8tABuhUOsxOFIG1QCopAiB2v85oJWHOJSxgyn3giJBeA2HQUp2HPVu38iBcdPQbZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwDhpCRA9TVsSAnZWagAAhHUP/iCSc/g+wUqaYOTo3tcA\noshgdVAUH8wKnyaGgDI92tNE4bx9xHkgrfwO2fWfSIVJU8rtxM87hLDykFCD\npGBoIlZnqCEUoUgdbcssS/WuzEfGdq/pMThgC+afKVReZQhhs3kowH7YdEKb\nkJJapPWZfAYiELjA4MtL5ESzkyXNimBsnb44G6O6iwqm7+5clzw1Eyg3+Zun\nUHNlFH0Yv1tw90Tts5pLGm2H1y3gI8AqJiftUj8kx25qSjr4VQN5zej1HuVQ\nJomjEK/msmMFNHyNLcwr/mmh43fn7FAkts/n07a2cTop2wQNIFkCxfSMm+43\nkT8UZ3aCFILB0E/Kx7YV54JqX7iQx9r5BmS5coD56eb1ciU0hXI/N6oUoBy+\nMH4GFef1s0MSMG52n/giuuxO7t27Qy+dUETnpxqYnN2qrW6ZFDh5/0G+OEKW\n+T6by5T/S8D9hMTfqPxd6rqEIcVUK7OBdFyZgzxiNGL8pMowqI04Pvsi1/nS\nTCtAgNPITmc5JUbz7xMvfg/bdiTITyebnSCRigODNRJjfy0Rwpdd0qYI+yu2\nvQoX+LrqfldfQgGNmLsNIjyeMpDJZ+fX0YQVyokwyFj0FxmUp3gJPL+j6rIi\n+36nz7EUmIwQu0wmgCdbp3l7/YBtcA3oSTLshMaBjkcroq0OWTORPawx2g8z\nzUWm\r\n=+1k9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4388d3415eec1726095a480b2d7fe61ce91b88fd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.0","@storybook/router":"6.3.0-rc.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.0","@storybook/core-events":"6.3.0-rc.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.0_1623210088919_0.58433395344199","host":"s3://npm-registry-packages"}},"6.3.0-rc.1":{"name":"@storybook/ui","version":"6.3.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"26254cc513caad05eae17b93f9761a044935ea12","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.1.tgz","fileCount":382,"integrity":"sha512-FaMkyKLTQT5h7WjXn/DJDE7n2nL5yQAdUNfVa/A0+egBv4DX39+sZkKqnZJ4XuO7CUnHvg+BmmPP7MBzdfhe7Q==","signatures":[{"sig":"MEQCIBLL/Sf36rF+GXuHK9DFiipFcVCWt1gKzGwX7cW2u4nSAiAhN5+6wzREL3iJzvuRS54Gq1YdX8Rc94tYzwLNafIgTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwYWlCRA9TVsSAnZWagAAYfsP/i+2FSlRPeaXi7VZzIf1\nzrZGUunkikHfNKMVtdF/DDRhX99b1qsEkNfQ11FswrwOyEMhNlBXSlgEaHc2\nH/La6ieWnEDHsVEJ7UCEyOByP8QoA+W/rvpbNkbxP2byp8Lzcz4KJdLUADwB\n5Rv1Gdsb1XB4EmD/Av9Mexf7flcykYGMGyixVT2IUkZ5nUZhpyDrXDSTxs7V\nNY64VErGSYGnlzF44c6UQwTAgyy+PmibkJRnYCE2Bh1jt1LHUh+aFf8PuZAR\neoUnhoGg37IUNEDQQ+fjZhSayUCk/PUQdacZO5Y+rPXJP1pe9gh5iWhAUdNK\nPF06viS48C4i1biv3/drn/FKG6MdSLb4NjxRoH9KIzWn/+XWqIy1zJsoN+i1\n7UYzOegm8epoTZyn6AL8eHh99OxYqbbY4JWnv3ibXc1IP3b2azkCmvHfnZQd\nYjWuBT+abIQ0YVIMzIaf2Bh9gfcrD++g2NBS3g+juY4EVIeJ1lxmKsPFGluC\nZSo+/572vlMAz8eu644s7JUAdWeknHN/uTjlKRZnrfdHcf3nc3AlWZgY01ez\nPEeCoy+GoKt5J0jWnY3Pt7FYw3jF2sdBmKA1k3PM/UOXuqwnsmey8JfJUnDx\nzFgF1SkIOylyh2RIr2wnYG+Kj6LAWpy1XUun2WQnOLbWw1jTUFUchqUW40uB\ng2P5\r\n=J6ri\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"87bfa0861f8664e076efffa7374a27891fae2620","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.1","@storybook/router":"6.3.0-rc.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.1","@storybook/core-events":"6.3.0-rc.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.1_1623295397072_0.921372684209349","host":"s3://npm-registry-packages"}},"6.3.0-rc.2":{"name":"@storybook/ui","version":"6.3.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"067fdde437944d79dca744f788443b81d5e0fc76","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.2.tgz","fileCount":382,"integrity":"sha512-DYUHZ34XbHKb64XeGPszAC5kzTc3oZ2v550LhvbH2YA+iTHq39Ao49sB2C87qycWox15Y+Of5bs5+gyKewp5ZQ==","signatures":[{"sig":"MEUCICr6jobXNTWy6Q/fnFgW6Wb9LNdJLmPv+VgugB7Z46Z8AiEAiHQqWLPoA5n3/U+5vAXtMC8ZkwtT2eOHgtlGbiJhhr4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwghwCRA9TVsSAnZWagAATeYP/iuxLFSMzO+hAtX65gc7\npFJMXFFgICqdIEnmZkWExIudEa5gKuQIoaeKzpDh9UsZJr0LzuNRejua9QyM\nuehAhfgs7rPxEP78tnKqCRxNkMZGyIRroXY79+3609vFmaeWZcudXeNztcSg\nfxEB7CINq0FZLCh4R1xU21nTSOd58A3xe1/yY4N9adc9cumKBnRh8LBH/StN\n54eMJEILrEet1g50p7p9i5xD4cJ/xg4QHQXd1b/gXwYyMRy/odJJuO6DcsXK\n+VQ7ju/LZKedd2SQOII3rVmdrAX4HGmhHm7hKPPcTGJtqeE+CUu/zpcgm7sP\ncPU+7zBLMROKEV8uyhBSTZOAc9ptGqS5dPSmpSDx1FCEBF7eeZgU7CuVpNII\nlUH2Eq3VB14C212k0vXw4jFoqyrRIs57tNN61j4UIceIXU8dpbHhaszSYyK7\noYui3cRwIwDbZTBN/kkpgeGKFDm/e2dBz1uwlEvnpW7bkjoL6VMNSJdfT2gv\nLvQ+5svxJisCvw4xR87QPi8Oziz3Xs9F6yS5lGhnhdEEPmLH8vycl5outBUZ\nJw5L6wK4TiteCxtUF0Q2xJDO1UM2ptKLJLB51LcyZJ49unzoxATQyvHqXjDl\nD6jw7n98t20pcly050qxMs7tjIInfGjmJ+GbsbcvTg0F2PszA2SFriAaMyLM\npkml\r\n=mk2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0aaad2c19224858494bca5e712b3029cd66a2f6c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.2","@storybook/router":"6.3.0-rc.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.2","@storybook/core-events":"6.3.0-rc.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.2_1623328880120_0.8310188335812996","host":"s3://npm-registry-packages"}},"6.3.0-rc.3":{"name":"@storybook/ui","version":"6.3.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0ec0d76aa39754284f71eb2ef5dade41b4cf2fd9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.3.tgz","fileCount":382,"integrity":"sha512-UlZGH9CM51fB74okDi41DLtJCaUjpPR1WNrH60dccPTLcgs5veIwb9eVRf8jBn+wJAEGI98YrZUZKxLE4lFY0w==","signatures":[{"sig":"MEYCIQCF6iGAlT8xKH0eJHsU8QEEEiCIm/AT9CJMtBpUrnhf/gIhAJ94TWJt59u/DXuuX8+HOuDY5jOrs0XUxXFmCzaENmRw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw1RcCRA9TVsSAnZWagAAWuIP/2I3goFCZgaRPAmoWpAc\nvvQxrYILO2skXXf1bAFHSLhFrLjIqeubuKvrD0Fh96VpijC+K7Bx57qsFrVF\nuhAPf5NILFweC/2n0pV3iKaIm9/1DTdbwo3HSWa9mRydb+unGxsiehYvbd5F\n0GZwrQ+72KWXiq70lWbbzM/M6jD/ys8yUrb2uuuS8JnBRbvVOGqHKot2GcCk\nW2jZWllPdXv1r+TM7QytgfN90mHGX4FDSAvGKS5O1rLtcpntVlwCQvANwLa8\n3jDAgMGqbb/FUxuy2bMbcYugXGBnx3PSgYLk/Ep+CxfHvJDPDB5dgMvs2B6i\nKNrzPiXIqk4Lh0vs3UugbUoXaUCi1mNt6auTBnFU2AnPdNYS0CC7zBaDs07D\nkYwG1RLqo4juiBdUk4pHPIzXK+8jJM82Lv5rJzgmkLboITbP7AaKaDABwJOD\nqo40PqwTfDTuDuxL+/ZW+efbYfZlk1q/FY/ijdJn1QoZ6FOWVBfihUAs95yT\nHP0g62OMNiOWltiou2lyNtbGvTetcjT7r8vGv8dGpq/vet6/O47PkU7c7Y18\nKgxlghzJBW5wP+NKgbpFjaFroQFqdKxsA4hn4W8b38dsbdDll7iTwV+9R2Rw\nrQHND6DfLG31zLMqq4xxvuKCL65BqK5xX7oSeH0tCN4FJJW3NNSPmsxxufkx\nVnJd\r\n=rgpc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"87dee11307023c5712abd524bd17a4d32caf9ced","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.3","@storybook/router":"6.3.0-rc.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.3","@storybook/core-events":"6.3.0-rc.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.3_1623413852029_0.02017896873382896","host":"s3://npm-registry-packages"}},"6.3.0-rc.4":{"name":"@storybook/ui","version":"6.3.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8f90570ba06aecd0a1a317718b4e2d24028a001","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.4.tgz","fileCount":382,"integrity":"sha512-vsU7qTntxbWjGVDp8Hyf4kazmDvpU0aa3nnCiQXjFIK+shK/eIR1IH+lQ9P+kDusTPArRm4M71/DBS8COTx74g==","signatures":[{"sig":"MEUCIGCnfna8ivG7Id2qljRVClyILra+As5rJDrIlJ1e89xWAiEAqmRwJAqJDgIKZ72CN6yXKu4lDbdqNp3aHOZm3bakVz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw5z9CRA9TVsSAnZWagAAxz8P/2xvjfGkx5GhE042D1Fu\nZ/PmZICKkAt3NpyGKH2SXvwzNJ4pOTwukT0RT4EOhlix501QgEdi9GHuJzIY\nIWZkKpfwLIb3wikbVU8gWbQQlh7TTPOqaznOjcqojYXQY55XkPePdFSVdCJA\nIP8WfyJPNWQlTklRLP2lsoI6qSjkZ5cP4WwWQCr1enjr/du+H0304dRNTcLs\nhKsq7BHoI/Ng6Gfczost2vkoZL+lcZ02QxB/zXw8yIiX5Ry6+RwZBoDF9if3\nvbMAhySNkLWUb7fppkQ/TCuBL9h2W8HDZTsz7pPVGzKVVsDxdSILpgbU1kYn\nbcOzDrCDPu63pjIZy8qXf7F7+p9JBAJD7/ZN5/iFIN+YfYOnke4HAGbWtF6v\nNASHd0aUSemGTQGHydCFt/HmJ6SbDQT2B/FWUMon9WqCjYX8h6zi4Zmz07f/\nag5Wk+WYGyzVwzE5cldVwXv2TLR19xlR3Q+WFQn2vRJ9nr7Sm2n9utAwcX6E\nzxrRgWa0AIAo3TDdwcXY3tekMSrzxQWqN0X1PzlJNxT6QzHaIIlOymsbYHB1\n56p2jo8dXfiSyo0cXhbyFP+6R63kFu3f68ypOUXk9O15g16nCAFYli8pi27G\nrMn/XnB8YtWRsYFaGCpyqdU7N+GtkpqqzzHH8utH/H9iwBEftQ7/tJfUDOUh\nOe9G\r\n=5GkO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a83fc8b2c0c13c901e09092695f29587f9fe4879","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.4","@storybook/router":"6.3.0-rc.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.4","@storybook/core-events":"6.3.0-rc.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.4_1623432444942_0.5471947428945472","host":"s3://npm-registry-packages"}},"6.3.0-rc.5":{"name":"@storybook/ui","version":"6.3.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9299a88a05e8e7adcd024dbcb9175ec72c9264ea","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.5.tgz","fileCount":382,"integrity":"sha512-cKfIvDYGRQp1f2qSUzZAjuS07nUIGnMrpM9+LKmxOk+lCQl6s0mITyfhfzjZ8EzRZlfUyhcTamgIYlpbs25JKg==","signatures":[{"sig":"MEUCIBUXVT08dIWSajHraGwPap+OlIcmS0Zf/ldQbpDhCeOgAiEA72zlRMnBKdmWZ1lvpB2CALr/EcDhAQYpISF3uGFs/4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx1f9CRA9TVsSAnZWagAAYl8P/0I96Zlkl+qZCH0bxBbR\nOQrJqx6YF5/1SX6J/ejSTdRSuO5wWtHno/VK8ZegKKjx+0ppotbDRoDX0SN0\niULXD2rM4SbLy50wA2g+lJdh9/z+MaDZtkXX7hnT0t8b3DTVhxcUgoS/Cpji\n+xOld4sO6rufVlJJ/mjKmgKgBq6A9dAeT+HnN5lu++HTVbN3HDoEJ6JNyjbD\nx9MfxSA5846XTUM57I5WF3+/MnP+SnXbPq9OluMvov8WL57MvjdQVMcslAMO\nh0yWy4EC/8Y7q+ryA6kzE0/NPKkXhCmardj4bPOwOlB4yXXUxETd9eCX7Wo5\nAmlzW/hcpJ42GGmFUd1euau1Suv0AF5qZacFZxIPjzVTrs+WIFjw7Gzys2dG\nMepFcqFomHqOk1XevAoC9+Ivd8zwx114TOaMjfGNNvYJ+S7TyMufd1ERHZnh\n6RAjpv7mcbU8TcfV/2BM/rjT9f4zjZfMQCXM9mK3Zy2Y6/65ywBADK2V1/ct\nSWrhcueX3A94KFr7WiXbTzsWC1RhuyrHudKNI62v/W4YscES52jXtO2Rx4mB\nwQ69fzVd1uXa3wPw6WOtUKp7OA/tMouuBvZOflhyd4UiDNPW7T6ayFU7+WGb\nWU45ir5a6CJ6ykXkvDdcncgbn939MiNGfg6HvmHDNhXK/NrBLCyyHMzT5Hj8\nAXuY\r\n=3qtR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9fee93508654bf56f3ee9f28a884b43c902d6af7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.5","@storybook/router":"6.3.0-rc.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.5","@storybook/core-events":"6.3.0-rc.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.5_1623676925583_0.8965719237557588","host":"s3://npm-registry-packages"}},"6.3.0-rc.6":{"name":"@storybook/ui","version":"6.3.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b999b1856011949fb91eeaa420d6b25f1373ec62","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.6.tgz","fileCount":382,"integrity":"sha512-Xtxgm7lZ9xwDj1ypyos9u/CyQoQZhZBROoS5q1iXnAttc6Zyji57b3HbtpDzme0puAwJo6Fu8Fr70KOdSUYCFg==","signatures":[{"sig":"MEUCIDUyjE8uyjzp7xHacMAD6VhTfYFRmu/Lvvx2jYfLoSJdAiEArSjqEYYCScFJM22NGDI60pn7ky34F0MGTrRWvjrtLkY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyC9ZCRA9TVsSAnZWagAA1UsP/0eD+hY3ZoFPDfGz2WRB\nl8VxA3BZZyvPNevrGu8fGNpBdT43nBfoGYcgd7Gb/55ZpCNZJytNyfdRBGC6\nioTLPyc7tI39jIEthLNSeGvtktSg3HON2T+84NpY2LMcLPpxzUX10qNOAFAF\nr66oHOm1Adb3EEv63EWBvN1bnjlSnnF1JICkysWdaxRI2h3DzO1a/Pmu7tyz\n5XiBDLnky5mpDqrQcjEq28elSIv3XLYouWV3qcHXdevqAGy9IYkEJYpIe7bQ\n+1iYtZlEHLxG7KyNWjERNREWb/8ukV5YOmxyIyfZppAX4Y7e0lWnvttSE7j0\nKJt0RIGJxKujnYfwXOV1IV8oXHNygVYZuDIF0oMGajIQmXycy/HRU57bvKO6\ncFQxVP4h7ktSDesDioDOoDX0KWIhY2vJo52ZhqUc15jL9nCyuN09a7/MOiCN\n0g1Pyv9Xq+P+OwkoWV3qI5pOO+sDmAGcNsX0+1xeZDwoADJSeGgbMSwXSlSa\nESKDV7QXmLgG7q49AAjUibm6WXBeqqOLEOqzOQMIFQinbxTdQSrD6ohgtfFK\nbfxb5LyxhGVMngIoVXOHzoEHoqUs7fpQieLYQyl42IV9Ag92Ry+8S2zp+6I/\nppUk3o7d57sIqR0AmyfciyYpATmaTo9AaCQ6i2pU5+4RhrV8rJQRWRtlLvkE\nGvbJ\r\n=K0Qb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1aea11bca9f37e3b18ac05b0cace7b2085be08c0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.6","@storybook/router":"6.3.0-rc.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.6","@storybook/core-events":"6.3.0-rc.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.6_1623732057097_0.3779484202770842","host":"s3://npm-registry-packages"}},"6.3.0-rc.7":{"name":"@storybook/ui","version":"6.3.0-rc.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9271e9d0e0acc13b9be93e6822d34f854a9c0d16","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.7.tgz","fileCount":382,"integrity":"sha512-RA5R3WMcp5Gue3Ma/qR/J2aL9/vsqbPDtvdqRQtgrPfwYgHD3/+4sR9WxCoPmhYzChaycIlczTBivt1uY2CeWA==","signatures":[{"sig":"MEUCIQDtsmSTvJ0giXVC3YQ0dzZZF6UcpspmRjYO8+pomfn6gwIgWwH9Zs9f3m6PAQiQgvKXa2IIgRFQqumWU8LaHWT0y4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyHPACRA9TVsSAnZWagAA0oQQAKPG28/wxCPFVlWqiUS9\noQ3EAw+qkXHYIjggMnWYOXPMfgpT/yjsO7PVQXgKcYzyso3LibO2/pmXYiuZ\nuWshs0I1ObOlY1Q+DBfva5Yk0uhLZTlMZv8SefUstTZeuJst8SV+VFHRUPVB\nX0w5npCxBhbboOBXKaPFDSxPsGyii4W3qYW7e62jCIBhl6GPdIMxjaV1Sov4\nzn8p5hNrK2y47XmO+MFWfu8udP+1cWo2bgQfpj8qaRjVr1lVzPM/7vyiprW8\naDL+x0edBYqid2vpwJujmS3acJXTQU1JUVazrHC0xIUTGjAI23GYsNlwnGaV\naQIFcW+MFrvabfrfT/t5GxuX3ynqypOQ/DF9cXmPCXrPrYypw42A8U69ryoL\nIuykPWG2Qm7lcBLas0tvLSDVmKvdSXgkZ4BLL3UX4WpIRKeEdoE9ZAtz8JyL\n7K7RgEfr9oyRKHRR9eBqJmqFp9IHehiVnJxSjLfrtj/cmwI9vIF7v602U8bo\nUnV44IUVf3r4xNYEawssbXClSfcXUQpRb0GHldn8iSV146Qd96VBp7so000t\n1yUSlxzfogYM0k6UxvmzohWYpvW0cG1Asl49+7nssoJqXh5qCHp9wYNZWk72\nd+dRpOhDOH4kA9juwKVU357fX9oBmMWbgWquCC9jnyPOkhIdiQMahHf66UJp\nwe8G\r\n=L+Yc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b85b77d328e02d5f71d8966a26a16a577701aacc","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.7","@storybook/router":"6.3.0-rc.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.7","@storybook/core-events":"6.3.0-rc.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.7_1623749568191_0.7856862029013978","host":"s3://npm-registry-packages"}},"6.3.0-rc.8":{"name":"@storybook/ui","version":"6.3.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9476e1ef79c41aa3f7e7afb7103e263afeac8ae5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.8.tgz","fileCount":382,"integrity":"sha512-iRypnXf49WrI1dZSJsJOQBROtfEpd2R6t8G+Y0OXfvgQX/iKh1JZVveIX7uSasNqbXs0rLRPDc1iNjLrStO2qw==","signatures":[{"sig":"MEUCIQDD8HgZXjGiQFdzbB8ckK9J1EnOlLP+eioIcqrd4/hNhAIgTCfss7NwOTUuqPVONLXk8vau9detTbRhmJ3Uupv3YqE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyh4BCRA9TVsSAnZWagAAzakQAIkBlqZ+LtLd0nuc2mEy\nfdZoFi24KcBtBX8KQUJOX0SCmFCv1fbiRA7cx/sbONV2/VGQvBUo7NxGg3if\n1DJrkt4kj0GU1VNpAtj0yoDHs4XheWpXV6FQuB5uk4jvQlgrJKhAjIl3/z+2\npG+z3g7/YZQzqKxmNkB1Z+Q7lJxbZYZF1vqXJR9B0RMxVi2r4Yihldm2qNjg\n6yPM/EFqkySpdJGw8UQbo2DCALjXMqzad0pTzwD3f6MNOo1tOYYUo9cFhLVu\nX7cpV+hrY5SjIKjsgcjPdqY2NBgTJM+gsLcKC07Ya4Z06BPe/OF3InRbC0hz\n8fPNNWnJdOEunrNuY1VT0nm4vFAtaRSaBZBb8r3w0XhHLaFR2J7iLpRrXKEt\nCGsbZyt+7nvUONKbv3AT2ScNMsddxNpukm1VlXSRsTpUdcQhEe+xb5J3DbXu\nm3bAdPjgz6Dpu/fo+ey5v03PI2/jWQVBpWUGF1ffI4nVi0XqjWKv0vHUXABf\n0N/zBgpRSspFB8PLxQY5ikIiZ6fMc0wFYacXWMmfpUs2eTSSJniqxsNRe0bd\ntS0jpYo2oYGfCvIGOmBqEUO04beZ3vQPZX4fk1yzpNWYYez200nYh1/cXtWI\nWrpASRjxT03nSfjzNMJ0oF9QWRUBBgoXiKoArKG4QOyaqaN/Zb1LsygaImTA\nqEq1\r\n=fYI1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a9256a360ce67dc2eab408046a4baa4e13430a8b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.8","@storybook/router":"6.3.0-rc.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.8","@storybook/core-events":"6.3.0-rc.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.8_1623858688961_0.363999722706537","host":"s3://npm-registry-packages"}},"6.3.0-rc.9":{"name":"@storybook/ui","version":"6.3.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e17d32f1bc536f4ee29abc51aaf4eaa9e7db23a3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.9.tgz","fileCount":382,"integrity":"sha512-VL8HQNw0N9OyK3jBx7bTzED54/RtYhnDfdAkbNk9bki8mKO0dn4AppQ95LpSza5frH+LsNPcXj+96iE8qPKZyg==","signatures":[{"sig":"MEUCIQCoBljOzdU2JER7DD63H3iPyGB+7UDLkFdjROmu8E2obwIgBozxNrWt88J72Qp+p+4GOyPyWE3/unxu0ORONmNm+zw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyy44CRA9TVsSAnZWagAA8WEP/1h0nl5WWl9fekLjOb9T\ngR2EeFdbdmQ2ZVlPtJhgFRyU51nhjbp+ddv5Y2pykyA8YVG+t1IyGzfTinPb\nkEyPItQGEmLf5OEd2QyhmKkvijzK3dc0ZINXcrmoi4CeeiHE94AWQ/IivE20\n6UZBdUE3cwEOae/wXHfQfu2KYAifYE3IeFqCKEuBNgImlSIk+LfgnJErb1uM\nkrukZyOwtjjjOxR3xm+ddctCdpnTp4TenHUCtmCRHhKoh3cI9Xaody3qY0Rn\nvhJCRQ0sXCxaL1p9tw9g8xylGgmAVI06KRVMoAirwC1OOme+XP5sE2v5Oe5l\nXbRFU/2JCc6d2Ft/2zQP/9L54HhYF35lvJXCpnsHJk2lBmhZVQ0ADOt/tel/\nngDa7F5t7DwpCgzrObSi3H78ANqeehqsSL2Y+S5oGGidG70qJ3MkO8JNwBFh\nunRwAGL/n3InDhaVBijiiJuOnHa7+pOglAWzBBCtCgBehp42lLRTVXvCySH4\nvfzCJdEmkbe97rfBTEFmJgzvZ0s6hpv9oR4+2GjtpNiIdIhbZ3BUQuO2wzXf\n3IMB3NIKxZ6qOG+xiuXYZWn1l+zY0JKA+NxoDwCJ8zUFtX7eRm/K5YHzp2JX\nuP3iP+RxDiGKsFruE6KSvRdc9mqpnq0Zws4G7YXSbwvUbLLZmm27BP9RhlOc\nBVyb\r\n=iX7Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0be387fceb10059326232a99b46c8d2a4a54beb0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.9","@storybook/router":"6.3.0-rc.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.9","@storybook/core-events":"6.3.0-rc.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.9_1623928375587_0.8936527623371862","host":"s3://npm-registry-packages"}},"6.3.0-rc.10":{"name":"@storybook/ui","version":"6.3.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.10","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"76c139abd31e4f3153bc2d6d9c8cdb8a14d7424a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.10.tgz","fileCount":382,"integrity":"sha512-RC5wLA4M/EeZyH9pHW3VRQCsgAPmyMVeFL3ibYIH5yomqX7VCI3E845Q7trB+XY1dShU7xV3bAYgv8Ous6h2VQ==","signatures":[{"sig":"MEUCIQC17fMMRE3IJFdnbzHy/DZb/5+nEZW9a78+/b5kuue1egIgdFvvn3eL+yhhHm2wT+WmAXwIpA1btmLr//hYtwF25vE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy03kCRA9TVsSAnZWagAAbMQP/Ri+gCYbSePllz+m1RYA\nvzqNcTDCH4r4hsEMNg/TQz0Z2zvujPfGoD/hf31A7SMBhFEYtQTNCYw2VzgZ\nVEaNpZ+FrGmL2nB4zGl9EuSDIw3UVq6eqIks910NE9xSLyc19BzLbAsg59YB\n0PqPYsPhyhNwhi9ilPaz01nmQA/0xwnG6B0q21fJnARfTCsZMr8LOwlj2YFx\nJ2YuLjlMjHEEsMe7MsZNmvPPh9ajbEg3aT9Y3rdKlNkPhxbmogMBp3qA39Le\n4yKRPdnJg2R+J+cgfUlCsneACmAEYNOF7Po0uqlk849fC935RihyprxMB6Zx\nkidoUvvUP0f+ft+gD0a6hAJF9jn66FbRdZm+JCdLJ2lCveS59LNRiDbLeIue\nxiOdImHC0jQxZy6/iLhZNjrph0Bi2D9m3sFebhKx+a34q4NfhsXC1YqTLjVx\ndRDERYI6ErQALS30OT2NYvIthFGRcr7tLvx6if8ZA2CMPzk6vdFqR8hOEIbn\nQo6uPluZBJOzP7/NqWxgqbWjy16VnipfmKtQTDxjlHtBAyUf1WZJx3Ul/q73\n58ldTWnbSLjrtBy0xPBvHd5ZU7kzuvs278Jz/ixBDpuep2u0AKz9rJT0PsqT\n6EjMgtMN99XFYpErSnsTpJdDdlsmbIMUZyZ6Du7F+7Sl1Zb+++FzW0EM7hN3\ntSen\r\n=Rzsm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7e32d1d40524ba71bbdb84194aa1484ae02679ef","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.10","@storybook/router":"6.3.0-rc.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.10","@storybook/core-events":"6.3.0-rc.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.10_1623936483907_0.31743714648226584","host":"s3://npm-registry-packages"}},"6.3.0-rc.11":{"name":"@storybook/ui","version":"6.3.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2a01b45fa19a5549463553ff2cca60ddfb9bb803","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.11.tgz","fileCount":382,"integrity":"sha512-4Awle95YDb9pkoRvQkL5vYuGbsX9vJSnO4xlTPV9Mc6G+MiBf7PSWgRmt0pOTeQTMON5zxxOylCallEsAQfIkQ==","signatures":[{"sig":"MEUCIQC2TlsXH1tiFrSSymV2kT+WjoBy1v7O1cL6FaXUdnFbEwIgJLgXs5vo+a6qVvPHJHYaz4j7SjA3m7NVwmBN+yv9m8I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzDiRCRA9TVsSAnZWagAACkkP/1LgLKS2JmH/elnfsJXo\nzqmBGLQoh9VQDWACLeRuCG6M7qXBNgJcPmfpk7yyrMdije3ks/ti03nm5Plq\nVjZcQ4y/arsrt0ljIisA65mwLyKMakpgwaVK/696B0XGeD0ssgJsZUYnYfwi\nlQ9N2ACRqpVOI1VxWzRE0hMHuEfKVzZgZz6VLzFZY8lVKeTDbhY8KO2cd7AN\nrBVGeUY7kavGnpTlISrhn95il9AMklsge05AIkaYXu0wVgRmAHixXoR0veVa\ntnZN16o0V9R3BVk2v+/7zgDmXZSJggX3jgepxKqvmBdytq6JFBeu5Ho727TA\n0gQVERsO+vWcF6IffbSOQOJczq3QW5ppjgc2YW0knn6oGJHFt8u8e1eSLcFm\nHjOBSSQHse0FRd+rM0Qu0xW/SCQL1N8AuwTJlj05mIuNd7iJuN5y9vBWyWhr\n2NLN4eo2dC5RCRNxcswURiHCBfZerVO1LQHGIktUpC6Nl21c8JYObkjjdAsr\ng6nHXVyGehHEJ4PzobrWAfXfMvxdTsx0sSAZFuPZU4Zg+A3MYB+KSs269hfw\noZJ3QJJPiEKEP1PPGkp3l3IKJnG76kMzrAzkI9tlXHQwRstyUpTUNzkyIvww\nGLJpEdGG3U+ucQONboT8OoJGeM971d7XYGPeJNcWtgE5N4xUKedJ3o4hDQZ+\nxgG/\r\n=4FRU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"db9968a8a241edf423c5780e229eca3f5e5ce773","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.11","@storybook/router":"6.3.0-rc.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.11","@storybook/core-events":"6.3.0-rc.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.11_1623996560974_0.1652456602604695","host":"s3://npm-registry-packages"}},"6.3.0-rc.12":{"name":"@storybook/ui","version":"6.3.0-rc.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0-rc.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"707dcc366dda4fdf0365159a2a83c888a4fb86fc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0-rc.12.tgz","fileCount":382,"integrity":"sha512-r7Zhf5PlEuvxwg5AZM2w/oNdOPn4lUY4lYzUidLom+99bwQ3EO63mRhsbqrpDDkjqsIwB0O6Tr4KnLC6vj2yUg==","signatures":[{"sig":"MEYCIQCEabhN0SYeDE2YnvS0YIiRBNAg02GwFaoQAcVdamgvpgIhAMz0HEH6E8J15St8Tk4B6XxTzmgcVqH7yjYKPH9ZuIxZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0sp2CRA9TVsSAnZWagAACxEP/j5PudTGQgcr9yu1ZTH4\nAbiqDIbr4l6ytOBmuavkEMvstcMQVH38ZXalRFYTYYxhA7IP2LulRqit/XXJ\naTxe6aQjfJ6fsCJdwUy3eCzlmPiORPKjsWCzPfnoSyo1zzYgIvMgN7OPbsPq\nWP2756ULoigcbKbBnHHfHtkjbmgKDR7Oojmj4b0KuNSdB3i0hR+VQs7/6Z2L\n636QJtIlzJH3Zo8an9BVr/E2iEiM1EUxrmahdeURKPNTa92BGpBV2exJRdC8\nYlH4L9Y+zrD98miHBQHan7EhCfQz89Z/nc9VyXLIxu6gdNTK7pZwzkEwz76p\ndbRGjlzrL0gG/0xuvxBRjhCIYIrl9SCBHmxYDp9JS4K03e7L/2WUBI2yZwYb\n8kIuo6NaeL3dsLDjwqjONu/g4gfpXJZW+FToHX5oV7qVt/xLo+xoEuozZ9g9\nlz8xnPXpBnZ+aa07ekimOsGNRLYeqRL5odNqfCopWs2WdYZJvIWoBSI7xCHo\nB6Ks6Aj6zQMFmvKy4XG//iNuM+/i6OPKuBfZg6NsiRZCaaSaIwV/YtUM2Wqt\nXde6wQGn3dk4XkX0FAyNkYTiRlDJv14R/NnmjLeo0o/B4hfEuu7cJgXAls5h\nvFF1uPO+TvyqsG+eCnwpU9P1zNXGQyPTTKZFugqeVmuPBjQDf5Yjyl9Q3Ieb\n0iBK\r\n=dAeT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/master/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fa3aaf15f513ac1f8bed8ef84ac42a2a33b1b74d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0-rc.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0-rc.12","@storybook/router":"6.3.0-rc.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0-rc.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0-rc.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0-rc.12","@storybook/core-events":"6.3.0-rc.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0-rc.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0-rc.12_1624427125781_0.16402442631876446","host":"s3://npm-registry-packages"}},"6.3.0":{"name":"@storybook/ui","version":"6.3.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3a17689c76d2ba2c3afadad2b5d0cf41abb74933","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.0.tgz","fileCount":382,"integrity":"sha512-1f2+IB+WRrBSht538jNFSUDUxA8PpEOnDkJsE9PyOJEvskV/8POuCTjbpcvdBYFQ9hSq1oi3535mdbNiTivYTg==","signatures":[{"sig":"MEQCIG08lklZI6ja4q3q83WBbE5yXDDqh17g36GzxEse5ofkAiATwLy4QzJsXBr99N5rxk3V3j+aS3y6c/okCuR9Be8TJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0vnXCRA9TVsSAnZWagAAYZsQAJdsqX6It+m65uIfMbu1\nPvknJqMOMwkChfhNuxO7e+ugDehGJyqBWqrYPqajcLI/JFo9Od/DLZOFwUNW\nsnvpGpJLSS9tzC/cENgv+wobt4PWuk5+Nvfi4jpLCJdQM4kVQDHy6HiloUWo\n7cLctaMWSfefb8Br/1YUpQYX61p6+l2P40CsAMvNsd8JjqyveN7fsUueil3Q\nUfIvqw9topIzFlAUiU8CStgqi2aMO+3E943JwnNAjsGOaN0tGNvxll45KgFn\nJLUwcAWlfiK7Ssvi+Mbt7tMSQfTAnwTCY4A5xbrRR/z49XNGSZtP21Ge3k4d\n5x/3E+Cu/SBGuQgu4lACpNqLnk1Wz2YUtPcq68bHexVbMcacsb3oZeQ0Hq4z\nf2hDblxV8IkKV8FCn8yJlvCL0Ba2cM1q1TbwF667fRPbrPhNmV/jpDToo6mU\nMMYjQJa9q/uPnTttj+4V0fWUpPBTrVhH2WNtjn45Y7grv2rdgeoFeuvDNW3R\nDx9P2bGJbA/JD3blN5Ht8S39FOy0CVt7ebH71CPBMLPKE9XjSjK1ZD4aNl1s\n+dYBU4PI9OBASv/sC5/kG8k1Sg2sve402oaBL77tSEBixtbtShHwwr1o00o7\nKbbmtYJ1qmZ6OmcXiUWMKOM03rhDxSgSjTyfTFUaTWQHIThrHVHYquNT3a4v\nX48S\r\n=NOCs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9a381339dee8faf13933265cf2600577ca2c20e8","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.0","@storybook/router":"6.3.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.0","@storybook/core-events":"6.3.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.0_1624439254886_0.9256411579280723","host":"s3://npm-registry-packages"}},"6.4.0-alpha.0":{"name":"@storybook/ui","version":"6.4.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.0","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1e8c62d587249c11def76cea701a39fbf8548cbb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.0.tgz","fileCount":382,"integrity":"sha512-5n4UUG5+yNgRNh5Pvampbkh1O/kOKeYfnqLwnW1jutLlWbFRI4BbJnDMsJC/RjdXxMNncJoKZXZte8R9+zZ18g==","signatures":[{"sig":"MEYCIQCOtTEVvivCEsManT34ZvxnJPzDTZve3USj9wpW221hZwIhAIVJYieobgKumilXvZ/kt10SvMpMvZC5vn2TS0AcLkl0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3542675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1CojCRA9TVsSAnZWagAAzhIP/R1WwDUo+ixkLyc1gxkN\nD7ArdoTpJaDX7mgtZ1IPj4CLpS2yvO4LfGF9u7xz/WnhOMHHzNNdf7pJxkYh\n90Prq+kLMWSnnG9akvt/nvZioqRDWwkhxoNsPl4Nv+VjObP9qm2ZQrqoWRFz\ngL/ygkWkOM7/eoCj/jdkacX86GbqgRYCZfNc+uGbp67D2+aCz68opGQZPhS8\nUxrifkLvhDWZszlsHfN3lOfmqU7O4FDgmMRqtJvvOB7BGJa2hYg3ZvMB7OmJ\nSUxr64mlkuoPIwvWFz9YMrGRutB+NrFi0GQoNG8zuxyHsVxA4BCAZVnX4i/k\nH96TFRHk5UpPnAhvbfv6IB6mrc4Fr8y4XqeD3sWKyaX12okYvDHu9YcNNGi8\neBKDmMRcjObmXoVO2sSW4M0t58ktpUqEVYVyZ5hept2TtEVN4Mxn5JV3CuYB\n+hF54HH7HL866W/UKrRokXw5GNwnguEg0j5a45VUgh8uLUHYAoCLDnRJ7T/d\neyb8XcMKaM7qF1Fhv6zVCvhDHrL4bMm2Wx2b0ztLlB7C+qh5x2tRpdegPBF+\nwSFoDlvwt08wevZ9NOn5oIDnuLWtGsxU47LWE4f5CXCF1sdcyOGbWPp3AgzV\nQH0Kl0WjskTo2PuE0wftrJoyqhVLsK4lkTTnaIBr+nwx5SSpx/+IJSJ/xPo9\nERXA\r\n=z5me\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"32441319e4b2550b1887ebf38bf228123ab1dfcd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.0","@storybook/router":"6.4.0-alpha.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.0","@storybook/core-events":"6.4.0-alpha.0","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.0_1624517154695_0.22012777846448328","host":"s3://npm-registry-packages"}},"6.4.0-alpha.1":{"name":"@storybook/ui","version":"6.4.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fbdc9124a1b09ec3b3c05fe5bac9522f56adaf12","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.1.tgz","fileCount":382,"integrity":"sha512-0WF67IOaHjIm+VafKxTc36BL0FRUKmdj70yDA+s7B4WMvM+Uq5wT2j8hriWxUq7Yu2FR4chlIjwiXud0iwaHAA==","signatures":[{"sig":"MEUCIQD98qxuwiOcgz3XO6CTlnJBsS9lCSz1AWjN1mMyhVju5QIgfJ/ZAtbc3UpCLcmjmWTNWP43dZvZJ/bshzAJo99LNO0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1TDICRA9TVsSAnZWagAAqXcP/3vb23DbriZHOB6sWXI2\ni4aYruv0c/FoFnpcvG4PCzhGJk/NKdrmKy46C1dpiqnU9fNMFvpGi6+ZMc6N\nZx3AqCM3PCu4a42I30DgaNMPqmBqJacBGOU5c16DcLOuwzZWNZW0MsBKb7nl\n0QMMGRgYjp6I3GYeiAiPUU03NJK9fstXmAd+dijisbnCLtjV074NOxY38CYv\n/2V36xgp4r1MJN+idinG3WXK+OgtS+v+V7maHSSR/hVf1GLn4kxCgHflkdgp\nC69NUtyxXG2jugJmC61uSt5Jh4K+mojo32mDQUPNIdG/S4PIDTeXQAqZOb+0\nn3sUNurS0BO5xaPyEdSO1jxrKcAhE2yWlrM4eXPxwXkkk66cgF8OuSJvuGZM\nhTCYhABv3wUBW6dURgKdwXNx/XdVEHJrKEYD27vhDIYR1B99SSuAqw68Qba6\njs1wS9WpdN26s6IGTIB7bcApYyvPU3y1XLd1qCogsRGldqu8Soh39kSNB0Yz\nBDs28gzLWGxlq+tslkPx62TvL4SjinEQNgVf0XVYbcpDwujJU7Llz76+o/im\ncykWY6C2uyoIYJYOT3EwCjdh36Kf+TELCvLDQGrR+eXfBgPVICRFzEt6cdeO\ndAMf8gCuaYJHF7UfgM2G9jgNlr8eqczakHHpJC7beJ527zkw8wNkaXKWaGwX\nGBgO\r\n=ZOx4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5604eea750442c054348faefc9a35aa6d25b1797","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.1","@storybook/router":"6.4.0-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.1","@storybook/core-events":"6.4.0-alpha.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.1_1624584392062_0.48662914864019147","host":"s3://npm-registry-packages"}},"6.4.0-alpha.2":{"name":"@storybook/ui","version":"6.4.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"501ef5af8f418803d465b3d2e23b42de4c617ba3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.2.tgz","fileCount":382,"integrity":"sha512-e9aoNk1KWMFkNG/vOW7tExCtPrQej4jNCjBBaxXPK2qMnl+bPgIzj7oH/mt1NaarjEmagNkcR2oiJFlJgSE2qw==","signatures":[{"sig":"MEQCIF8QBpcfz0hjj95oH9QpjWpfWPYwCfhGGp03SQdqQWrvAiAm5QfdYTNjd13UexPkc15u/l4UEcgdFy0sDBgbjO7/HQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1febCRA9TVsSAnZWagAABHYQAKNtc+aUF7OYaX0oTAaA\nk/9TRXhaY5gLwCYFkOciEuTSQHnryidwSMZgjMNd+N+aJPJxpI7jOOsG64J9\nFYwzSdJ/GEp/e0qFz3awdwIAXcOl5qBhE/Ru946Nw+KwvKS7Q+CSbOIrAS3j\nZLEp7b2ZJdjbqEF0ZOK2EGumqPB9mtZ3vALDcMlt6BhHd9q16N/mrYk/XXdN\nnm7WB9YtqPX9whpcBCRuozwH0lAp+GxJe6RQ6OCmUkCo6Z8pn2HfJkKNwP7t\nSW+64gopo+TvRrrZClBN8/ahJM1x8WQ7nVpI3KTEUx5s6ancYvlu4XvKa6eR\ndfp9KEJs5BbQ0lMPd5LAeSdZnvXUwRDvr9t2oSevXlxhqHkFSGzI2CU3zjbi\nD3Z9Yp4YvpoKvh2SzuOn3u8UuNuKu2DwT+zutsmnrF3JTKNmG3fULqnVT5Wb\nQAVpW0YaZtvk49pZ8bY1jAdghsrdPQWqxjgYFQwiXssFPUNssQj91GfS1+QJ\n6WUJsMo0+8k/6Q98VDOd/nkziq6lYMdbO/RSktONRFX+f2N5hqHoNFW5551O\nkC7ZiSO26i4MPpbpz4UBqXEBvj06t+1BKKgnYRNN3EMM4WO0R8mOv0BW+YLD\nx6ZRYxrq1+l3v0FxoGPlWshfa/uy97/gr7rgONxo3dlAK9hCMurKzQpcY3B+\nzego\r\n=UILG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"19aa68350e8f7251d5a82d6357aec328b71d2dae","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.2","@storybook/router":"6.4.0-alpha.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.2","@storybook/core-events":"6.4.0-alpha.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.2_1624635291014_0.5375309810976643","host":"s3://npm-registry-packages"}},"6.4.0-alpha.3":{"name":"@storybook/ui","version":"6.4.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2637b91db28d40c582197025f16b57a4f7f81d91","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.3.tgz","fileCount":382,"integrity":"sha512-9yTCi93p/bRnoFw8FTzkMGj5TfyF5V8eiwOvqNpYXJ8cE+xVO4k7C0Upa4z7wIBBltEGWR90yaoeHJ1dZV8MMQ==","signatures":[{"sig":"MEQCIDSL6sOldfjoW2fasaPvXx5ajFydJDhZabDyDAmfBs3YAiAEQ2LZk7jLFouYhx+pL+0+4+1XR9Dhj89YwUJvVM0GgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1ufCCRA9TVsSAnZWagAAmjAP/jDOcOJJ7jwUj5XQzgHd\nW73kVUUEp1LBKokr/D/XJIZXGX3AZ0leCYSNCTLEcuujN1lqVxC/Jj6edvXy\nAeFp4+x2AWb8EU1RaIpRKiplnwsct+OFrE6XCn7IcYcNP8Z4IpSZ/mw6KPVc\n1PjrGKFkjDQUtGALy5kP3bkbd3UtFRVmVwkxEAWOfK/w07avx22cf8AOQHt1\nMzVvrZKVQN9E6ZwOdFK+ir9UlV4mG6SGzYCJw08SPNNxr+8YwC4tXc2INtxa\noD7x7uotGVwAaoPDwYkhpkTYGsDKFv4+gzkKS7P/89CeB8zDDtKoCEhCNUug\nk2lrwl2/JBQYh8CbervugDGfLjImkCgAyOPe+ZakvNE3zUc0iCuKry+I855Z\nEwdLvGsIVukYxyzx4AD2NG6tDFO+UYVyCOkLpAIfm+6VE9K1AahLY831oqiD\nxoAMOjf9Y5N1NmAcO+982QLAjIXF693Qmt9ucrEHJkr9DAXbSFetmpsC9B0f\nx5KAhyyBdFAHqFn4Tq+mBbj+5P2hXiY0rXZ7/7aR6bdXIEzxFB8v5QQI7MnC\nneF3tPAjn5vkmeNCXrvXxUYrtvjJx8MRR8PaBj9UHoHfX/PCAt/pP6Mrzp2Q\nMD5hyV/gg7hU0l7UgzNrLsEx7AwaAKHw3pVitxuJHp1o6Pvf4KLX0tDs39RS\niUjJ\r\n=W3gF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9511766a3b488ccf7091b919ecf4c8a5e8bbb060","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.3","@storybook/router":"6.4.0-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.3","@storybook/core-events":"6.4.0-alpha.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.3_1624696770057_0.18588912745495945","host":"s3://npm-registry-packages"}},"6.4.0-alpha.4":{"name":"@storybook/ui","version":"6.4.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"86be386b5bcb3b84bb7c5d3e064cc51b2dd15e0f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.4.tgz","fileCount":382,"integrity":"sha512-LDkFQvg9ptC02pMZgveDx9Pz8USFOf+1mQ6l0hUpXoiQ8pZ4fgD56Y6xRYEhFRqh0/0CFrmpQs5kBrGlVDMbOw==","signatures":[{"sig":"MEQCID7rj+vdRjptm3/iMfJRP3qISHb2ytz3LoaAEMYCBjXMAiBxcYTR5q446BWUXMZ1tD/6EeWqsvDBtuE5CyKSpU2HNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2X3CCRA9TVsSAnZWagAA5pkP/jc4Yx3gKfkxugPplH24\nRV1NRd+mwGvs0dTppGu8uDQQNSd5rg6974bpxV0N8DixuUwifzHVKLL2GLqg\nBnUX9stqxVL4lvy5v7YH5F/sW8NmFOKCFrcaQH5BGXPLIz3kIpqdWMQZ/tUL\nYVuLVrNNIN+igi5U2He4B3o8OcyZREbpY2DBAfSKvdkBD8csdFplYfr8yan7\n2GfZJYzdXUdYT285ai/G2BSQSS7hSWCaViXRqV1zRZzlw6SBW62XtJN5Utqz\ni3lAOkg9vvwhm/OVnrah4uZqAG7BdXvzTPihs2PS7hR4ykSUHcaXnzYNN/bQ\nWaQpJ+nis0BQULM+YoINxNP/A9W6/19dagjxqRSjx+M9/IB1tpzrJjGwj4fw\nP3RC5eeubKYxTdr77WyIzmiuplVq05g+K/ckIfuaW6NA4X6ZNqrUy0xnYbBG\nG5lEH+g1bHxIZsPXsvcIYKmch7f0cNCJsSgWFkXWg+kn7hymHdZXHIQLXCV9\nD2MZQqMsLfYYp5n2MNy7qN6Nd8RsnTJBew1LYGDYLWnTbEXW5j39lKkN6VGv\nYbT25Up/PFhsknwbsgGeilhR8An05XJ/cnMEEsKjr7P70vmN8AhZG7vlpd0z\n1j+v1TNo00ZlXMq7KOMUdSi7HemwrpnSpkOgZzGHm7oMVcVrZMgYjqM/QePC\ndWt9\r\n=3kNN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0feb4147b27a31982db054a4fc5954515d506f7d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.4","@storybook/router":"6.4.0-alpha.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.4","@storybook/core-events":"6.4.0-alpha.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.4_1624866242461_0.1544744857140803","host":"s3://npm-registry-packages"}},"6.3.1":{"name":"@storybook/ui","version":"6.3.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.1","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dc9faef9ba97aca5183d6c9ea0b2e0b1e48245ec","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.1.tgz","fileCount":382,"integrity":"sha512-ax5fIM9wDRmthNtKjlozmakC5T8ansH5yeJHP8PnBazDu4Fcxuz563r455K9U303HaXceITIw41KvhHfa1BmaA==","signatures":[{"sig":"MEUCIQDlzJbIFNMCqDIFtR4db++0WCK9VKy5aCUv8SjGtELKIAIgSGbYj3g9mL4X5LKaSDcEfidrdRyoPRBH6d/2YvrJjhI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2Y5eCRA9TVsSAnZWagAAuMwP/R87yawkwqZLr1IQ3/UM\nWC3CPw2nXszJ2DLQ5ZrrtQojjyaYEx+NLHukGLCJL8tHiuzSKPfi0UelBxOX\nmJZCr7DEc0a2iSwP4MAIIKL9cTx2Z1D//MTL3njm8pg8eZEAqjie4YaSviA/\ndRBMe4Lnikd3tmK7tMMVt3mCkjBuG5NBcS2qbAXgENld++AUSH9ojsIpjFub\n3A6Y72kBHRrR3vN45mwcsOirKSngwS9wtL1hMoGRLI3iiK3r/SSjfrcgEcZW\nxh4t2fXKkSChV5UxC0mdxxlzrMRmr2eUQAJEI9sjIuD9dxqFnKg5Gt60Hjt7\nO7dqfb1dQW+z5hFW3IFhqEjdIdcx2vFHmMiFEhZAuk96bt9x0JUe+waz7oVv\nYFFAYcZ8pQKuIDhZMKf1TdTXyH/jatpKsHjyuAvIu60BuY8BPtKNmU7Rnxea\nDBslYaeXxy7cXFnzzR1uqHGT11vFpqMkyIC7WnaD8ifeVBSXJjip7NnQ7Fhq\nGJ8edh9hInKWWQ3yi0whoXQxPBwT7pjqAd/3ULoj2O4IP3ZfD1DBXLsSq30Y\nTqpQhNc9rQX2GX9ayHvL4ig5vhQ/Gilu/G5hmnpk1wxAhjAhfS7jBewYXHjY\nOEoNGHTUpwrigHLzeWu+D1fjkwTbqH4WnQSDjKU0kZib4MGOcRJagR35ac1w\nYRa5\r\n=RmmZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a0169a19bc3122502533f8369186baef7a661bf4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.1","@storybook/router":"6.3.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.1","@storybook/core-events":"6.3.1","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.1_1624870494058_0.9409478052365621","host":"s3://npm-registry-packages"}},"6.4.0-alpha.5":{"name":"@storybook/ui","version":"6.4.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.5","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"74065e8ad1b7a7d60b6487c056e6592a8126ed0c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.5.tgz","fileCount":382,"integrity":"sha512-wBX011MuTstEhmS9v0l/Ah1MaeGJZt9uMeRa9nO4D5vsTGYyU8xSIhyyCcxSpQRwoCQdOz/77UCe2XwfC9lJtA==","signatures":[{"sig":"MEQCIBioP9RqIJl4hFEaLg6BIXsyotUHCp6T+LarwbE5/D4pAiAZzOlyoi/2Vp7MHelI0Uk0vbJlpeBqHTDNLiKB6R4/EQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2hWZCRA9TVsSAnZWagAA65IP/0YMVX1QNUxMfBtUgAmY\nN1rPg9w+smP1oRRt6GXAWmZZdBdaB83gCZTx9I4YMpH0y1gMOH3ezpRsJTY9\nfUrBy+gfBHzJBmv/ywD4cvtjfobgVpXJhmuYkdHb8qvhyERDGsExbMYbTAv+\nTI6nqc2m2jwBuT6aHWyv7hP7a0V8kMU743hoT8ihZniyEEljn5RXI22NyZrD\n4aetxmefZKISnM5b62SCIbSJ9E8aD4DXZMsZQQCF0yKCnfTUNiKPiC1xIjBF\n4oexKPBTIZwTTpwnX0Ys/lDgGIIjnFvCW8HKqgOTe/ze+nbotzdPUbfGGd+p\nwzMNCSrjLxgtddmuSovUvBS52p9rnpihHwA7dMN6Jyp5mSn8XDZzJyvx/RWI\n1Qm2BnhcQsuzTSd39WMM4e12Xgf4yHex/dF12BjJDZxjYYeQicMpX9zfKebH\nkI8LaAkHpZWJTLZw2okw2ZG9ELDdCZ7px4UHTwLIhJIkyuR4EFPD2oG/JFr2\nSZNwX9xvz8kOHdyo8Wt3TqA7AUW6xwQYp9fziVacLxsSGCZIvdOxFdRVeQrR\nfQ0Ai16PevXCNxSlA1t2d8+CQ4ikm9FNj/i1ncBxaTB5Pqt5LLUUAK7K8RgX\nDiYLysKH7kIXjWC5KZl6WV8SCyC0p3dVlZnb2TLjf0rK2fx5HjR0ZRBJ3ZPZ\n+ygF\r\n=eJZm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"027a5cfedb93342ef23f8cbdc891b97ea1b5f763","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.5","@storybook/router":"6.4.0-alpha.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.5","@storybook/core-events":"6.4.0-alpha.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.5_1624905113436_0.12507203188011662","host":"s3://npm-registry-packages"}},"6.4.0-alpha.6":{"name":"@storybook/ui","version":"6.4.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.6","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"74032dea5a44955879d2eb5136c2b3bcf35a6e5c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.6.tgz","fileCount":382,"integrity":"sha512-awBfpct620RmIIrcVtQxjwPUcVwbq4EkjYmVdo944HYJ6d69RhHmdsG91WDq90IWakcZGzLGTu+asTRtTaoLJw==","signatures":[{"sig":"MEYCIQCQLSF58zYa/60uox8kMRuDEZ3xFTmWadGFp6ORFT5kbQIhAOU3sSXulf1e/Zjnj0Duc9YyppPmPIkcDRvMT487Z97a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2t0SCRA9TVsSAnZWagAAu0sP/RkHFXeb2jUUGOj7Mksf\n5eA0ndySgkeclQsH0RywMoBXuERiKfrjZru9E21l1Bpy7aqmu1+6NyiG/2vq\nvDYcyugj8NxdZfx7FrXEUux+uKVnz/zoWP4CP7RNG2xp+/5976l88sNbP5CX\nxBhD9WZX3p3sO5+HLdMLo1h/YP5mwvtzkqgvgvQdvziaCZg/Ilbvky84qxB5\n5qtpEa7XCsilJq6EekeaI8S8wyQICCCNjbksEYIGY7FQ9PXEEK40XbDVT7Wl\nO6tWJq7PYSbTo1KHROW6w5S0Vm+uY9p7/xRlDQ4U227dl/x9PSu8Pnd9fuT+\nSETdBOpdHq93XMKUxqecX5HnQPS5ztxEO3JdoffH9FltwKk/IfGNQ4P2Efzi\n7TXPwQo8ANPihN6yy2KnAbYg1eG44YtqcgnesTHwXzN0AKgyOuC2urXSz8mH\njkPbbxW8kb/k0xbs4iq3HOARHU4hjmAF9oOQpdg5w4y3tbMSgnHlDjpoq8q5\nGgVajipmOmFOvCzG6sahb/dePibctYRu5aQyg+5UDzY9IaWz5lw9H9B06+5k\nnGFdnMEeQiesFCVLaIBVUfVL9RfSWwnzoa3uXRcf2+8mHOSqavPbsamp7Cpg\n2Bx/IqqsB576iXyx6kZmYTM93XPNlSUE8GZRCDRoj1GSD849gKeLD9qCD7yC\nHkyx\r\n=S3GC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e15d4e0276d925a601ee25fd819d5f050920e1ab","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.6","@storybook/router":"6.4.0-alpha.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.6","@storybook/core-events":"6.4.0-alpha.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.6_1624956177911_0.9338301190433149","host":"s3://npm-registry-packages"}},"6.4.0-alpha.7":{"name":"@storybook/ui","version":"6.4.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.7","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0f89f36c6afe192b448cb5e72152d9cee060af69","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.7.tgz","fileCount":382,"integrity":"sha512-N+e2oqqshom5Ns7yEFL6VE5zHFwZu51hKc5DIFji7gvcuDiGB3wbGcEGogtKNvIa/bbKwMbPsAELKG99j2Yv/Q==","signatures":[{"sig":"MEUCIQCdVjjTLlfKanv9ZuCECWoCWpp/B89QBD/3PeOWiVvXaAIgfqYI4tKg8CDMLotvIaj07eYXvTZYFfJ2yS2aAxsfICg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg20SUCRA9TVsSAnZWagAAP5oP/0R9g/a1aeCqyEZZJ17J\nApyewWAv2P/2jnfP1MXWvp5TXWvkTulky8MNyj/InEUFnijTYwW7N2xQGRO3\n2KofMiASdVJjgl6eCn2P+iOgmaZcE9ocSpXVLFftZxJUxTmfjcVlGFaRv5b1\ngKbsRQkftrt9K8dWM9MVu8IqpGIFFDT2L/X2vqZPqMW9hP+Ev9jFG+uZGPg5\nfT7bWUFvGdwkIZ0duRzd4R9ARjiozP7CdeJddverOu4XoFHW+wMcFeTzEbkE\nFbh2ceLahhO3gkErgNoIZwSHO6BhPM+hZfedRabElSkarP89TtBnPeIkxPMW\ng93cB1f8NEj5J9Pg+vS6RjXLXL0GZi37BVdmrVxyuZBh/0GQ6CttqgdWtcXE\nXuT1R4b+bnuByYH+V16JcUPlNa4E/TRZegggNKG0zaGz/6yl8jbTsE2P8SYV\nAIaHvFYUqaSt+B2kaIFNCNmc0TSH2QcNjj/7gbqtsnOwSw6Wau/59EoY1SgP\nt8b5jsr7uVzY+ZwdWBTp/LH2UU+iR+CdUXFxcKeJm7cN6ftoWRa29SlLaphV\n4RAdG7EmuIT7Lw8J/7FH138m4knxd6oboB57lW/v0t66mAVYcAJzQCp/y6sE\nWH4Vo6C4GfAvOL05I8SvnVQktqkxZpfhtJ9k2Kj9Q2u7P14oUTARsjILEj5u\n1anh\r\n=p8k9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"dd38af8465305888c2a22cbe69f2826f8c20f66a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.7","@storybook/router":"6.4.0-alpha.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.7","@storybook/core-events":"6.4.0-alpha.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.7_1624982676505_0.3903890501977201","host":"s3://npm-registry-packages"}},"6.4.0-alpha.8":{"name":"@storybook/ui","version":"6.4.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.8","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6bd7cb34d70612687b6fc2eca832f4014f100d65","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.8.tgz","fileCount":382,"integrity":"sha512-V78q65PZFnM7VmX8w1dyP1cG5sKEpfsxG7HYS2gNG6ErskpBhsAxAAwAYaxuZQPdpW2Js8+qHmCP8UypwFH8aQ==","signatures":[{"sig":"MEUCIQCxyV+vAN4x08mVdIfIBp6Rcd9WOI6DPpZIYBhh9+JBYQIgeUG1EDyfS86ZHm3V4RXt+tPAD7Xwhrzl2NT9navVDoc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3CrRCRA9TVsSAnZWagAAli0P/RcT8iIysEgFGupYIR3Y\nRknLStqQCvRZ4Qg7TccxreVblWvWZePwvdI5NixXJrnRTygEAiJqK5VsUDZC\nQMyhT7kiyA5lsrLWYlU+WXx+Hy/S1Q9J4x1XXqBZUsidX3CIZOUhNxvfuU40\nLseULtcq00abwSJje4CyMrMMlDKvCzk9CSMjvbVjOtNfslaWvdY5lPPQS864\nsM6rGjbHKnpKj5u42e0OUM/9H7nIzkBIqlseCxKJqHjfyHpBJiItEh50pTnf\nW51VgHK93/fRVdsSVOOoMA6q4znFBQ+QUemT/EszZzaXTlobiA14KaYfM8iD\nE77aAIAIvSLfGubZKKNCHoU0R/JcHhSvfi4y4u+CkRemAnu6JKZYqDUHBfVM\nx3MEtfNJqY5XH0yq3vvwBQ8IV7ghnvVegTLqeZ51ow6Yyyqq4HdTJjhMUXRW\nG4IDLOI+xUnbrxRGbLsR4fjAl7xoLrdaHvnKf5/tHGbws2zaLCNAQ21ogE7L\nDPJQmdzjjqKj/UmKIRA7dquKxXvR+qYdmjzvC4yyRx8PdHIui/RkLhL0k3Eo\nSH+bPw0WHV3YIrLJQoI1PLt+jKnMR7spdwqHwQpoKDuo3FgahnYkdwzIMpFn\nWFsN30k0++bn18xfUmWkCRcR3W83VVXtX9wThzgmpZVEW9K2pHAmlvFq4yx0\nRPhe\r\n=go89\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1ea7d55df3dc036f6ea091cb09cdc8f9512bda3d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.8","@storybook/router":"6.4.0-alpha.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.8","@storybook/core-events":"6.4.0-alpha.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.8_1625041616681_0.2379387816573888","host":"s3://npm-registry-packages"}},"6.4.0-alpha.9":{"name":"@storybook/ui","version":"6.4.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.9","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b90f6a209d1d898bb20a12f568912953fc7a3870","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.9.tgz","fileCount":382,"integrity":"sha512-Ta2itlTGGTfW5SspKC0lIelQWXvO/GuFKqUlBrXrUZn5aGV1SUg5fWlyYD+k3yM8FeKFKLV6h3oy684fpW7/cQ==","signatures":[{"sig":"MEUCIQCr9M8ca51rHFylQkYCGKSfFZzBYH/sK++pUsPOyE41IAIgDNyN2y7NcRJ0jc1nFZ6HZ4rlMSFcmWzQVBmbaGc6+q8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3DgICRA9TVsSAnZWagAABkkP/3eY+qWef/hDGxuM1sAR\nlXosvk6hxOE0+x7JHCVhkn8RCxy+fTPKCMJW+CcRJYqeB7nuTgEQ0nR/z70x\nj/Cdi0AugsPVZ/HfW9G9AyvKC3Gj0S+PA69X2xs0VAt5dvBO0UTav4yAYZob\nx/l0lvv04YvCJkeoxsyt1YFdoY9gueC+hW8d8MXp8PrJsS1TwOfOQiiq0uSC\nFuZVTI5NvFq5htaocqCJ8O0QgVWlhM6oBol8Marpo9IqAsh20+Wmn5f4pPha\nmoH2Wnd0sQ5fZrnOw63z52tHbxdHiSkmdq3+Ow6pVKrGl1rad0hAvudHxNrp\n1ba8eAaBxWasT0nYldDmyW1FrhQ0o/5NgkMTmOTSgRRRHTr7B9ggZqRAZH5v\ni8LOmD0HoCxKKu+v8a6fyx4tT4drQTkbqbykBS/LkXPf3CBSrXNoL/5n/8ED\nB9oCuv9kgjZBHTUJKOONWdGp0Sfjcnx1jvw61dbe9jp4FAomLRUciW1qpqHV\nlb/t9ePyoso6EliXTcOzvW5myLDgrZnU8E1gu1XQ4QIuJWJr378SevKPTXma\nIp5XG9364EREjwLvomjna4M/zmpU88bBhcDLzP7rSeCODF3+EsOux0Z6wDIG\nVeOUiWvVN+gq/YD+IByc1eHNHojd7EZuAWT/bsPEx4zOvav5dTpYbXIdAPOd\nclKr\r\n=PT9m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b9b9f9484bfe3cb9f259c26bc71e7635362addde","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.9","@storybook/router":"6.4.0-alpha.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.9","@storybook/core-events":"6.4.0-alpha.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.9_1625044999900_0.6951301863536479","host":"s3://npm-registry-packages"}},"6.3.2":{"name":"@storybook/ui","version":"6.3.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.2","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af6d793a22d0e127fed7e2b041133792bf1646b6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.2.tgz","fileCount":382,"integrity":"sha512-Aqzr5vQsr67iDwg41CmHr/NlcNayld8PPGWqtxJ/+/fSScnKZ8KdwGoqpj64dizowoggpCCeYVZCanHhxS47Vg==","signatures":[{"sig":"MEUCIBGF0bT0Lvr8sp4CIepD0s2EG4+eqk1Z6hRObZ3TC2q4AiEA5uDe0LwACdaGG1DMFo9/JXDrE5N+qCyrP9H+tP0LWW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3FiGCRA9TVsSAnZWagAAUfcP/1ZWLVAQ3F63+1C6WZ3h\nGn/OvkNOf9Cq8afKFvWUITBLip2JJjkGQ9Ek0pvee/i+l4Nt2LeibIhfZ8xj\n9mdUxIT3cY+ozs9LRVQ4+9ykUtOciPwTKnuKI25DbBR7LzcMbQukV9zBbWO3\nJ5HB+AFwlXMSdnhuFx2wH9ht22FTjxx5VTlyMs5NoTYHjkx0OwkI/0ZBxk7W\nkXzyLpzq2zZ3sAw4RLs0Lz0bKTvl2GeaPMkrRHGlQJedrEXxVIfDdmxiQH8x\nMQKBoRNNcJJB7TxF/tztvSBqm/Akr0L0vt528DpapApUP0xLUrBSYjQLClrD\nmQ6UNhaBfTTxLOro3Gio+FP2COLsdBCqEAL+um4+3I1Z8Lg585TqMNrTVnYb\nGrWeNibdw/bWjy3reh7X7s2I3iJk006TDYuaH2BOBc32xMCB1Mu8j/x8iU0j\nXwMgSWytupdUCv56uz+UKWrjz5Dq+0tR6zntmSHRgZfLivz5n8lHIxxlUZLZ\n61VjmyYVYdQwOnQAaAoyvdNOa1+rgK7PfBfiG0XIq3BRxzGjj58+bqe6zfN+\nWCtQ/BCR4axW67OmiTv8BwMUddrDhRg6lyhgU3Jab0uCW+4V71AzyLk7kkzz\n3l5guLSDumGhsGRykWkZfYyScR7W3KsILC00GmFy5tAgqSLVgMuL1evowje6\nMvT8\r\n=jouo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ebc8c46da77947adead90f3d60a779b6bffe3890","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.2","@storybook/router":"6.3.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.2","@storybook/core-events":"6.3.2","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.2_1625053318195_0.7641551145623686","host":"s3://npm-registry-packages"}},"6.4.0-alpha.10":{"name":"@storybook/ui","version":"6.4.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.10","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"264790b0f38428bb7f40aea5ab1e85bbf236dd3c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.10.tgz","fileCount":387,"integrity":"sha512-B6jo0y7f6vLm7aFIQV2DSorjmVmpspgXsIssfzrkV+3NN7WGcuZXEncG2QAlxnw9y53WfTRf5Bftjb1ry5bcyw==","signatures":[{"sig":"MEQCIAa07GBACjhhBfVxR97wN2uq43pNtYkDX9kAHPIpttgHAiBapyaPMujtckLQPWr5H2JyUhhU5xp/OoI/XPryiuW+0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3vwvCRA9TVsSAnZWagAAkRYP/1ZBEyJDGHL/DXUxNaU/\n6+Hba3RaQ3qAhyg+kuq85uO2AtK3yh1sLU2WBggFod5oaECJQmpCZE8k/iUe\nTDYMWvO58IlVZNbfKzBz4H3LBc/sCwgEtzP4RHo57xTXL1jAtq3q2Ctk43z5\n39qaY98kAsb+UOtWrOGforFoZ9g8DbozPLkVC4OtZAwNC+QtPu/NeEcUo6zS\nMZKfuChV1D936goDAaxq5LOYDtz0GEKt/NoLSvvFOjFKnJAKzotivrcnDwfe\n8RqGJirHKZuEZHwIqI9cpNL2va+FlHkTxzPDku85nr4Getsy2VCQ2t4oIids\nITDG6+2M9AQQEvCjLW809IocfZza8Kl7ZDMkQAbMbvxpEfX1YUsGLFs5Qybk\non6ShgbNrx7n51IleqTQ2dJasrgQTy0Y25Nv/6nYLKowlUkXh87tXWU3Prhb\ndENIIbupCDeKD1mkkvjrW8++EFJm27QNwrrE552StqnRcfWU5A5Yzz6dkE4J\n3HqJlA6oFSQAfXM2TzyDDqL1n+WAy7tNtZ7p7UD6I75bqu4wOyvNfWqMSWyN\ntn/aBno3CGw1IUQGpWe7TotNhJl5rMuf1e2UJk2daImV51eymJCzWT2astqw\ntur+PeO0VDEkNE+EFSyTqUZvlvGKXcXiTMU1M7LBZzpK5eLs38EAn+duAMP3\n7tNJ\r\n=co45\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"# Storybook UI\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://github.com/storybookjs/storybook/tree/main/addons/options#getting-started\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1b43aa79911d0d9d936571533cbf76c6ecf928b0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.10","@storybook/router":"6.4.0-alpha.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.10","@storybook/core-events":"6.4.0-alpha.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.10_1625226286898_0.9763537187306717","host":"s3://npm-registry-packages"}},"6.4.0-alpha.11":{"name":"@storybook/ui","version":"6.4.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.11","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/master/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4fd92ef0ea01c2e81855443c51dc6813c6d013c2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.11.tgz","fileCount":387,"integrity":"sha512-l1t0/uzj125ZM1qB9QwKZ3Vcp1uDPnfnZuj9mRRPUJiAJQS6QKEpXKUwlsCno/aS4a4scCGJ6L2WyQrl5wk+KA==","signatures":[{"sig":"MEQCIEoizlVd/CuZzKjBEVJYu7bXz0LPVjQ9fEFcng/L2NntAiBvrXkOEZLlqTkUsAfBrm+xovWHaA/k6tfv55nDXSTqKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg32wHCRA9TVsSAnZWagAAbUYQAKJkujKDvonWF9OMyi6e\nxl3ITET67E0B0bSvKwpb5SXHZw0XA1L4rnK7riR0p3iC1bcZs6OCJiUCvhJN\nCrabv5KPAA5WYV7y6PNU2KZyX/3i1+rJ4O9A/bT4H0zoCu3sUsXqFhO3ywsH\n1Wpd4WAuIreQZsS5xTLb6Mxse1xvK+QlCBV54NLlXC1GnNrmuloQrjyU1JkS\nMF7SF6Sb+Xb76EXYgZPLB0kiV4QY2pYMSMhXSuG/BZMMi9GhB3vE2E4NmmGS\nX0bif/vThgkeszdjTOUkv3lG8PIZSVRzQsdWTrHObomDkFnT3lBxIduYgk9b\nsoynlNwPZt/WPpUHLeaphyqKH45E0osd5Y6Jx6tD6Mng9fsoccvnMUtEyi41\nrCmLfw6P9LP7TE5EVWeJ8bWdLYP5om+EzH3VwBq/JukaGMbZlfAIyflk1QAM\nb/B5KFGh4c+lgIunnvnh8zr8fRdgqYx4Ms4BBKkEys4P8KvaMyUk/iW9zN9R\n8cJFS8s+BZco4yEVYQ4qDImpScWFaE86LPrp7KJEPDzIQAZfzousRe+CCmjr\nK1I89AQahe/9L1XddF2NAdwQdQuH1v1B3EMZ6ev6q0da8Cvf+TN3DoQEwVCM\nksbForzYVKVJOYbbuaDRRK+ZWytKwEMu7mUMkTcdJ/yHqOewVU8V+BEjIyXL\nzyFt\r\n=XCKq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"52cc8f0ba8fc0601c38620f7173a47b0fd7d38e2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.11","@storybook/router":"6.4.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.11","@storybook/core-events":"6.4.0-alpha.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.11_1625254919160_0.8329801178414737","host":"s3://npm-registry-packages"}},"6.4.0-alpha.12":{"name":"@storybook/ui","version":"6.4.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.12","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"db57a302583864a25351a0d1f212af322f614099","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.12.tgz","fileCount":387,"integrity":"sha512-CWc5ElDujIyqhiDOotVbVT+2hHwBZUAndAKGghLf49/KHFoGwY4kcUgFqOLYaHQw3hfyyu6saJCHHswZfUhy1w==","signatures":[{"sig":"MEUCIBPaVNBjrIN7A/AELoBvy6ok26i29bJ1xLqB8CGh3xqiAiEA/DeeKjxmJqk+1CTd4kaqFdTH7ibD2FCcTEX2Dfuugm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5X55CRA9TVsSAnZWagAAmtAP/iGAdVAxyYExRaaATy6S\nwRjlKa5EPy1lW8J5UbqQ8TgcJxg5bSqJ5Tsa+cfOjjE8GjIIcRciNSKEK0SK\n+PwdpobCT59/wXVLB/iDkQDurbAA2NtYGy7XALJiA0M+MYrjqV7o+L7D3UwF\nwpXI6Qr6+ZD3we0HFcxG7/qgun+0rOlgoLwjKl4Z2yZlYOIdaSbom9nPgpRN\n7pDDbu4luJ4vvejfjSs38FGdHImAsr0H84FA14d5IXeIR0sD8GTVXCdN0coU\njfYcW6I8SqI9HjFbx8DZy6D3w9+ZBCNvINkzEvyYjwKNvUN6H0+4AZbonKCA\nQlE28V91OI+HaXuW67LdK9WazNzrYkPIcS2plDfb5Zu9hPlUz85sIyG6N2/7\nwxFqC4/u2uoRx2nOUX1fexfJb4M0SLDi/fruw/PRmWH6VKpBtD7QiIjd5JrV\nVfT2YqcAB+bt8zbe50h74T7DMTKaGDP291hVEeiWn/PQXI3HmA9ZVr8gegac\npUOnUAi+1d7lUWNP/8uyr1LZMUOVnuG8AvkY2AS0U2ZIOpFyr2ZtuH1AW1Sa\nWt4XcFKVWhg8+T6dd/k4pQQQmWLpWQA7bhcWozgLnhEHj3eMqzrz0N21BkYY\nlyHx2cVHlR5bkaoiwTm40gRpaAkwZhjLRCm3uIzBzCc1cvppqXQb2PrXLtHw\nytIv\r\n=/gUR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"417958f6d40b4ac7d361c706d9b96dd4123231cd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.12","@storybook/router":"6.4.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.12","@storybook/core-events":"6.4.0-alpha.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.12_1625652857020_0.22927941098684457","host":"s3://npm-registry-packages"}},"6.3.3":{"name":"@storybook/ui","version":"6.3.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.3","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"65324ad55fc68c5b6fc4a83d63b0852fbdb508e4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.3.tgz","fileCount":382,"integrity":"sha512-zDWR8TEjnuGwVMEb1rFZ3XCAMApb00VBR1PIxN23yemizk6hWLfJvOGYGWEyqjiknS10eF/iMVv936V35Pr9Qw==","signatures":[{"sig":"MEQCIHuOaDuNqU10H39kymLau2S3D6LWRvdcxrW2d72AW0CfAiBoqc/CnTdwEERYGK6ZOS71VQuLtLxMf18hFtZSMF3B5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5ceqCRA9TVsSAnZWagAAxKgP/0Lkrxb7aXVvQF7Uhu9z\n6nBn8AVEE2+SZ8QeMduXoK6Hdn84fjYdJ2Gl2wR1BfFfq7rFSTKqLItT/0+Q\n/owJbMYMQkHrpj0aWjjQvbzflqTLkk1je97IN4OfRQtiPc8rjKsjA5J4v2OA\nMTh6qGgG5L95vNsFpKX9BkEQmOuD60oh8sdYcNkCCSAr4gERY5393L2xoGtP\ndf12TKNMMk70Uj8lviTEGaAQ51lXsSxBDm+sHoNMsK6zhfc5Ddzlf+259kHG\nK4i6ywt5QsZUE37e58RnCdoiqYxsAQmS+9vTN/CniNLfE5cvjE3sEVI6sWBN\njsCULkkuD1pOudL3Sr2kqZNNGi4r7XcAm+Euj8m5J9Ll0eu7aVxTlTwgPzjS\ngdt8sw7wa3Tubm9eGVz6+kuwEiXG5Eq3CwJtkQAvtJ9oVrbdUSrS2Ql+ydxd\n3G+fGS3ws3tknuHC5zLrTaBV9+iymz4gdPrUiq0vBVqO+4m9WD0DGFB2wwoi\n/siGfWRPnU9DA+mJV+3e3dsyPDOSvEmttkmv2sYjXTRChWxoiiMzqnmIC4so\nFaxGBgrAs/3CGNGbyC9yV2qwv0KDdntdx6QJPYDSUUhVAbI5Ym1dK5pGahrn\njmezuhj/iAk6f8Bf7nwFVUm8GT3B9uthl/01YdfOZ1C6GQc6zakQsoBHOe40\nUsNA\r\n=G43H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8735bf5c0e6b39c0d6a2af1041861ff3bf05b1b4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.3","@storybook/router":"6.3.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.3","@storybook/core-events":"6.3.3","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.3_1625671594149_0.3160559100149378","host":"s3://npm-registry-packages"}},"6.3.4":{"name":"@storybook/ui","version":"6.3.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.4","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"348ea6eb2b0d5428ab88221485c531fb761ef27d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.4.tgz","fileCount":382,"integrity":"sha512-vO2365MEFpqc6Lvg8dK6qBnvcWjdIWi8imXGyWEPPhx27bdAiteCewtXTKX11VM2EmHkJvekbcqNhTIKYPPG7g==","signatures":[{"sig":"MEUCIQCW/em6gRyUEUav3Eu2dcwUUR1Pd1DZYbF9WL4CGVotrAIgIKTLk2KDuKD5ovYG1Th/7BWFBiIDH6rPPR7cAoVfD10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5xJYCRA9TVsSAnZWagAAtn8P/3B/HeVo8jeR1Kueo1Zv\n6uGb46RPGPBaJm/HUHpHmAvYOmfiGFovoHrx9FVT8tQcDuS6tO0UxJdWUQjn\n7XOt9fDQ0tya1mpu9Ke16XyU80/U7515iWvZwrrg8xjEszES7egxzR24KSsM\nKjR6iyALN6j7JQNWw04u5QVnE/kRoTF3WIoJ3cProuPBSpB4nhJBbwJG3275\nloWmYIS75Ya8twpoFeqFZYhGdSvy190r8+Lnv+NJfwjBKLN/2KDIYBsyJQo4\neTSf+DpIBuOU7I0OwrPcilWivmM+aTkpPtga5t3+0raksTLhWDfB4ZUDlOFs\n6pbn0z/Ac52///jwlMvTlEOh3zWIxuK51WFvp8AmC9PupAHMjo/P1oi7+DV7\nLQAB74+pwHnav56U2inBJdiSgTvqdw1TII8k3AfgO4ZCn2SR7iT6KYhnO3i4\nNlcAkpLapCjvIrvhg0q58/jAJvNM0rsA60rK12XJz0jeF0/mOvhnrPEemc27\n+1KJF0L1Q7MnL+3zcfVcggvDefUXP8daahAE6qi//ctGBVNSWul8LH1LjkHF\nxRQaHDXEWMpBdFt+3wF6yv7H1NDwwv4X8cACN+soT4PIKmvU9939A7hGSp+O\nEWOdnihV8EZG7cha0H/Srv1OdagQBL8TwZ+EwNdoxLQx4ExdyLa/DauJ4peQ\n8nFT\r\n=LaGx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b6fd5c62b15188baca1c1b9b8f71df6098a510ef","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.4","@storybook/router":"6.3.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.4","@storybook/core-events":"6.3.4","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.4_1625756247908_0.7485866654275484","host":"s3://npm-registry-packages"}},"6.4.0-alpha.13":{"name":"@storybook/ui","version":"6.4.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.13","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5c27e8d007489b5e70db4ad547e9988ed2f2cf33","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.13.tgz","fileCount":387,"integrity":"sha512-j0czPFrSVgMEys3sTaepRKJMKbj1uCiRVkK2GD+gEa9P1lG3ObBqFG0IeMj0JMSdQwqIGp2w4Hztt08QJZOT3w==","signatures":[{"sig":"MEUCIAOy2mQS7gXgHCt68ER7Rb+j/8+3OPHSTOXhSUVG6DfoAiEArvqXT+y+zjXPJ9bD3Km82f46LnEfe+WORuEEUbsMOKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5/xnCRA9TVsSAnZWagAA4FgP/0IxExYezEBz3rr9wm4b\nSXNytpl3vCKqxoj6HDWswiEQVJLjxRWbJtwOlYx7VjvG4Egxc5LQMnjlv+82\nEpd9zGSNydH/Qc5rwg4DJ8rjs4dqIPItuQatJRXtNsX7bY9CiimsFN01Zs09\nlHypCsjvAag6D9TcalXQFxynUviVfB10lB4cR1p6JUBh3vqeD5o9Ji7kducE\n6osIPT1LEHEUqVeCkAaVpPilzjIH5GXQy8jvxq/59wbvT0aumcdv6kDmhTVw\nI5BeYnP0qn/Mx9xgbA85P5yB8VmK8Y+1mcH5dkDHf9d9y+SCn0Fuae0IXHfo\nWlDTTx2zQPsTssOEonVjWpRi3Q6TnUtJHYUnc5MO5T5PKXP9ayHeyQtrPJjL\ni56ca5/gQEbe6YsRhhWRk+MQYtTLZxOy4HbXu+XWb6TI8cOBTieaET4RPnJV\n/6pTQR1Npw+R3oWXmdtnfIlkAtGKxpuLdSt35oDi1oUtNAteLUploOMXMDcE\nv3YsBCN9cfSYjdDcWOOrsCxibhvBguMKOxe7j8YOzzUeiI+1TtyrlRerWj7x\n+Y0bO9kq7qWNMVQJtLTbdYfSpeWFExQEwszA+wS5ulrPln6Ve3lyQEbuza1e\nkJjG7Rh4qvjj2pR26Zg+BXAQsD5rmqt+dVDbA2QxsF0USEqICw7iMDVcEi6V\nGd7L\r\n=5DRW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"70d04492b677c52c518b1b9591e382ba57484042","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.13","@storybook/router":"6.4.0-alpha.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.13","@storybook/core-events":"6.4.0-alpha.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.13_1625816166816_0.5914615854918108","host":"s3://npm-registry-packages"}},"6.4.0-alpha.14":{"name":"@storybook/ui","version":"6.4.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.14","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4bdc915a1ef0f9d43fcffbe48a057494254d3db1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.14.tgz","fileCount":387,"integrity":"sha512-Qg3bc3/4jHMz45AgBxc9RO3oCP/QOht1p9kdcaFgeFkC3lMam6M4AfdnGvDUszt9dW5i3ITD3ueNzXUNB+rEcg==","signatures":[{"sig":"MEYCIQCr7sPTbC62orRlpEvWEr7mqR8Ann1K6OZBZfU12HZ8jQIhANUeILiJzwX9DebAowPmIfenoeXcf9Iq4/2f7Hz1Dcez","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6fFLCRA9TVsSAnZWagAAj5cP/3hUk/TMc0819wm8/IC/\nRqtTK/sNv0PVH4clbkGswMhjXxKQ5IBXbG1HXXUrNu/jwRyU25ckNeRg7yhb\n1GFQ1KhSzZR+heXleK0bEWk0eG1v4wCCiIsDcG1xqVpqTOBWi90hR9WvQEe0\nNiJWnaQMrq+L5++8lbgDxYnmhzgRy81LHlF+vOALVsaifvqqzV/mzJ/qx2xD\nKSRWSJ7eZvQ6E6SWz1N3Vzj6VU7zPEQN0yjIuPGfMpnSpc3kH3r1w0kJhSFr\nP2RFZLN6Kg8KpMbxCA3y3+rwbwzeHzNqcF7gCpUA43wZa7OE3R4Ejh2SJD0d\ncDyTMKz1b8jHMqLsNReetb5lwu6SGzwtmWmXeNp+9dCj1fwcPEkva/vShxL4\nSLSptN7BpdyAh8Rju2n9UsG0GGhJFf1l+XTVeQn8L5SEuisruPfTc4U+PYg3\nOn2Mt9U5+qykiqiGLij+JP/1yT1JTgEe4IQlj0X5TBX132Pq+waMSZkpeUuG\nlCydWm+mQu7GPw6+lgTBJcktUcDzRH9Ec5Qhz9PJMW4zCbdQPYAYFrin91Qs\np58nXwQzhtfr0LXFJVgMdiOw2CG8b7Y36QIHok8CMnn1HnSg45ec71N1awgL\noaX01LawPrumPzawbrnTZi5lO1ZmQMf1yHwe674NP006kpqlhb35x4ER56XR\nri0u\r\n=JSaS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d3f8b5119b70ecf23ef2006b58034292eab3726e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.14","@storybook/router":"6.4.0-alpha.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.14","@storybook/core-events":"6.4.0-alpha.14","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.14_1625944394678_0.23360335586645253","host":"s3://npm-registry-packages"}},"6.4.0-alpha.15":{"name":"@storybook/ui","version":"6.4.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.15","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"492fc09017b0228fed9a2adc0fbfd8f2aff24153","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.15.tgz","fileCount":387,"integrity":"sha512-abVeF6ANYXv3sHNmXS6AuXm+4HuFq3N0oevJJVurjH34ZDFeOQ9NP3UqhE39PjRxtW0RPgdjVt/mnLHbGJulYg==","signatures":[{"sig":"MEUCIQCSw3eYDVdvCpleFhaiALdoSKAHyAX/knpzjPa5lvVT4gIgXVOxwD+rbmfttRLtkmWJcOLikyOQ9TeVlZbYQXMchOY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7PoiCRA9TVsSAnZWagAAl0EP/0UhhxSzZ4srGNojWsFc\nVj/mcS8C3N03y4YDRauvzj9KvS4PjDKV+ZmINp3Zx976HWERmfceJY+Lxf/w\n5Ib037jz+gfjAR1LRUGhM1aa2plls5oktmE2TVzy+Yz0wVtzQE/Ig0hMWlq9\ne65h8QjYANfKoERj67ZVdbVZJAaB1y5DVsHxsBrDg09erdEdgzC0xH9Buc/G\niMZWFUvRcC36AFBOjuCNetVwhOyCvAbhbq9BnuCrTNhoP6cbVLrvJJaA3SWq\nmPNswO23huMo8tkHbCPsXpcp8mZF16Qz6nOk7AZsY4H83UqaclSeBQzcLrlU\n3RaQaAqoyM7iGJnwZhow0OMXdKtqin1Tj0K+zZ68cNfjhCPy6ehRUL/e6J+P\nCxziGReGWmARnLfzZ+njKjz2l5tjVKUnBQ4mFJO1c9REff//FQNvlRtaSoI/\n35tr+5OxdrknBtylhpATrtMcCmn5ZJULDK/ZqtWh9Tb8Y3UoxM8mR7nA2w8r\nLJsxcQk1UffDRh8CTnrNqhI+QFYJGZfTsApI6yMn6d/nwpR9BgqCv0Q7d8ux\ntzU/XXeH4QI61oIcrjBBxIYxKVxbKtUfc3ae6TEVi37EPhTS5EV55O009qow\ntsZImMw06GAjq9MXHsMo19hnBTMOJAz0MCOt8rTWIjJYfOVQXo+caN75ppHE\nycnU\r\n=ZtPq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9385c454a7470957b8317b17264ca951d212ff1a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.15","@storybook/router":"6.4.0-alpha.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.15","@storybook/core-events":"6.4.0-alpha.15","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.15_1626143265637_0.8989571917503116","host":"s3://npm-registry-packages"}},"6.4.0-alpha.16":{"name":"@storybook/ui","version":"6.4.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.16","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6b37fc24ae3ff252a44e510f3966a0489a65bd08","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.16.tgz","fileCount":387,"integrity":"sha512-JPG7SZbajcygV6H8CuHBTFSOaKueYHljZhD7+gj881kU+CfkhN879JvJXTUsWk4fcX/xUNL6/EfmqPuz1lsmqQ==","signatures":[{"sig":"MEQCIBOs0I/0dmfSNFZ22pYtRWxIaYkulTLi/0ESIeyZD/7VAiA05N1uwBS9X1O5SYve4Bz5jZcEmZEfdOqr2y1p1PbqxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7bMoCRA9TVsSAnZWagAAyOoP/3fTX3e5L6lhaxc4CBcg\nqJ8gW+j5zvxJpvFOSWyK5qFwqzp+TzR6pS8TrqKxii1VhTKA2tS0sz3eGp2u\n8eiPpKaZmJK8xw/8WawC0uNSHhWa7E3iAa4v+NGJoqj+ifrAE1NiGcbIUR2e\nKKtfsBg8p5kfZ9fr6D/hu4oTUhAc6QPrnPir6QOx9F6w8ZMHnQSY+5c/wSpc\n/Sf3TsGgHwXHqJTleF8PYqrydz0PFJijm1HQbALhJl75FDNuncC715WN2W4N\nwcWnVxcLzcABGjfHiWXH/riHFbsylrybyvpnl8t/F1hn07AGgZ2xxDAKHCAG\nx7tT4wfivY99nDNP6d1XOS3LhJs9RivYfET8MzoG/spTa4ECm3O0p3M5JrXJ\nK9QVNXpgKpKkij2nGqBDdCtiTaiGGyAZFt4ck5Pu841urbhTa8ycEkrdWWoa\nVXVEZBhC6fWd4QeiqMSZyk73yp8qGzFzjTlrqjWLK3cqfQUleb/pzfNt7Lij\n7/yVl31fvQ5SZU/+I1jjHafFf3yPPSAeM+QUljtfLEh6qkAoCzfANmnLKU1i\nk5WbFEc/8hVA4t7OcMH9QPejFahxggiQdV/RGnR5vMfN54qikoXxFtztPvo5\nZIZ9JywrLX7QFsgl4brcefGbG77SbLpTBMSn9Cr5yXXt4ZkxyFSU9k1CraYM\nrncH\r\n=ELDt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3afa39c64e2efe01e567ce8946e80586d77a8b73","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.16","@storybook/router":"6.4.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.16","@storybook/core-events":"6.4.0-alpha.16","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.16_1626190631494_0.3347517167820111","host":"s3://npm-registry-packages"}},"6.4.0-alpha.17":{"name":"@storybook/ui","version":"6.4.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.17","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ebf4ffe04c283531a05683afdff911a1b80393dd","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.17.tgz","fileCount":387,"integrity":"sha512-xdg2cka51K4Op4QGm9vnEsScJNrd5K8GiH2B5HVuKsMcQDDwRAH+KuC3zhbvI6+xBm+Rbqoc4YHD4qXmV0X33g==","signatures":[{"sig":"MEUCIEu5mfRQxB0TcaDM5UyajNowV+VP5THtM7sOu0512tdNAiEA3N1XYsJJ2t0Ly/4gEWRLQ2aovreqAUHCfX1rPz36uDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8DEWCRA9TVsSAnZWagAAWlYP/jODKj/YBZpyVvEhdtRu\nHPJOz2/WFmk78eTLvV1DY2zMNXFMDfMftfmxBvzOO3SNR+E9LSfdyuIF76Jm\nOM6dkR02vx9h2H9t8PL20Rt+MDofHB10JljqMtBc8LFdjrewSW8/J+3ZuHAD\nNj/ONQVmCuCkqgUoSggHwMvskQRxn68/3KwwYeOaAFMNzpZX1YKwr0cERj0/\nhH0rU4mHFY23gjLuzDFF3WL64jT+eTgm1eBZ9Pg775wRE86FM032ocpKlzR1\n4Km4vQiGQU9wZxmhqheNzxuyDQICkc32xFuG7plOHe88Mxd+T0KLQRQYJkTV\nMaUCWHRVmcbVvi/w8n7RK0rOSMNLVvuKxusKjPsBsHQ4olbdefwan66TYben\nAAKHrdhjsfToNzjOKTbWI/2brTUO3e+ySaDKJAUjUpVyvV7MSuUj2DDAKDyL\nYWT9Sh1x7JRIL+Krt6EwkrXYtiKck9IUvrlZ+tqxjEXaxTliCFU3UnfJIWYE\nER/xDsGcbh32cPhusxLQQ/4i/VywgJLwyAQTrP3Q9HTpCffkvXhsFfv+MwMd\nVZuIMPvpd4xvhXo08ORieqwDJ4PP920Dt9TNKWeD5jqgvwH0XOaiwkWO43LZ\nc9TQxnVUdoG96fnGDqpqA2jII7kllW7GGeZI1dLNE0jS7iY9fygUJIqVcbCw\n8a2S\r\n=hFxt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2efd8b17dbeb1d170c2bd58b7abff659ce1bcfae","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.17","@storybook/router":"6.4.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.17","@storybook/core-events":"6.4.0-alpha.17","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.17_1626353941711_0.3230772281514789","host":"s3://npm-registry-packages"}},"6.4.0-alpha.18":{"name":"@storybook/ui","version":"6.4.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.18","maintainers":[{"name":"anonymous","email":"davydkin.igor@gmail.com"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"michael@lab80.co"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b12c7bfad60a1a0151aad5bac80a35c16835d950","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.18.tgz","fileCount":387,"integrity":"sha512-KY9gK+KaWzD6IOmmBzc39Knw4+spn0k8I/z7+iowbYSRapufHI7WQQtWo4qWHS74UfI86tCjDm21IYRtf7ga4g==","signatures":[{"sig":"MEQCIGuPv6IJj7oetUE1Z1XcQrkichi4s7XjlWhcEMYokQlWAiA7DaHYTesq8AfbrP77zdXLuwKEEGawKBWkxXvnmZfPow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8S9xCRA9TVsSAnZWagAABs8P/0gOaNM0k2izujLB/YOS\nCfuxQNyPRa3sGnYUFGo7sa7Psx//hdO5Oj4UCLt1axr/r3X/RP//TvNQWcj0\njKphodWSdMdKhEDm9uRr2hVfs50KED6w5IZiTdiPg0/rXVOC2fFJck9cKyqo\ncAUBf16ir8GeyL+6Jo6tmpiuVQPRfW61ZcUJcrlipwCE//HEXnvDwY1Dr8R1\nclHtehFcbIb71s1H2IZkjzVBSEHYti6x2hk5q6FSJP/0vsXKL4fYFYzKh0jb\nth/JkoZRbjQOp9rX0xz9/E33Orv/gOJKaPHSXlICDgM6cKDleFxCgtekSfra\ndElRBTFjVi/0bpUze8Rz4D54cy6UGzU0TjUiF/JKASmaVl8UmyLy+Ji6g7KB\niS1d1IglNrIv4r7rfTz/nT33C5MaLdgSNfb9WKRYUnNSL+chHCzO9puyQ9Ga\nHEycbpqP35lJNUzBvMl0mswMxqCL1UOUDXJf/f5vsj5RvxF2dYj+DwobmlzF\nf40c6SbScxMhAxqqBVRBfhhWqbfNNnET6WyockNyvhYxEqVgMg2fnlkIh6dG\nMLR0HBJYgtVtLXTxbd9k/9ELOjRtoKjSoDKFXxxeqtRBiY/67EIB4skZSPgT\nDx7An9WRSx85B7h2RspjZtUZMengybSU0WQDZ+A3aKEcNk78p8pX5PgefbRo\np9jD\r\n=Tdo3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"285782b4010609c6d6c9f306b8f8a110ae55f035","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v15.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"15.14.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.18","@storybook/router":"6.4.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.18","@storybook/core-events":"6.4.0-alpha.18","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.18_1626419057629_0.5865670772025213","host":"s3://npm-registry-packages"}},"6.4.0-alpha.19":{"name":"@storybook/ui","version":"6.4.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.19","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fe44da76fe77b637b62d9a562c9b92bf23f33f2d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.19.tgz","fileCount":387,"integrity":"sha512-2RQ+GIwSJDHP270m2YDbPp2Se/uXZsEv0PmJ2N0x/kY8wnPrrSmEfpHOBOyoySqBJv4d2AP+INCtaNE0gZsf2Q==","signatures":[{"sig":"MEYCIQCCykzlGFM2NwEcSObYdCiMmINy9rlif5WINsRphNw10QIhALke7nyLu30RgUDRtqw5xd321M3VVkFEzhVoVLefZ/eT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+XENCRA9TVsSAnZWagAAkmMP/16jIQx6FRl73Dd+odJK\nIXUuEJcNeE5Ai1fNbreRLyFQVHczx+R9LoWt16L1ZBtZitbCbSbphHuaQM3O\nPjEuAog9UqSwVGK6AlW1kQ6g3Ux3kvq6MHOBRp7WgCYQS+sgGV8gRBiBR5Dy\nWtVPbQq1QkR/iV5+CGJOenMTAr7shRjL+yjnoqucdtNcb/vWW/uM5oaRsuDN\nJeYKlDpTmttyztTcLhVStymxKc9Vdzgp4S0BA75fHvg0na/Taz1ee7iFD6Ki\nOQZ4+K3uKZQPPkdlsKt8+H8PEWhVkUsfrDnL7XWU7WrUVXHKMe/39dumcpvy\ng/DzoUNKZ1tIouHekiBoG87a/jmJFPExRPJYtM6jm7x9YTz3CDT0hx5OYSG9\nCFag7DQUpapK3dKAh88foj6nlewRD8ybrQRa96snggYv9h+crS9AzCFsXY0y\n03IutZmZxxhtTCZxSNY2YALJaWX5+35UqTcniKTlnh49MG41B3cx6R0FiTFl\nBPJmsuGaiWLZZgROVwLQMjhPmLgJq0lpAsopfwqvcU6Rw5k1wSrj0dL27mHn\nIgmS5gSwzbF//niXbNC3T7C8ybLoCurPyOVrGHDYXUuj15zi92648IBMh54s\ncNUCKC4nvifZbJP6KaZsYX4yTJVvaw68WLMCh7Uhf9/pfGtSQuLNnsROYV06\nV3cs\r\n=TPEv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e7979d9dc08b35e6fb76d54bd0db302d2d0ec263","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.19","@storybook/router":"6.4.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.19","@storybook/core-events":"6.4.0-alpha.19","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.19_1626960141761_0.8470001008269248","host":"s3://npm-registry-packages"}},"6.3.5":{"name":"@storybook/ui","version":"6.3.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b237c4ba69e8688a570f5ac967e9081c1260d59c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.5.tgz","fileCount":382,"integrity":"sha512-OCFnMCIhHgl9OwcX0WvPRgjIsoVUrhRxYLAsav67FI33qcjSCPDfN2aX+gp3VEJNGL+vmXRqLzMmhsfYaCQNpA==","signatures":[{"sig":"MEUCIQDIZocHeZGINEjtmQeKQvAM8b8PcxjEjJoujvSfhhTKFgIgctZdddapRFazTSQPsilgnzGLXeX8GAim/tAsL1GeOVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+XdjCRA9TVsSAnZWagAAXuMP/i/q7pIAAV7IxQx6rFcY\n3zsZRejdH8mfSS4xBI9m/bmx534t/j+wtZdorYUnt0OxhPj9K5RzxGs8pqBL\nCjFYh6tAxATkdlFG+EQAr/GOnJwRIzYvbbmEdbZzpAYTnskoTXHOynE4i7Jt\nYNf/1Ci0wTIxK8I66x4N3I46fdMe/uFhfi96/itbVUOTveKTZ9EOF7flr2Bu\nWR1iJ2tkUZ3TffcLI/J6vHNhXzwEZnaH95YcmDYqf4SI5eYybhqNGs8tvucG\nbLJ0u6i6esTIKIujNGsZKvia0fR8fUVzAqdqG/JMxkaWRrDLD82JguSWCNkM\n+H+wr3ZRRHKftc39OGjCBQ1LWTzjTrjgZoXLMg/Nlevp04sDrR2dBvCR4uu8\nklWpLgq0ipNdhdec2RceXMgERmg2VNwIdIgkoBvgSrcy/wXpoR8Dgmv8tW8u\nGAg3UHiq7MlwqDWMT2lLZMkEPNkQOSdhAoaTPhalCT/SS9+Pj3Tz9BZ8INn9\npBykd+75ylu8d1x8MgQub7+PmL3mMuiLS976hCZ3gLVpl7QRTkaVvTYxweZS\nbvkPXcMc6RyRXHL3RXB9OLr7X6wA32XEW1TMshFi0eGQJG/k+akElozvo9Gl\nbFslHR8i/kV7KYqw4fr5HvFwH2aL8wXWFHXmMKUAd5dbbmPInhb8Be1lrJp6\nrPs4\r\n=zkRR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"77befdc7d9b73bc9757a3243de9201db1b1ba360","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.5","@storybook/router":"6.3.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.5","@storybook/core-events":"6.3.5","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.5_1626961763769_0.031341614319625455","host":"s3://npm-registry-packages"}},"6.4.0-alpha.20":{"name":"@storybook/ui","version":"6.4.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.20","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e2a2c43f0eeef30904a3ac67036c2bf3b01ed130","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.20.tgz","fileCount":387,"integrity":"sha512-4is4mAnr7/t6Bju2e9FxuuZtKPeSJXPS2nUMQ4fcJEB8qcq5k/Xjb3qETcewWuZnau5+sIAzUnPaWWHU1a/kNQ==","signatures":[{"sig":"MEQCIEutLlKcayw58cOTkHGOGKEYF7tv4UX7S3i4ymv0mbpuAiAez6ViVxecTJXTe/03OLZA7ahElt+jLSOc4FmgAgvYAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+veuCRA9TVsSAnZWagAAuKkP/Ap9gK2TYH6DuDMmAhn1\n6xVbGRjMbZC8zSCzgQmB1SvGzkN2Lk53w5CWbMMvcfFzd1kZWggmjhd2ctOH\nlF3UUMFtPGyn7gjdTdVhsrprYj7/DxyI4Cl3g5oG1uwKf6fMrSBAbMc6XWTU\nB3kiQ07K3ySk0FBR8wv5LeT2gLC9dF8ZU7YxeSeLo5AiBbFSJn6ajsUAWdSh\nvhHs/0u3XbEbabiH/tENxWKzerhvm43sR+ACcXx+6F5LGrNBo0v9i7ZTZ8K1\nLEdOMaNt/a0qnLJn9YvomyAo3mh17k8rlBgflGbRHCA4edyp5LAtvMbvIeCf\nFvTNwRXC+MdzuUGvqiiVuD2EeE+O1mbOZWBbEa2X045+jh64Ej19O1uoWj5c\nfVauircLTZ27PCeQeL6Y7UZHKKmXBgdpj/pgKqsIneXkJz5w1rZE7kNYrjaG\nc2VBdJ3EE1K9qbZqQhkRdS40CxS1MDakacHaj8Vf6+0t0Y8LRwqacY5v34ov\n0T9nI/yEu9sa9Gghn+aUGZBf5eZ8FOLfWJ+kZT8XEulTJVJJl7+XX/e6L8kt\ns0N1z03vLacqwAPMGlqjeqvDvKRJX92DfZitzRseIUATGcB4pIIDLpV4jVGO\n+NTf85TTodrn0EYpVoRjjBRRn0nBnGvB2hpMvlFa7pZCll3HbP0np+e2AnYS\nJkeZ\r\n=SK3G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"58b272670e3465de561840030a90feb97ec9328e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.20","@storybook/router":"6.4.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.20","@storybook/core-events":"6.4.0-alpha.20","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.20_1627060142361_0.34624954823675114","host":"s3://npm-registry-packages"}},"6.4.0-alpha.21":{"name":"@storybook/ui","version":"6.4.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.21","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"409d1133250ea7ff3b9d0dc6dac2ce2f4fb999c2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.21.tgz","fileCount":387,"integrity":"sha512-I4FPfJ8GPnqXnKE7HQAcWyfTb9GP1DRtNKwZpeUSc8Vz6s6TZb0fGFB8LMtJimK/yAm3WzPd9ezsAN9AoUxwiQ==","signatures":[{"sig":"MEYCIQDPc325LDQVu8Rj+fggAOccWM+z0DKhNZ7p7MwRdSIEsAIhAKYOGRZgCtDbpGrxDMnlh8oz/uK/bq7hYYO2hTFNW85m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/hUICRA9TVsSAnZWagAAFHYP/2STHrYhD0FEDYklPNav\n49ezDXE4E+SQsvm60/I5EfIcwu12TQz44Eq14vwllFt/yhbsC1NZT5hgA5FG\noc3jNbeFL2i02FPwGvkTRyutY1LzGT0rKXByapyMB421poR1yP1Yh8m7P3Aa\nDi0rJioBUD57gGZgugk4rT/E+j0zTHm2wSbLRhzCemfvjQ4aJryXHb3JTi8j\n0NjA+c9+9sDB1p6e+xgxZHPtSbZZfsamJQd64fCJ+goHwvAOxS7Euk8bmjyy\nWwDtoXOyR8Uv+DKAgMh+aeL7+N2UwsBKW85uFxCP/eLu6Qwz4NOItUZerHP9\ngonMVrEpwCnYFMtChw4svFhMnvn3cXwMcp2j40fz+v0Drrswtn15Fbykba5i\n35QUNxLWoDRjWP2OFYG7C+p4o5ItttNjyZYZ/ZOJK4bAxYOz6PJOaKi1jFFO\n0a9z1lo6mV9PvzkV+prUhrqJoGpa1E6cXRj3kUdBo6oSXAV7cQKsfLRPtpaE\nKCovGIwm6sgYLMOqnq62nKuTuM7wvXoM6Uwge/2zsBbhQ+0JtfwSbZJtUCRS\n9FB80ffky+HqHm6uvj5Ij+C/dPZ8vvxIdC9zZQUg3JnyrBtAI46RARDJwjfK\nuFsWb8pZ6vdReyh0jjA3th4qc7VnCv3piIf4OpQk+yQYjAhIMOniw8+S6qcg\n9SrA\r\n=8XBB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"02b6a8dd92c9e139452eb65618231defcac89d97","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.21","@storybook/router":"6.4.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.21","@storybook/core-events":"6.4.0-alpha.21","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.21_1627264264239_0.5302032494452877","host":"s3://npm-registry-packages"}},"6.3.6":{"name":"@storybook/ui","version":"6.3.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a9ed8265e34bb8ef9f0dd08f40170b3dcf8a8931","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.6.tgz","fileCount":382,"integrity":"sha512-S9FjISUiAmbBR7d6ubUEcELQdffDfRxerloxkXs5Ou7n8fEPqpgQB01Hw5MLRUwTEpxPzHn+xtIGYritAGxt/Q==","signatures":[{"sig":"MEUCIQCy0uKXhKa9KMZpz72rPXplrOPtNtcvCsKQ+hRK01Nx7gIgNdNbZ94WLWTZkBGGHg0ylW9yJkbUqyYssmCRPLz5rxU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/ls5CRA9TVsSAnZWagAA7WkP/RKOO2Rl9g9FzsceaGq/\nVEj3qwxZJAq/kd28G3nZq2KB+pHV8otnqrknYDUSp3lv4jkObYsd/lyVrkqB\nRLhKgW9btaIHFuznRDh40xUwuUgoR1QdYFCPR4oJxAPTRcA9l633ccW4bSbW\n1MxxQN0fHk/zs//1JMpZMHVdG0mLOfDBEOWnogax1JQYe5IxH+yY5EkClDgb\nq7bwG/QCOi11Xc9V2R4R3TB1NVcl8kVn1Mg8ePJ8LAWFNuzz8Et8Dkoq2gUQ\n+tP9WZxnokRcnEBgg2uXsrVTCvj12t4fuiiPIoR9g7cdfCaJVOeni/+0ruKZ\nQ0BiJ8VqFQafepqlMq1+8DSW13w6cJjr8fI72br9b9CCKccD9KPQ7h6NiEFw\n+z0tD0/70nnaG69W+7CEFjPfaptFUP8952uP2FN+o5RrlGwBbYWRSa3jdPHl\nCTqu9rsOsfZ24whcPtXRaHvc79E/W7+XGwqe5R8zkDHr7wXoM8cgtkpXEoAX\nmNxaOVK5WUxqkrTSjewDnfG9MYCMr9n6i2n7xJCeKgXhangUw5lUCmBr+wBK\npwbgfLhO+UgDMidfMtIkMNrqoGycK2pekEkyBsL4h6HtqDzlXcQpXakmUUBm\n8rEscSdhbtDZdJ1NF99WCed5gf90HmAPev63yQq9c6z2KQCYWTXdGK2rTmpC\n06Bt\r\n=eMn5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8c14e96e8ab21e6008e7c8458d7515539d448e06","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.6","@storybook/router":"6.3.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.6","@storybook/core-events":"6.3.6","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.6_1627282233644_0.005981313960115697","host":"s3://npm-registry-packages"}},"6.4.0-alpha.22":{"name":"@storybook/ui","version":"6.4.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.22","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"df99c0d35159ec81623a0bb4c5ddc8cfd1df249f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.22.tgz","fileCount":387,"integrity":"sha512-xhUGzGPQeCSTU/C7RZqR+h4MV9qmk+BdMbpwMX2HtUKjoKsPC3qZ2D766NKO319o+CH6t9+CIiEoqSovZAv9wg==","signatures":[{"sig":"MEUCIDwBSLkrZVIsYjDFwFxLe87Q4KAsIsJr16PpuJlgVV0kAiEAg6yNVvhAT214wjCZb7p0JKHJWp3vDgtlaDOOUg+JFjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAMNsCRA9TVsSAnZWagAA+VkP/0A5XdXcn6qP6Q+pAYZK\nFXTXyJyPyqgo7lN7iQrBSTZXVou7VLcSjGM3A+Canrxtp9AEphixaTXvkWss\nHtpmawihAemwOXt6K+20wYlRE/++sN+D/A+X1C7+IO7N2gPUYYMuLp2AV8M0\nMfbfDtKj121c2nL/xaoBUBir8huk9xJsJ6RkGMKfNFUyFH1NsltJK/MAE1e7\n7djyyhfJIZaSSZbbJR8Cm9kUZlg909RMdbZo6k7RO72gF44wXjacOLDShu3r\nGJ75RaXYz3rSoDOFjW1Dw8XtaEGzsj55SfV91HSgkH1WfiGKEg/w8zC5SWn0\nVq1NFuBeE4I669j4rBbddKYN9QfwS8Vd9Mjpbo6J7nzqBYJ7yRUarQ3WPzbV\nJcElgH95qIFhFbO4DcSKGLZuwtw43u7LOT8TZwDQSaBKhl98CgLrLrvlkjZ9\nIAHRGLKtP9vgUgbZOlJYPKqbYsC0C/n4GmGBjxcnuGUEvniieENMbOZCrzII\nTFfh4ZLZ8OCv59AJXm02qad3Z1mkdGmkKL5hnV3q3HhYWfHLP1PQsL6AJYNz\nLB0zbe+0vTF/vsrRB/CfXFpMpSpKCqSXC4epjtsAU5v8CwNwYTkOBNDhYS75\nBuyH9F260SsGEpGv5gz2cdm4BTW18njhOropjQ3U6RB4wvYDzD94Ht6x7F/E\nPQlv\r\n=d6kb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1af5a50d379d84d33f9bbe798f18e8141d967010","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.22","@storybook/router":"6.4.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.22","@storybook/core-events":"6.4.0-alpha.22","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.4.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.22_1627439980324_0.501405445470164","host":"s3://npm-registry-packages"}},"6.4.0-alpha.23":{"name":"@storybook/ui","version":"6.4.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.23","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f6823f14177f0516f1a1db1542d3307dffad7ca1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.23.tgz","fileCount":387,"integrity":"sha512-rSi0HYZ5LOVkcSZk7R1ZFTwsCWdGyBi0BWfBmYQQK1ds2Lg7hRzXoalV+yXfn8mW1D0d3Rxr+S7trejWvDmnIg==","signatures":[{"sig":"MEUCIQDkNDS60R0YQ4r4gznQh399Nv8TWAF/8BDNWdNPFXWtcAIgGdCi2YHAgVlLSpRJVJS3KEavy71jJVcRTUo6dBbJIa0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCUtTCRA9TVsSAnZWagAAP8MP/RT1zwmLHttSc5OyTaEg\nvzzdwooq1uBv5k8w04pn09bSADrv3g9BKaPDPNro9YHD7tTEGAF60Pg1/IWh\nc1aQ14r+YbHgczBYIP2C3A7iXa4l22ILY73mWwcP9gLfPuz56XecYN+zh2uq\nAEKXVG33vwsF/VFBFDkPBh4aZU/33OzGT+IXQBGzdp+jhrI68UKyAyoOXXgo\naUZ8FMkQZUoAs8R2z+XfDMZnzs7enZmCAhGN3HK0Ss5yDFQxeSv7HlDIIacj\nMeWMyfsZn3FlRhIczVloI+GqLhaDzbRVWu4Or2K55ca0PCchllqbvoh5PxeV\nYnd3owVpAP3ILbCXBuzATjlVoIp36IjnCRpEtrKteeDbE3bk7EO1OUC0M2ob\nXgjV0x/DubgevE9TdMinOhRjRQlvT16p4cB0dJ4VM9Y0i9XPA6WmY2gOjMtl\nYT4N/HSHcUtU90RVzoPCH2KmpaDbmUuwn0xCQimzr8OuUf9B0KlaagnWeW6V\ndKXChcmR2q8TOc8JDr7nOof4kgFT2Yfd1JXF0bTkBVSerMCpMMSQxs19ypGK\nPctMuXVA2FCJi07iLy/OUkhgS5ar6mFhKo+II0cHG05Dg447Q7RNZ8SwdN8R\nk8A/0+Wa4/aDQnFwKKitJ0Mn8y7Mo5fOQXyGKopVzR9xvOKcR+PgC5112w5U\nEawj\r\n=P9bI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"691fc1f7155bd50179573b146c45f9528d2dc7df","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.23","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.23","@storybook/router":"6.4.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.23","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.23","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.23","@storybook/core-events":"6.4.0-alpha.23","@storybook/client-logger":"6.4.0-alpha.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.23_1627999059433_0.1771811658977407","host":"s3://npm-registry-packages"}},"6.4.0-alpha.24":{"name":"@storybook/ui","version":"6.4.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.24","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"88b9d2ba508c9dc4968f0c44af5e606bf9879b21","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.24.tgz","fileCount":387,"integrity":"sha512-kfB35CqqwQJNi478b3WhvbWhMlVQgUxC4XHzfgopu0jpkaI1LG6Fn5FgQoIEAnfKoAy3D7QmWU0Aa6ao5NCb2A==","signatures":[{"sig":"MEUCIAJYcemmeNfvF4Nyd8YadxS5Y7YkTKCS/3Odvn4LZd31AiEAhv3PVW74eSR0Avn0ULHDO+5snqT0PQQsvinAQRWt3FU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCqMjCRA9TVsSAnZWagAAZbIQAJTPdwn3X4qg7G4fWnFi\nV42THtuZkwgjzxyRz7XK4LTxbBhJJjGY5zw9Sq2lLXNA8AAj+8BwWLOaFzG3\nxC/hdi031PGmyEJT5wFN+1biVgdvW0FL+AK/n9fcRnw24kS5hKsxiGFByRzl\ntoB3ukVzGmstUPiNCfZkx2QN4v8Fv89ovsJd+zJeaUm52xU6F16W78oAU8Ly\nZJ0sLCcU3PTJuHmpiFKDizWD0BYaukAjwFu3SL3ru6SLcQ1Ge7k9GLL/GbtF\nN3oJkBo89DSm6i+PfroKIkeA7Mi/7Ap0hgqeA+pzj9zSqm9mcy8mbi4FLmmi\nDJLWQJ86uUHZOCByWg5T6q75XRLK1nSNLey6M3F394WbF9DBXh2FkTcafjlJ\nbJ3fEBet8VcXB/2dyRc4Qat+Ra0s8UzcQDpX/+CXuGdfhTZCleFZ4peIviUS\ne565st1spbPjU1biiqBovmUsccvCvoA6veiFLdnhnPaN+e4Xo4CniQCNTFJj\nC5uroENh0BqvpzcgUyDcjgKmgPtrAcGWMEdDkOQlxnj2OqOPnTcOExvkfh/E\nFquzmMhNfRiD9gF95c13XFj8e3GgPchEmJiBfv9cbg+EGX2T0d1Fw4TDEOrg\nGa09AOs/iCOiqJuprdjcAT7324bgvN82sOVyCbSbSICLh31PIgebiwrRtx/m\nreR6\r\n=D0oC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"790c1d4481fbd7598424452f5de59ecfc986d7ca","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.24","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.24","@storybook/router":"6.4.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.24","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.24","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.24","@storybook/core-events":"6.4.0-alpha.24","@storybook/client-logger":"6.4.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.24_1628087075081_0.19979510009112555","host":"s3://npm-registry-packages"}},"6.4.0-alpha.25":{"name":"@storybook/ui","version":"6.4.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.25","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1a9b39935c970f4d328bc021e2ce8d19cc9b795f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.25.tgz","fileCount":387,"integrity":"sha512-eBNDrEjt9+LPxdY0WHoclHa8979Fz/ehu/BtRjT7D/VO/3FwPt+4jlmaNWpjZ1MhBD5aUvUGJdlOjTFL0svSWA==","signatures":[{"sig":"MEYCIQC3XAJkjIQCusU12ZGzKdxbpjTjTuw1ru59ayX2EKqFeAIhAPHIFDWlKnn+8BHS16PA4OBEaqKU8Y2QNVC3fwB/7u2l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDrkPCRA9TVsSAnZWagAAuqgP/3a2cl+K48rQIBz5h94B\n7ZrS27x8lrA3jpf3tpvSAnxd7W/BDYjBg3VkWvr17e9glsV3hN9vuXg1zyil\neOfqjdd4HQgSnsjoi+/WfwJ1Tntzw/2kO+8Ou9Wq2n9Q8Yf39vQVzG5yLCQ7\n3I89bSaNXy5uLNLmJb3kzD30N/3TqJrLEHXxJMU5nXSgiDu/xPF3Xk9pZpVx\nYBnuLl2NSlIDXFrMMasQTMi8MPeItaZFeqiQ0pmzkMRrCDB5u8Cli+QocARt\nH1Rj3lwomWSKZMe7SWrf0qhKumkVXyWY021inUCpl17DyjuogM2mH7l55OdY\nG+z2d+6nFpKegavCQ4WjsVFsozPQ5ginrmAivlUHkSyso+XT3I/H6ndkmfjX\nIbADcABmbEbDgJnuLlulCqx4Ec1c8lSj0onp9LGFMgBF3kJqK9PZPYmCgSzp\naJ7mKOXF0QVlorKi1ZagwggLGqh3hTcR8Vrmtkp3avwQxPqfq8RxckO0oHiK\nrZnfE6ITZM2ONnVYMhlQtIBRpG5hkj2gcwH2NazB1Xfifhkwage+lOdCqvjM\naS1xGfa+nZhdmeqccflH5z6dYFBCHTQqM4bE+0yJvA2iS7zh4UJdHktKljoS\nEuDGJ5iBqZ4IjBd/GQ0FDE6h5tJP25iT085haH9xIXH8fP9IBm6kdN9qV9zc\nwWY2\r\n=DCWU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"09a919286d2d3caf1709026386085eafaa1ebea9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.25","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.25","@storybook/router":"6.4.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.25","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.25","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.25","@storybook/core-events":"6.4.0-alpha.25","@storybook/client-logger":"6.4.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.25_1628354831469_0.6556071341470617","host":"s3://npm-registry-packages"}},"6.4.0-alpha.26":{"name":"@storybook/ui","version":"6.4.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.26","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ad0fa03156bac41c152b4d9ec636b920b32cef52","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.26.tgz","fileCount":387,"integrity":"sha512-2OInjvjBfl5qquXbymmqcobe+2YPBJ++hxm9miDTgMrhaC46RMtlkn/30GmlKAcymtDQYE1R3skiJXn2LmkclQ==","signatures":[{"sig":"MEQCIDPwE5PDY91QIGALWW1yaYke4mXJx+jqJcRYsaxAXwhNAiBWqaGm06+KyRatYnRJ0EWkXTMSbyBHDXLR8bV5rWol8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEQ2gCRA9TVsSAnZWagAAbrEP/3Am9kbNUDl470ZAq2Cj\nymnE3Wp0LUioq2M7ht3ysHMsQ0V1MzDRBoWIuskQ2j7u6vzEYyD6mGx/1tX0\nXlDph/vD0rKIK3XbM2WKRw3ArEvq6m4ZU6q1f5eolTlmr46ZjLQRkY/pTseV\nGnlb91Mzv7aQ7pTSw4gdbr5vs9n80ly1ed27AjD6t7krMdY9zajaLfMePOWP\n8LD2NeM3qeBXdA4wnDeRtQ869Z9xqUP5EPbbBKFbTbwFoTh9CE5PouozEKdb\ngp4GpK7AwsklNWCuiFgMpYLkpT8vWgXX4BNAJxgSFvVS+rhC87O9v+zJaqsv\nc6UvZJwAaxnt49YOdNp/VtSScyrYGBKp5I6V/EsyAeMYmPS65y/jh8+RrQmc\n5VNHN6oGJRI8n8gzZMixCIHvVAgq9zMDl0vPEpgILl1An3Kwpv+UHsbclqr4\nJTW4GEfwJF3RgXMPo3VXeAxRS332EYzoIXnfagm+dA5yipcbPtQk/nlwEaWC\nytcmVgEhmz1RI0HhK4NOR1Ozl2GAzUyJvaGoQ6QwHp+ynwERCqswYxjCaCit\nfBLE9SzpHqpaxZu4cBGM+PAXv1xher/YEtBYxKEFZl1yJgOp6sIHC+9oqZOe\nG14upBth7gpceBi61ayiRMJYxgFOcG834MPbTkCorNdG0IjTQTwUutrJinnW\n1wCF\r\n=/vvs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6962d573023a8c779b676c3221b14b9d89c20cfc","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.26","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.26","@storybook/router":"6.4.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.26","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.26","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.26","@storybook/core-events":"6.4.0-alpha.26","@storybook/client-logger":"6.4.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.26_1628507552801_0.4274499633609563","host":"s3://npm-registry-packages"}},"6.4.0-alpha.27":{"name":"@storybook/ui","version":"6.4.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.27","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e6ad4702596c549ec74ec588a2b9b34917d04875","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.27.tgz","fileCount":394,"integrity":"sha512-T/FQ8eFW5cGU0M9lmYzvN/Tt56P1WmI68ZVdkBBD4+u5JJxUiXcrheOcwoPoJNWFzTDQQ8wzmm8VW50dhZ0+ww==","signatures":[{"sig":"MEYCIQCjinhBJJMQLIMQvRfL+Pfc1yc4ReVirAU9bAQ72JJj7wIhAPsosIShKQRW3HAmHr8gxm+3bla8hCbYejPHzAxxGZWj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3565245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEV2jCRA9TVsSAnZWagAAOdUQAI4LfLjtqE19f1+9T/5s\nquMm6/MxJJ+zHT3sovMJB2lYVkles6/BQQePjAQGjLGa06Suzv1MuW75+DLN\n1mUyPSIvHdooytJEG6y/boBiq48eNUm3Uri/r2fS1Y+PnjIG+wDFbxIozRww\nM3QULbaGFxeb64GiHNFlyzaip69Rt+HJ0fPb+g0T1/myPbKgJOxEpQxaIq7p\ngVguTs8/g+nxyTmGhCHMbms+xURrOrKb3HpPj9r4Fae8TWX18gJffXu1tK7S\nr0fG6tXubmNqL3wEtaAykOhG/PfsGpLpIFV3AmEUOKZngPXFtrp2LvlZjlOr\ntkd8XoK24QQp8ochJ6LxBXt3FlB6Juc+nEPMyXRjcRBkSzPGhKaNfvrGxdsr\nv8xJvMF8Y9xWev8pSbSR8Y+zEjw4klb4S3rbGhIQNGfX5etx97FpV6syj2GE\nA8+4ekGu1GMffCds6xSe2L9oxd9c7ieV3MP5xL9VRGdU3VdPDsNHAw4squbY\nS/nWUYOGusw843zOu9z5/FIi9+iX0ISqGyaHLmz2q8SBoh1BqQKmR8U5NCyE\nxPRtrs1msYgXmPByRuced4S9vtSQR2SyhmR1x84WT+PkFO1oC9Es0tKorgvC\nTJdJooE2zUc4xV6pxKZkVg4usTapNklSwiAfmJ3NxwdPgsiTeuqeMexbijzS\nPO/7\r\n=q+cH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6962d573023a8c779b676c3221b14b9d89c20cfc","scripts":{"prepare":"node ${PROJECT_CWD}/scripts/prepare.js","build:watch-tsc":"node ${PROJECT_CWD}/scripts/utils/watch-tsc.js","build:watch-babel":"node ${PROJECT_CWD}/scripts/utils/watch-babel.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"description":"Core Storybook UI","directories":{},"sideEffects":false,"dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.27","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.27","@storybook/router":"6.4.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.27","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.27","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.27","@storybook/core-events":"6.4.0-alpha.27","@storybook/client-logger":"6.4.0-alpha.27"},"publishConfig":{"access":"public"},"stableVersion":"6.4.0-alpha.26","typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.27_1628528035414_0.8129019294138133","host":"s3://npm-registry-packages"}},"6.3.7":{"name":"@storybook/ui","version":"6.3.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d0caea50640670da3189bbbb67c43da30c90455a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.7.tgz","fileCount":382,"integrity":"sha512-PBeRO8qtwAbtHvxUgNtz/ChUR6qnN+R37dMaIs3Y96jbks1fS2K9Mt7W5s1HnUbWbg2KsZMv9D4VYPBasY+Isw==","signatures":[{"sig":"MEUCIBbb2GvLbMED0De+S7y7bRzSX/JQ0vZdhqKA9CUjpPOJAiEA2ecAfWHZxK22cqQFh0T/BKYWrxnePWk4jfBNY9g9P5w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEWYyCRA9TVsSAnZWagAAxZgQAIITB1vPAxQbkft2nTn8\na1RW1fRXJCdTmPQl57GtI0GKA21wOq2nXhLsAdWo2dEfMmBJ1d9mu/QfytBY\nGlnfGpvk5Ktn0U5kNO7x6znNDJgPs9+WkG3WPmEAa+fZ0xNwjGxvDlUgmMWO\nBWQcm6h7q4W0uQvIXTNV5woQ4UDpm4PH6GT/srTjxXiRSWds369ZEaw3n2SU\nczNN+OyXAZ728rUCHjBS5IzblU/ytluUN3VEIU67FOrbRhQGzwSliMkPGBJU\nJzpZTa8+TcMf5gF71YmhF8gvKOQWxb2bsMM4tf5bHlbp8do6ioXEgGnsqd/4\nwgSWIEjnLvIpb8KM1rW76TijPYzgZisJ7weK4YaZqnVg/4XXh/ztA1jxkJam\nxJz+5r90fCB1bUKcZqsvmc7DvMrzuYS9QXVkSOXv6BgsPXXIwwocF/HZJjgq\nlijn18upsixtov4yfU75nlE91WCmIrDUyf4vs9p16PQPcXNCnpPDjM1Ex59H\nCYl/W/1VUqrbc2ookLo9cPR7Xc4cG4yL7DG1OSBVBMTCMV5uEzY/nd2U+hpJ\njo4S/oXeNoEMx7vAem0+tTMBmo3+PUqbTBwp/ies/XC8xCVU6tlFnCsNrck1\nkuMDPOpMVpFIttc7wQ1rR24ho1u9tCj3PV0NYfJ/HijksIafbrfo9SyiSFcy\nVUZT\r\n=GvPU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"57695ddcfdc6f2b5c6534579d84066ec4e855679","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.7","@storybook/router":"6.3.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.7","@storybook/core-events":"6.3.7","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.7_1628530225902_0.40520620940313257","host":"s3://npm-registry-packages"}},"6.4.0-alpha.28":{"name":"@storybook/ui","version":"6.4.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.28","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"31af7de9039f7ff3ce1598ce5bd2213f0b0ab8a4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.28.tgz","fileCount":387,"integrity":"sha512-lv+MUOXd+6eQi379xxMCnkCuPVEQ0c8Sckgy+R5JY3zzkXz7ovwd7jk2pPFBHZzPrvOnNN3yAJn+ajyEkKEp2A==","signatures":[{"sig":"MEUCIDwNQVUbfFrJlabdwEsMpC7zyA5MvY0iHdNGuGohurv7AiEA1SxhZLhQ6zoz98JYRjj8H5NOJ8RyBCyJoXf2Z/uyIsM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEWxfCRA9TVsSAnZWagAAoBAP/jj4Ke0qwOmLPDgO1mbk\nz9tJfZar+aJXQNwZtrghNLadSYgbooJuPFwdzqYsW0rAS0F4dQqsVj5XRos5\nxJsdcacFv08ZzxnXH65A6BMvz8MwRKp70xJ9YrSGDPgfQb2dDjC2AiF+kG4G\nQ54bwT4uslF39o40j/mIevVDcFqAr0gDfgnmatVfMibmyDQT12ctVm2W4zOW\nKooEzYTsxBfNwuRKoG5dAKoM6Jbl9niH1roGNtSRmBhdUTGzA0gJXdiOHFPE\n8sQUSgSdbcbh6buc8vNrUgmhS2bq8SpRcYhb6BygvswU4KsrqHz+LUySo04p\nEqDCb9/zZwpa3MmPBWIV03tDjsxfFLsG82w5ofRUrPjnCdeh9z4mkieXpe+Z\nc4cUbqWdmwO84yZTi7jNx8+i7AyhO6ZZxl+0uk9S9Q/Ki9Lrmdo7F1QxL9M5\ndr7mEK7EmbBFNoyNzyJQl4/u+F/Wj2FHm8V4gQ7tYV6j+Ga/M4Z261tTUjcL\nRsREU0Us1p9JX0bghnkQMf2wR0DQ3J9nis/XCMQtRJaUaSAeD7C7aZHIXIWc\n4b/eaU0K/VHXtTDZ335J7G83SdSYvC8u5g3Wug5bipRoegUNyFUL0GgArAIX\nLmD+HObvDCkzZYkL64gqTBOKP9lA3ROWbqLJBTm9PNG3mxk27VaV3tjSkR7P\nk/rh\r\n=tK4Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"921d1b75b7bf5876088fd6c5870122474df28190","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.28","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.28","@storybook/router":"6.4.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.28","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.28","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.28","@storybook/core-events":"6.4.0-alpha.28","@storybook/client-logger":"6.4.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.28_1628531807691_0.3608665013711885","host":"s3://npm-registry-packages"}},"6.4.0-alpha.29":{"name":"@storybook/ui","version":"6.4.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.29","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f90294c6d088125a9ad61875736d48babc057d1a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.29.tgz","fileCount":387,"integrity":"sha512-GS8/D32QY+usQIxAcX57ZjzRCKUx4tvj8vpNvdwgU4nqRQFDxCZjxGFn559ubIhHupw208somQHiywXP7Siptg==","signatures":[{"sig":"MEQCIDSJhc+/U+ucTVLUOEaAqgRCVd/UUPNeSsnclUbu/D89AiBfa24ENG4dj4BdMevrcq+D+UdpT3YVz+MvPCj9r2Q+yQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEonCCRA9TVsSAnZWagAA0qoP/1LPMH2rXW/TvRQ5sV43\noMkF6KG3O+XPd4Pkyxc35FNvVe7Y5OERsZD6S5R2PG+dRE2tocC03Cc7Tfn4\nH0ay3eeDD3hK6fA4+6Cw/BcrYhAgCr197kKAauU58h5enw6TyVHIdnVn7UbR\n6poJo1iq/KvlPQkPrhDyF+C/hG43rvKCBoB9aOH1gzC3KYOp6Wbpv3LQAHLb\nWP/seNRJLBjaqDJ3+dYCnUFl1RHcSmCnkxZRiP3aMYdCW5+F9LMa5nh3vgVw\nFJmmLsho6l7x/I/Wqv91E2vdf+ZmeGG38CLLqzQZoWLHIbFKlQ7hFciL6bkw\n2wmNvZqez3OiiifU2+LpDy8CMkRh6eyB5Ws6LYS30CUziHJKtyj9vcGAVGgc\nTMPKgzsWkx3IN/HuEgoigBMEAFcgYEIIig+NeiZfF2CoNobM4fgnywTyql9F\nOYRdK1r+I2tfJpeD+lgv/wx4N4llpddTOOhZmHYcQI1D9Bp5ba9Gii+Dxx/x\ngLJlEUht/QTu8XmTDJNZ4J5EkjMG6IS4Isxy+U3lLS3/zI863Sx0mk6yrXOX\nilVjSrifhr7Nfc04p2lAktFQQZV12UUevijwIhZhBBvGr/pm16FRk9sXi4DN\nw4j3uTnfP4CCzDp5Rgz9R2Q1N43uAg4vEGJmODQpSesbqlCB/A2PlSXa6Mmz\nidNU\r\n=2tlC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5fd2abf6676c3961a79db0d1dd21114c9a0941d7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.29","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.29","@storybook/router":"6.4.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.29","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.29","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.29","@storybook/core-events":"6.4.0-alpha.29","@storybook/client-logger":"6.4.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.29_1628604866478_0.8904230648750908","host":"s3://npm-registry-packages"}},"6.4.0-alpha.30":{"name":"@storybook/ui","version":"6.4.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.30","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9cffc7782e81bebe592c5fa5f8a65dd9b0a95ecc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.30.tgz","fileCount":387,"integrity":"sha512-jAJuD5eDq9X5hqZveXpOVJTU7EH+QeOpV40IRpRb9I+LgNTilG/mx8uv3xjcxcuRCmgcBEY6DRD6a/lQTuJ3Eg==","signatures":[{"sig":"MEUCIQCc2TXB3ywQHl10Awwbfb0NWyVknuAqN15RXOmWcat5EwIgL7spa9wdK8ahMIVOmaU6B27S3bi70DUzz399+U4HiWE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3549570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF1GNCRA9TVsSAnZWagAAjs8QAIKKjNXmPDO9B7MOQpaM\nH52rmopSt+P4mRvTMQOEwGtuefAynXwaw79xmfRe9ihIKpiB85nrN97V1ryB\n34osOakU4hipSPzoQyiOuJo6xrJAy/4Uz4usRhTPhuf56yZ+8LQibBt0b/RC\nRGoLtoXeFikILeMGgcT68yx+dJ9LxeEmTC8Z0WOH/OVoOVzwrDW5J3mnyLoJ\npbPFSqbVFUZes//Nqc+pNwhAl8LICpRI9E2LAiE+Sc8WE5tj5PozLat/SFKV\nIHQ8iRw+e7heWTvJFlaRXhMkAmgGYlmYJsrK77AO2lsmWeRltgIp7Wrtc79T\nnplO5zwD3iE9FtkdudUVZveEPiUuuziNOauNb2vPLV+Q7pcpmUo5Q35n6Wiq\nVCSTLu0n0xXIoH4AolINP5u1AiojeFnG/zTkGgfrzihaqjxPFS44YyZ9u61l\nUtYf+wTLr//o/o9PBcDEXh5quWUqV2Q2bVG+y4UCdVp3Gqpz277fBW3VaqV7\n+Vlpox3C6pDwfPrHAQbf71OKJJho3A6A+HWkLREyqaIL5w+fP6Fa+N+RcUEV\nuIZHYCziwJauheMo+ePUKhYlsSAQeDNdoqKNeo0eEW6RBoiLnkDbDLSw/kMM\n9lRzrZQhe3XsRwqZmTuY38T6LYTCVQKgBPQx8OlkzRJPmWrFBdsvhwIK0my3\nCutS\r\n=oqGf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"271665e76bd5ef0287fe0651831f771e693b3b1c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.30","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.30","@storybook/router":"6.4.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.30","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.30","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.30","@storybook/core-events":"6.4.0-alpha.30","@storybook/client-logger":"6.4.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.30_1628918157577_0.019797884115844377","host":"s3://npm-registry-packages"}},"6.4.0-alpha.31":{"name":"@storybook/ui","version":"6.4.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.31","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"05a440fb2a41668219341e2b8ad5f2cbfb30b974","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.31.tgz","fileCount":387,"integrity":"sha512-uGhgWryRWX+aRVXHdziv2nqUGTksb3o7XVNOshjMFaje9V/cgRkTxz85lh35CW7u76cDvBw9K7ntQQEgro9viA==","signatures":[{"sig":"MEUCIBXLPApr0HC5n4Hulr7bCQ3tpxIxWuGlW7XzFo906LNUAiEA16KaXKtyt8MOXIKCR/kE/BqmRVvZU2EYtbYuYatSH+A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3561214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIxKvCRA9TVsSAnZWagAAFD8QAIwPcmWwQsAfBzUeHcR3\n7x9hyrRLZ5Bn6L6Q1xqRdNPaBVRlPYFR7sw9Ms4LJsjtUPwmvqxGJnxr432b\ntZ0+ecoSyI8ZCcwfspjBwHCp+H6B8HkyzwwuFYS3m5TjBCIhN/27N93b05yl\n62bIPOr8UBsSK+QHZQEhVcAcEs5Mp1E46DnSYsXdzPtt0BbG/yx1Vl1CEDK9\nRtXwf5aMywwPmmkxJDTUWzxc07Smm+OQgECxJ7GXOT8DC/sQTyAsTUtgdl6B\nyv61f0DwKHyhVdeNONp+1LrXpEOSEjw76YuaUnOqMZBavPXjBzTor2xi23ZY\nmFcw3McM7vOWYiD46kfzfaRd2qVfTWZDElwM3omGovHZQGoC1Z+VI4PNcdqD\n+Qnkiq29G41ZuY7YY/vuzenRpIxKizvFWBItaoZH7oZ/3R8cKzR4h/ow+qRg\nSYMLqz6+jS1LvP77TmzmI/sIQNynXa83ZQnXIzCVtb5GgjVtHJzyJBnFMjvf\nS51/pKEGSw3Ic/et2j69ADi3IYkwEHWjE3JKkmawGk2S4fmooOF5Vbl69m6v\nKukChxFH6kc35V11ER8O+VmW8UIxzCqsrcvHAlfPsmlO0kXtp3v7s/SWZY8j\nGMRUlwgM4VicAQelvwtXF/FYFGOdomsM2aITJ3rXqtOpRH3jJ3jDu4jM9TPe\nWTlA\r\n=Akxf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5582ee2f669286ae640067f27354516c941cd5f2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.31","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.31","@storybook/router":"6.4.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.31","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.31","@storybook/core-events":"6.4.0-alpha.31","@storybook/client-logger":"6.4.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.31_1629688495083_0.9818230314579595","host":"s3://npm-registry-packages"}},"6.4.0-alpha.32":{"name":"@storybook/ui","version":"6.4.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.32","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"447586a24f928902a2a6c8a6bd23f47a69aec9a1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.32.tgz","fileCount":387,"integrity":"sha512-uj8Vs+8YsFuER7eswzduEOpuvkOuUWfvSqMpU96Vl6+v98CZJ+BkLCjf6qIRR4Ev/6+g6ZEY8tiXEHPd4Il9ZQ==","signatures":[{"sig":"MEUCIQDeqBQ0maEFbZhdtyCRPcgP1uNvb5GMMBtR0yZfK+xpAAIges2SiyHMmk0Y1zRLRmomfvNYCIrYkcjsTamvmNViDZk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3561214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJESICRA9TVsSAnZWagAASX8P/01NBl63M7GRX3Wx8sPP\nBFrWltpK578BKBqF1UP/vlVlXUF1FFo3pz1eteBnz1EcvRhDNzHb6aghTirb\n7ntcVW3fAfYRowThcgAZ+mfjOBZcXRktoXpDXj104q9tzV73i+J/YHEg8GlZ\nwOPDV2L1QGdATxQa1f9Mp9GWdzlMx4fFzNQcFIXIaEdmhom10K8eRyjAbofm\nmdDKXPYS5ms1Mi1XcoDoCZPD9lFVLDLxK0wIjBLS5bKbIn4vfcefju1ZlOx2\nsoObLFvQQ+gMLLZ5OWgpGYgou8iGeHtOIprx01FCse7mD4nQbqJwQoqbxUPQ\n56KjIjh+BgF9twqHXodtw5mVXm2Db4pBrlXFjvUMEmL7dVGB8sSHCZQP8Ozt\nZGI/bEFVkPhPV1Z1ofgHixU8eDcv2PgFqxbRjN0jSn4b3eB1xzCImueidBDc\nW241159nlZ9g63qFlqu2ELJ0/ogh6l+x0B7mgd5VpR0c3Jmo8o4EteJr0vrF\nLkfbtFHU2hDS5XL9YvDyXeFjyCpwSNJH8n8lWYY1/esL7mWRSh1rpn8mYoJ2\nALny5vscHAJlxjp3NbuBEx+vh8dE6QoKzSRxx5LYv/X83DJ8PWBB5oWWZAGJ\nTWjvQWVLlwQu9WSLRPVeRR6Hcr1KyjNh+dPIBRcGFpAwGaAB48iihOcT4fsB\nh4It\r\n=0ICH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ee3198a84adf021e9214b929da9f59c525d8adc6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.32","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.32","@storybook/router":"6.4.0-alpha.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.32","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.32","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.32","@storybook/core-events":"6.4.0-alpha.32","@storybook/client-logger":"6.4.0-alpha.32"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.32_1629766792404_0.10369031023904762","host":"s3://npm-registry-packages"}},"6.4.0-alpha.33":{"name":"@storybook/ui","version":"6.4.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.33","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1c5f9b5d7ead1561f3f331a9fd2d7069aafa0cb8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.33.tgz","fileCount":387,"integrity":"sha512-iqvvjztu00xLma/B/Ok9m9EYwAByzYvJj0HyGO8W7K3WqKucEySm1I2SO977HTi3Qb/im2+kbaYn6BhNhVuwbQ==","signatures":[{"sig":"MEUCIQDMxxq11v4b/r/N3vfi1kt3gl23GE6q4r/SOWIoc5J+TQIgHFNSiUfbd4tefRVIYykH2PNgC4Bi0Msl1Yw8ojAoDPs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3561225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLmGnCRA9TVsSAnZWagAALTgP/2fEnVAerXk4wmDzGept\nBh+1MdTU7PKt/a58UbZZaAgOvtGNWiLaK2gq5rouaOiJcrQwSj6gC8sibxQ2\no1UX3Yxfok/5YNYZkm5w3Ne1i6+BQ7M5DNAFEJxbqU3DGL91mZJwGxZP0LQ8\nlLAC4NCf1YtJZ0QLEMRUmtSs1giU8wr7AqievwjE4i8py1CP+IkzT2+Om/f+\ntAXlF7+kSbqBUrhKmBqM+HiNJHdwWGew3rhPGk5ze8ukydwgDmU9QnnTopeF\nNFQ4M/3t/u0TugxBEcnfSeNSU82D6wUCcgIj0HiLJ/zN5jAamv/BQ3W9Dy5N\np1GzxM3gclQWncldkQmmD70xbX113hP2KEZ2+SmhxOJLcSMOfcolAPqDHO1I\n0W9b76XyhnkIkwWrGhKK14hO63TOZeOZJ3hS3B+9YMEXbuz8wrY7NFKiDyYM\n/bhc8ZO1UXXPg0n0SUE5tqkTwOtGkr9LEL+PoTAeaWXVfxMlIYHEW0CaR1bL\nIYGuU5yPLmtRPQwuc2Evtpx60slhEIa1Rj2OZcb2wLZL1zT7Q36M+Sizjkro\nVh/c8d4ZmSchO9YkitYmJ1rDmAS4FQ9CADtJAzj1eCWHJmWyTeNkj0H1qdIv\nByyoxWZVIBMXeMh+HrD3d/LYvmg/mafeInb5OMWmhMR8CBbF/9o91woMGZGP\no9lg\r\n=8s0S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"269aa6d39991bd4002754fda53f45d3b3d34ba98","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.33","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.33","@storybook/router":"6.4.0-alpha.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.33","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.33","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.33","@storybook/core-events":"6.4.0-alpha.33","@storybook/client-logger":"6.4.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.33_1630429607385_0.219977328387144","host":"s3://npm-registry-packages"}},"6.3.8":{"name":"@storybook/ui","version":"6.3.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9fb71befbe76f06c478925610ce998c23260a3f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.8.tgz","fileCount":382,"integrity":"sha512-R7LlDfRvD/IcARtmGtYAM79ks2HL+nitdfdRpoW8fYZiX3ErfSIScWzzoxRPFqedg64vwOvbIEhXp7N9JDwFZA==","signatures":[{"sig":"MEUCIQCFr4BJ5Kk9olM6rsfaRZ+lgtLxrxrZ1i82s8Fq31JfNgIgf3hrQCD14XFnYwyi892gHhD9JFA8Ej07P9IYCqq5B/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMlp0CRA9TVsSAnZWagAA/boP/j6RmwbtFvptU9IgktHh\nTChMZ/d47DZleQee05P+6z0LQ3hzdFLG0a+eY2iwUhnxtVNZfVmK4y2jwi1U\nrOnnylu37DV3cAz9MdAp5W096diu0zXAz3vlC+VlKCUWCo8fISb8q0WUaWrJ\n8EdkabOUA9axb7pKnRgkC38GwU05ud92SjN7FUib7HckJK1Cj1JUvfynLoHO\ni6X9bSdJZsuL/rhGNRmRcLDf+40fgrlOWqhUUCOmHWz01bYQc3yEvq5ZcIca\n1cw8KRpKC6GM2qL++wt3o4b7nlj9dCjGYZFFmMIqtEpNp5USETT8a5gaQcvL\n76yKwWBxQH2VHrCKG7ZsDhZYZ+euHu3eMx+9O8obkAaLO0v0j+PKW9qyb50P\nqPyIyEZGnHByJfH5UrZucwZiHc+4wxQ3KXMMR4sZwieaDANbA2884vM8NmDI\nXUEGMIX5vP30E8PdiGaQHM1YFoPI1X3qaH8eBunejpzOuCrQsuaGlKJZgowf\nn3dLhwsXNywLQUfpYLVqAgM7AFFyJo9pI+U1Q2otAiygc1WWwNs0PUT0i2/D\nXZgij2tXps5fIHx9jmKYRuow/wPC46tTrH8MPHDKuqibkuD6hxpiEX3ecVWM\nVn/kDLrKECWvEggAcF1tXm90nSwt1jp+0Ll4+I6bZoXSUIEx3qhy5xrT5ptX\npNI0\r\n=4pV2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7982432207f6c28bf597b053e49e36fbbcd19b88","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.8","@storybook/router":"6.3.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.8","@storybook/core-events":"6.3.8","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.8_1630689908456_0.22595352890509512","host":"s3://npm-registry-packages"}},"6.4.0-alpha.34":{"name":"@storybook/ui","version":"6.4.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.34","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6c98a543198e0743e10aee80992e27b2ff68c55f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.34.tgz","fileCount":387,"integrity":"sha512-g/66Ux/R1cTGY30ACBAxnIikp6EO49Gf4nzw0EBYXjxJux2l9TR0LdMzux39SyjZqQYCKywe5w+BB75BXOiEQw==","signatures":[{"sig":"MEYCIQCBUumtmX9TF1S1ANWWZz2FgXwXwcamYvgT7L6Q4TIPYQIhAMEfCRDVcwSIcfI9j9r20cSoVI73985m4igAoqL/sTih","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3561225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN0KSCRA9TVsSAnZWagAAoSoP/0yucxtPqTdDEAk0FmoL\nPBmnSpRYb3qEs5c8bm6Kiqi8sX8TBChWY2C/v4qOme5rKShEa5V+2Wbbu6zE\nz16OFYHPCAGgmJynQRnf7RfHel14s3tbiJGyiQdmORkGbjPp+Gq0zaLBKBee\nZrND5HuxbPLDmT1m2I3nbS2Ra+ZYusIha1LJuUVq5kYwtecSQGVJFpxa925o\nl8xhLRuGCbdY/nmcFH0QXfLzNqb3voN/eZt2PVwaUaH8oGcmkz4hvtFZ9Mnz\ntm9HJExP+w782XeQWNAxWT+ctTzaV1AxWPyZw6rYkCHySvxjbRyRltmEPgz1\npiBQC11p2upWMBwTYlg9ILgEFHIVtWOuYH+hDwhme6rzIKQh4OZwk70ALuOq\nGDjjeL9LDx5lbWvmgvK5hVEObvx63y66yNs/z1ArAC8tUXoSCt8p9Cwm1Df4\nJK4ctLxbgXPhxejMTtUBKP10fpMrHN4c+bQ1S7J3zG8MHd2CDMjauPe0GdQ3\nxuUNkXuNRx+7sR+zB8fwZyNUtuHMH6Y/QcCB02B9+WzYV2nKz7k66oy4NoKO\nHsTUZdFHgnSTd4WgTrqLaK2ee5KuSt0DuEV6gjA2/v9G5apJOjSSDBrkLArO\nuaEKNQHwh+neLUwE3GMmt0SdXiU9bw2kT7pmcDIRP/hThO8DL9UURVPDyNB3\n8Dys\r\n=EWY0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ccd25210cd159e42110b700b0562e951bb9b3a57","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.34","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.34","@storybook/router":"6.4.0-alpha.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.34","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.34","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.34","@storybook/core-events":"6.4.0-alpha.34","@storybook/client-logger":"6.4.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.34_1631011474418_0.5167978202902181","host":"s3://npm-registry-packages"}},"6.4.0-alpha.35":{"name":"@storybook/ui","version":"6.4.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.35","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ca75e5a7231424efcb89ffb5b34771b2baed6485","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.35.tgz","fileCount":387,"integrity":"sha512-5qyzAaMJJZASQvYQabuVbowU/OSbQ38zi3B6MXr3GCE/nP73XR3alzzjoyt7vwOc4m5m3v2ZeQwr7UlnEG0ZNQ==","signatures":[{"sig":"MEYCIQC4gB7pm2zt9O7kxhR6QXPhdu40kCOtv4xNbpY70Xe36wIhAMOtjj8018FZ9CR64R8FlM0TfEPSWEz6BgvH8MURpX1X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQGsICRA9TVsSAnZWagAATFsQAJwnV1SWfJMxJyg1WkbB\nhybRw/EtstB0ZHrv21Gr0m5BqYNu/2da83Q3ladkC/4R+6FKdxk3frcVSN7B\nFG/Pp7RM1pHwAAn4EgQ/7DI8OgxBaAemYWXO1McrLSfHtn/D5Vpp9Fx2pGZy\nI8YasPWDuaGQbt0IamoohFngHfp1kjozz4jEn1qIr7IR5suFfcb/ut6UBYo3\n8Mc0IpJsPBd4cG7tmEZato9veAqdGFO3bvTdu23feVrf7nf6tBxhvZ8r0YhC\nRDapTsWGFaSAS1TvxsY48YkXU+L0cUO/RR72syvq4xNAEs3WijKmY+pQsP9J\nX0q3KeiX+t1jbE2JcBCYIjRRDVwYrG/FD47ZBXuFmHXu9aD5UP9Ng+5AzHbi\npIpUlbk9Q9BWJEnej8r55DXOd9kSekdsYM8oBjm5z2nvy9peuVnv0p/uphcY\nRTZfa6LHK6+DUsDzBuf4dJBQNCwRuDa0vYlJILgLfKZzLrjeX8EFkyb7nC3Z\npEw8v7JYHlXELnWCZCE1Rgq6dM4yjJAVuvkxZiNyVLWTCs/zr2/btq3iqRBj\n0JwK7jhMipuW5NN/4Z+51Zj5DTcEyWLTOjQ/6n0raY4tJa8HyWTb7WtQ4qne\nWiZBQ9b5zspFcBO0OWDgGyqLt94bkKoZeYtkVo9qwgPw/byHLHyldJZ0dHVy\nA4EC\r\n=4PiY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8f65635eb105c8ef3e6ffea3c9cf6668ad34705e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.35","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.35","@storybook/router":"6.4.0-alpha.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.35","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.35","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.35","@storybook/core-events":"6.4.0-alpha.35","@storybook/client-logger":"6.4.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.35_1631611656332_0.6084291247834821","host":"s3://npm-registry-packages"}},"6.4.0-alpha.36":{"name":"@storybook/ui","version":"6.4.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.36","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c403ae052a69f13526c71d225ce054f75b1e4a61","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.36.tgz","fileCount":387,"integrity":"sha512-ikk6WuvMXhGqv5+vlk/t3InSUvTT3GEJ24cCqheszKWQyG/HZ3O0yjQ5AuzMbhj5JC6YMZ2fiHzF5oUDB9oivw==","signatures":[{"sig":"MEUCIQDjaDvCybSjQ2zHVYvv5pOJi5KN/dOxvS73CpW2js+VwgIgE6WfI1COC2lL7bqIU+WrGDjf9HqgXcN6TKkoVXiH8cs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQUGeCRA9TVsSAnZWagAA2AIP/29q8vCQ8Wzb0juPbbEv\nZONkUVM6kfHRFzQJgFnXdfCwbfONpmuz3BK3jALqG/KZU4X3USU+xvwbCwA5\ncXcHIEw0UzzadZU3g/T/eAp21aAA0SSf8thHTHkftI5MPl1Ezl5cruU79lEt\nPRtXcLi2wJsIuVe2NsigRB8lIGEF5KdWD/a1UQDmS+ciwKIbLa9i9H7IqsgC\nCQEFDbZtgkcNebvk7SU/0wb1ZdhNIMOXGnUSyFf7oE3sMthm79V0SRYagBxE\nAmi2iTVEZ/6Da5LaCx9SnOMgyF0TZbxqDMpdLnygrSZc497Qg/46UkP390Ya\nRjXohDcSiACmaZloe3mLKcDJcDNzXgqslqS5ERrKRpDw0OZaWv4RaOWUJdS1\nVhHq19p+AweZI16NkOeKPAOv3W74+pj2DybJNQvBjm1GcXb6JFL2aewjXGBW\n15EjXMxIVkZaKFPLxzIB5KDm2LWzsfHqlY44hhn8GeZ3c+o13aJBUafSVcpH\nQwnPbGOqmmu/PpX00703vCHyux5ONUiEySo4j34cAvs2RrDPMXUnoisEUZwm\n/0efMFDObYhYJnH8lIrwlGdQAbgDxzGb/q6sBukv3p1psLTff/HcX+1D5gfz\nnt04GQic1EYYSI9vHG+6gzhYKbw0PXUBjNGe2FJMtWE0i93WZHuhPMov9ZL4\n7qsV\r\n=RDba\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"cc13af28a7ea2042d63075ff94e542c99fdc4aad","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.36","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.36","@storybook/router":"6.4.0-alpha.36","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.36","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.36","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.36","@storybook/core-events":"6.4.0-alpha.36","@storybook/client-logger":"6.4.0-alpha.36"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.36_1631666589811_0.007062960036136712","host":"s3://npm-registry-packages"}},"6.4.0-alpha.37":{"name":"@storybook/ui","version":"6.4.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.37","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9ad9ec8f04b8c40fe31fa7baa338f8451a52b019","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.37.tgz","fileCount":387,"integrity":"sha512-8iYtlt4ZsMiQ3OZVDtPaQd0Z+jmezuQPvMf00Z+ERUSNAtoJbuKVLXmqlDOKZkOccIsiPXHNwmb/qGlGOKZ+YA==","signatures":[{"sig":"MEUCIQCGCSQdPPOJqcOpzlsAl84xmggF6X4I/WF5yCR4nWkXKwIgGwsEljPpYOvGkFTIwLBxks9pD8W90Iel+eUmU1YbW4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQpqQCRA9TVsSAnZWagAAGYwP/3jpoiWXNxsVZ9lob8TL\nmLXc9JN0LSzC9mXnTIyrdCkeDfHO1M744WMMRx7vL7TBgoREZVwOz72ONgns\nlQYlMIm745M+MsGigvwYCRTARUJcFV7GvhgGVabu+Xh5hNWQUUpSfTytJ/NY\nu+/tEpGjEOS5WPIOvLnTIAfhYXVtSaxCfUvivSG1L1ZVYMXH4VeSqSS8OWXi\nCUQ46nZIkFBmdpvkS53TwuJpKf1BtY9QMZBNU8Eouw2xQlZ03otLDDCXKiNW\n8Kyk0gkZ9cgyhQ5ukwrzOz26o7OcfGjfqwcbn6QWa7k75jgXEIW1WwtMUp+4\nb9pgkxzr1PsbSDHnwHMqjR/sSj2hk7u5L3DYAH6A56x2vZp/2A5+/c7ynJgp\nK4RfttHD7Ey/XxJEpLC/UApx4crWzyxctRMCsNbbuGO+Mwhv85wnz9hHpdM4\nnbZnTlNpa13o4oAUfuB7YRcXGPU2FWb0qDj3LYEfHGIjKMhDKRNtp0RKS14Y\nX4nBcsKb7p+azIDg7qRUQavmfl2EiA4I8RNWqo8jyqqHwxo4dWi4Bya3tfR7\nET2eP4QS/f1aNnFJ8EyP9cL6Rr+BUZrb0DuQ2HDmU65WjCd6si0BrsC3lnZY\nKUpLgdqgr3u7ryYduv3G2MN6I3ZzBCZbQuEpHdWgHPai+dybwltawd047krA\niK+9\r\n=NYsz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c0c82361c8829e4b983146252435557ef6243c5c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.37","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.37","@storybook/router":"6.4.0-alpha.37","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.37","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.37","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.37","@storybook/core-events":"6.4.0-alpha.37","@storybook/client-logger":"6.4.0-alpha.37"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.37_1631754896323_0.7419662510527656","host":"s3://npm-registry-packages"}},"6.4.0-alpha.38":{"name":"@storybook/ui","version":"6.4.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.38","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"edbffe46866c9446eed34608a3467d2f5a1ee749","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.38.tgz","fileCount":387,"integrity":"sha512-saa02fJEkuUCtcLAKevLeHt8tKMAuEHpOSbGDa2n8O/uglzf1bz9yjYeg+FwmNlxA2q2X5UM6A057eHSNwyfPQ==","signatures":[{"sig":"MEUCIQDGsfizikQWYgpsI9xBQcLYdcaaU+BupSsjbBLm9WieMgIgdtJ+fJvMbPJGTzraU2iqpr7c7/oCCXJW5Qv17nlwbcU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQ0+/CRA9TVsSAnZWagAAIZkP/0SqC/+2qSElT3Q/a4Zn\np2fv/as5STouWdtKQPRKQjiiOSjJUAJStmYpnWoVlAJhEuZmqGTliw9VGQp+\nl/W2MUhfEOggfTpu6FhD6+kDaMweQutiXA+XHO5kUKs2MCsFbTaTIi5CKJw3\nsPwxL5qeetwYpLmXXzlQe9fxbBp2r59dM6qvpUxwXfLdrdpwhHA/XbZB8clg\ndcyJoAu+AZ3zLPgRIgs7tJvatY/tlpDtmaYhItSx84x7ARcTjhMl3Bma6CSb\nZq4rga7p/UdAfavSXtAa3Y9JQkmvl8DB07oJxRF5IO/A7Hxb1ExhCodYwqXK\njj2xbHOEosDPm0vCXDO3VzWBbzZWPO7NkUHWsQjYSuFYOWhiqrTcmlGPK5iJ\nXEeSid67IPla0145GGepAT3ilRS2U55F6pKiA7NKMw+E4T1T+ybTqAo2DRmV\numGcNJmSUp4VKD7KFfvg2qpMznBDQvsz3Z6y58IGwPO+WYAo+IG/vvE8Wl+N\nKngpa2tKwxPS2R044jcwiCp6Iz0sh+S2W5RxXS5kayoR/gx03n2bWk8gfbiK\n03mg1A+69Ffq+vd8qrBMTlb9196zNSiRc4rrrZtNoo3SYpRqiEjo5tKNbDIk\n70lPUFdYolhdF1OBwqsH9zD4X9a8ZX2TcLsoNekEqErXf4TAWSyTgm9Nahlp\njEAW\r\n=UWtn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"14b9d19e7e9e3de84729ce0c7989efa372c6987c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.38","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.38","@storybook/router":"6.4.0-alpha.38","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.38","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.38","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.38","@storybook/core-events":"6.4.0-alpha.38","@storybook/client-logger":"6.4.0-alpha.38"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.38_1631801279092_0.3581680170748145","host":"s3://npm-registry-packages"}},"6.4.0-alpha.39":{"name":"@storybook/ui","version":"6.4.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.39","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f63a99ea7427ac69a284107f254d8729688a192b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.39.tgz","fileCount":387,"integrity":"sha512-s5wFYRr6HVvMoJbqxPD0um8UyRBesZSyTdbxFGSgzWkpY6juvyj6Nj0HNvTTdeccveoiJmB2Eas3j3z/2XEGkA==","signatures":[{"sig":"MEUCIQCeikBLovH6p24PvxC3rAfpeFNQL3v/umoWrEvU3GGi6AIgPkCezDyxHwtgq7YYq6CVjixaDJWDnBtwA5/NpPJ71sQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b1d5f20b2fb6c52f06a85cba6e644629d9bd2e15","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.39","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.39","@storybook/router":"6.4.0-alpha.39","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.39","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.39","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.39","@storybook/core-events":"6.4.0-alpha.39","@storybook/client-logger":"6.4.0-alpha.39"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.39_1631957318511_0.12346926945860925","host":"s3://npm-registry-packages"}},"6.4.0-alpha.40":{"name":"@storybook/ui","version":"6.4.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.40","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"34d52f5eb9bf783c871b50c020f6b1c357c30223","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.40.tgz","fileCount":387,"integrity":"sha512-e2lus2CN9CninQmXaVUZIcWX8VkPG+oGVhLo29jZY3Lnr1PV9T45Iez5PVRmiBT4uLB/pCKWwyX3GL0s2WVXwQ==","signatures":[{"sig":"MEQCIBl6Fc6Nl4sFM3Qw9lO4nem24uJfCdGKFuTKVmDdHL/NAiBsuK24zk8yqArUaGaY/9/gLF0sxF756NSHSuKdYK2BYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6b767d7c8f81b45cccd89a224223963fa751ad91","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.40","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.40","@storybook/router":"6.4.0-alpha.40","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.40","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.40","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.40","@storybook/core-events":"6.4.0-alpha.40","@storybook/client-logger":"6.4.0-alpha.40"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.40_1632139953744_0.4068725536487834","host":"s3://npm-registry-packages"}},"6.4.0-alpha.41":{"name":"@storybook/ui","version":"6.4.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-alpha.41","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af301de5f6609983d1ba5c80efa2a81170251234","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-alpha.41.tgz","fileCount":387,"integrity":"sha512-j48OetqFuU7Sz5qVONS3OfBlvUVNMabdJXKljPuNmmf4IPuZhWBN0irDaViOYQoHskRmU11qnOx8i7Psf4uZbQ==","signatures":[{"sig":"MEUCIGgueWOgCJFXVWtCDlr93kN4QTKftiGKgQnFxncm/kHeAiEAn5b2+Of9+1xCd+/cLSBXe0LKL+tFmPfrC+RxSxRaMNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625647},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"64746ce270eb58d30a58d4df358c927780bc1a64","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-alpha.41","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-alpha.41","@storybook/router":"6.4.0-alpha.41","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-alpha.41","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-alpha.41","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-alpha.41","@storybook/core-events":"6.4.0-alpha.41","@storybook/client-logger":"6.4.0-alpha.41"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-alpha.41_1632244110070_0.22806669642999533","host":"s3://npm-registry-packages"}},"6.4.0-beta.0":{"name":"@storybook/ui","version":"6.4.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a667c87fa448a566a75b2894526dcfdd46baed9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.0.tgz","fileCount":387,"integrity":"sha512-1KGp8ldRAYHritO9dVru3ri+vd3AnygUZmF9lsRfAbfxL4ooJCyD5CjUeKWYzfYCY4Zeba9ROVHPtY9FMx62vQ==","signatures":[{"sig":"MEUCIQC/uSeMtNh1IJ97uIU7yu7Ptnvsyst4nVQT50H8KsGyaQIgeJeeybQCU/vdj86iaLxtYYzEMA/jaswz3r1Z5r59VEU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"44a855043cb0f43a03025df37cb105f4ce07d46f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.0","@storybook/router":"6.4.0-beta.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.0","@storybook/core-events":"6.4.0-beta.0","@storybook/client-logger":"6.4.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.0_1632267559135_0.9894816869305612","host":"s3://npm-registry-packages"}},"6.4.0-beta.1":{"name":"@storybook/ui","version":"6.4.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"74ff8dcd002902eca756b50542891fe41e8db826","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.1.tgz","fileCount":387,"integrity":"sha512-O3MY0CNVj6WS0CrTXAo+NiLhOfQw4k508WVVgsIQgxpWjCc1RZoZ3UZ9GQfc3JaQAbSmOC58LXFiYbag1g7kjg==","signatures":[{"sig":"MEYCIQC6aUUt/Qwj7dXGlwvei5RE4R2JUG1iAuuwTai1cosJZAIhAKXuY28XODN64VcgXSEXvljy0KpCtrvfYTnMm8hWqSHp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"000a73948b4b91aa6bf84828b42ccdb7064f72bd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.1","@storybook/router":"6.4.0-beta.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.1","@storybook/core-events":"6.4.0-beta.1","@storybook/client-logger":"6.4.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.1_1632607691987_0.9286487793823812","host":"s3://npm-registry-packages"}},"6.4.0-beta.2":{"name":"@storybook/ui","version":"6.4.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3848949b6a8124bca96c3bae7db8fd78f569595f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.2.tgz","fileCount":387,"integrity":"sha512-P9CfxnXvWaDB701n8uSIm9vaQBy5Zwws4wi6DX2MYvn1JE+2s7cRYaK+C0DVml6cGi8GHlnm5630uOsdddFdyw==","signatures":[{"sig":"MEUCIDr2aT/MNvPIlqVBGa5mDlsgyEmP/7kHYbvkEd6rtEQDAiEA0Mb5+8YRE5jBSOlYtvzLNwYKOgZJ3gbTfjGkFuKT5yc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3358e1e90c4e46dfd28e7ab822d5d20579463186","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.2","@storybook/router":"6.4.0-beta.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.2","@storybook/core-events":"6.4.0-beta.2","@storybook/client-logger":"6.4.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.2_1633053976543_0.8386947894965233","host":"s3://npm-registry-packages"}},"6.4.0-beta.3":{"name":"@storybook/ui","version":"6.4.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1a0eb44a3da6dd95169a7454a7bac4f14f37f314","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.3.tgz","fileCount":387,"integrity":"sha512-NRjzmKSvzxqKwKnuWU6cRX5xOWWWFeI/rV93D8x29vzbX+eARHOLfWmpMzbNTyUCaQAk9MzUu2fSpmHXhh+2fw==","signatures":[{"sig":"MEUCIBXxjCq45NiLsZLy60i7igu7zNa1VFrp5gcI7RGAMIxnAiEAho6jNlBMDIXVajNNk2b5S/janxq/XCGXsNPDwKbXiFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0fc9200599c97a5797c5af886792200cd29e2046","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.3","@storybook/router":"6.4.0-beta.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.3","@storybook/core-events":"6.4.0-beta.3","@storybook/client-logger":"6.4.0-beta.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.3_1633101816852_0.39336963204541986","host":"s3://npm-registry-packages"}},"6.3.9":{"name":"@storybook/ui","version":"6.3.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a360471acc4fa5a16bc5be9fa8eb60940b41f16","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.9.tgz","fileCount":382,"integrity":"sha512-QyRwofApyHOvjWPXirNYFleSVsjluYl7QmZgkv+vT09sV6q0YS1M2YQiDjoPwSIG0OHvxNoY90yNHjx8aXo4gA==","signatures":[{"sig":"MEYCIQCdvmCrWghdg9A6G49csTZQXBQFp4MVScSLCbhCcC5BRgIhAJuJzDM8fSZ977Rpu2TEJvQV9Zehc8mlJz/+8xjUTAOv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543106},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"248f316bd9a5e511c7047420de0b48f28ca85ca8","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.9","@storybook/router":"6.3.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.9","@storybook/core-events":"6.3.9","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.9_1633104549259_0.9568852501884939","host":"s3://npm-registry-packages"}},"6.4.0-beta.4":{"name":"@storybook/ui","version":"6.4.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e06b0d2270b14fa691427a3e6ebcf099d440ccd8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.4.tgz","fileCount":387,"integrity":"sha512-z/rDVeXnXoQfk+k1lzlaaR09+w7SoSgwbgDkLfpfjYIwO8IPDDhyXgkL/gPre54FjwZbND+s+aHVyn2pNY8eMQ==","signatures":[{"sig":"MEUCIDHBW90Tduxnjp/vHVI4wd19vpr1IezN7I1a9EnYgmXzAiEA/YFfav4v3n7NJ1+iBGOUANrd6E312MpmBNpGkKAOCwg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"294cc94b04cb92813efd12c0a85be443788d0d5b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.4","@storybook/router":"6.4.0-beta.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.4","@storybook/core-events":"6.4.0-beta.4","@storybook/client-logger":"6.4.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.4_1633368467854_0.6564584991634155","host":"s3://npm-registry-packages"}},"6.4.0-beta.5":{"name":"@storybook/ui","version":"6.4.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"169fc830ec835b6f3574b59f18ba42760be41c09","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.5.tgz","fileCount":387,"integrity":"sha512-Sq5thYAKIbeaekwVIgjPDp7d4wn0+e9gXfGZFZ8VSU788fsTF/CpDEtuqNOmVn4Usc66qgGS8ZggpTal2lcxzg==","signatures":[{"sig":"MEUCIQCVKVusN+U1mjbmTf0ZknSovKdJflaRk1Hhcj+oZVpEkwIgHrK57QWeOID7CePziMxhKRE6eSACJ3d6Q1lzyqLqN4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c1e5c8344c29e7e06236f088faeb380257fd3dea","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.5","@storybook/router":"6.4.0-beta.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.5","@storybook/core-events":"6.4.0-beta.5","@storybook/client-logger":"6.4.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.5_1633529353170_0.3795735450265465","host":"s3://npm-registry-packages"}},"6.3.10":{"name":"@storybook/ui","version":"6.3.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bb2bebac9ceb592fd44503ca2c65f0eb21bb7b93","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.10.tgz","fileCount":382,"integrity":"sha512-TkaHgpTBp0nBr6A/v04k1V2rbRy7ajAoL9bFSU7hLNXDyQInUzT/p13+4JMR2TANSzPAycJNa3zRbO7n1MgV5w==","signatures":[{"sig":"MEQCIA16PpftaE0n5btEE472UifBpD9RAVEm7yU42vfkJBcuAiAycMlkF6INuYOap7HNlhhYuj76umKMeJItw501fu2ElQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543115},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"591d742fd3b9986d5aef4ed66b9f50084eee02e4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.10","@storybook/router":"6.3.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.10","@storybook/core-events":"6.3.10","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.10_1633536079170_0.7472268641458295","host":"s3://npm-registry-packages"}},"6.4.0-beta.6":{"name":"@storybook/ui","version":"6.4.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3515df5206e2217bfe51c5588d46a220dfe071c9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.6.tgz","fileCount":387,"integrity":"sha512-LWkOJM1aoAU7DbIQ5gihxjygD4H3+ujoyxMMrvbBPudqBsD1wO/NOfv03mkn8PkEldtBphkofaD8x01RBh7AgA==","signatures":[{"sig":"MEYCIQCluHndR4t43DXM/JMj0jjtKz7Gt/ahy+RB1/90p2S+ZAIhAL4UzoQD2xMuwN814MvuyQw6aUJpMz2OIc2ICZ0TXY/g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6e415afb51d87edbdf8598cb3260be1023426db6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.6","@storybook/router":"6.4.0-beta.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.6","@storybook/core-events":"6.4.0-beta.6","@storybook/client-logger":"6.4.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.6_1633587792993_0.3835666104463564","host":"s3://npm-registry-packages"}},"6.4.0-beta.7":{"name":"@storybook/ui","version":"6.4.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e46037f68cfb188e609384b840274c550794cd47","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.7.tgz","fileCount":387,"integrity":"sha512-ynbYoqvfPmvfgo/f6CwBwG2q6vVTOkE3Co8PBBkcSHT8SqwO05HkeTeAObXfJ7cGsUHNaPrtZM3p4v37pmSVxg==","signatures":[{"sig":"MEUCIQCOX0OYCt8X/GcVzrrs1ucGisdGufGkrqTB7gEIz4WvpgIgIXDSPjQtC30nXHh4k/zdfYJQ53vCi+2yWohiZOw4R+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5c16acd21a956f16a7b24900a9bf38b674646217","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.7","@storybook/router":"6.4.0-beta.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.7","@storybook/core-events":"6.4.0-beta.7","@storybook/client-logger":"6.4.0-beta.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.7_1633685833194_0.15466384082605433","host":"s3://npm-registry-packages"}},"6.4.0-beta.8":{"name":"@storybook/ui","version":"6.4.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2b693f54da93c051cff3cf5dc7ab043823a276b4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.8.tgz","fileCount":387,"integrity":"sha512-+EIDiudSMlctDp0mL54OV8by5GAbmDQX7cBL38gEmbxJIklI5b1p0bkFu8j+pzxuYbShTx4CiIwp8GNA0pB1lw==","signatures":[{"sig":"MEUCIQCDiO0U0hHUPRoq4wqQpsue2jjqJTdr7smQewKVg5n9oAIge+QL5ZNQ04BhcvODoVnOsvkPVHZ5DRpJtrJ5WxIJyyI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7f1ecb08225a3f146f9d6013a89e2a6d4d3dcd11","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.8","@storybook/router":"6.4.0-beta.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.8","@storybook/core-events":"6.4.0-beta.8","@storybook/client-logger":"6.4.0-beta.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.8_1633963944480_0.20536681425620684","host":"s3://npm-registry-packages"}},"6.4.0-beta.9":{"name":"@storybook/ui","version":"6.4.0-beta.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5d7a9552d523600a49e7929969711a88b6e7beb2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.9.tgz","fileCount":387,"integrity":"sha512-F26gatSOy28ns1IpSVc6Wgflt2Nc9katt2LtNCmpQhnTskab+bwRNArPNlC2Ou8y56HvvH+CjOrwFJFH7wuXVQ==","signatures":[{"sig":"MEUCID+b0RFsl3gEUx08uAXekKT+kgRhR4DZrfmvwdtky6mSAiEA+VcDH4A/5X6EEYrD3hB3AeUZakJh1txC7CZ+Z1Tgb6g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625629},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a22654ce25781cfb510ecc95a6465de0247f8487","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.9","@storybook/router":"6.4.0-beta.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.9","@storybook/core-events":"6.4.0-beta.9","@storybook/client-logger":"6.4.0-beta.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.9_1634024416955_0.9992674564505737","host":"s3://npm-registry-packages"}},"6.3.11":{"name":"@storybook/ui","version":"6.3.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fc04d6ab50b78dc5f3d8fdc1eade0c78e4c4a4e9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.11.tgz","fileCount":382,"integrity":"sha512-Jy6J7GRCgcnCp6jOpGcGcjHfzMVqFJ8gnLzrvTPR6EQBl9sJlJMVvYyj/52fDTnrRj+mjs8+cnkQwUHg+U/yrA==","signatures":[{"sig":"MEUCIQDsf2Mc9LNmEk0AZmjv8AjZBRCZEntoGBbYU+gD8+Io+AIgYwZQK091vPoSjSWwtL7RQBKGXzIrYM+GfferXo7c8QE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543115},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e99d07a19b2017b1d3d19fb5b514df6aee4868ce","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.11","@storybook/router":"6.3.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.11","@storybook/core-events":"6.3.11","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.11_1634050501789_0.012185088335619598","host":"s3://npm-registry-packages"}},"6.4.0-beta.10":{"name":"@storybook/ui","version":"6.4.0-beta.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"309fd7eeb2fa92e49539d8452afe35efc914977d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.10.tgz","fileCount":387,"integrity":"sha512-443yieq4ZRCy4ZafVsazt2aV2V9hhcJBLOoHvQHk6k8cAAHegYW56239PrPqKobcR8Zxk88Hh5f7A1kNGNvRnw==","signatures":[{"sig":"MEQCIGJX6Cqz9izJSqPyliZaO/j8DA90Z0Er8VKy6dh4QuGxAiBN087ze/z68Rcun7ebBpvRevpw6Z1/MJvOc7vju6NcIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625891},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9128cc184fa9771b332c1aabe85af6751dde890c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.10","@storybook/router":"6.4.0-beta.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.10","@storybook/core-events":"6.4.0-beta.10","@storybook/client-logger":"6.4.0-beta.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.10_1634103415367_0.5942054582554757","host":"s3://npm-registry-packages"}},"6.4.0-beta.11":{"name":"@storybook/ui","version":"6.4.0-beta.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6a707d2ba28f3f370b836977c5439562197dcdbe","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.11.tgz","fileCount":387,"integrity":"sha512-FQFhuFVjGGq4V3CDLsliL5jER8r3X4+97HDZKKDySEYzaglkqhYuY6u1oEhgIBd5MsrQufJn6xj2Nde/+Z176Q==","signatures":[{"sig":"MEYCIQDNVe4mcRzEuKatDRMD5kdbSDq7yMyqlHjpcbu0fL9AMgIhAPqYV1wM3LdGN+lntKHZkVt/trT0BIm1cuJJ2nxkeXpL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5ea24555a458269f3ca0f399ff7f6f0218cc7fea","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.11","@storybook/router":"6.4.0-beta.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.11","@storybook/core-events":"6.4.0-beta.11","@storybook/client-logger":"6.4.0-beta.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.11_1634183006074_0.8271132637852552","host":"s3://npm-registry-packages"}},"6.3.12":{"name":"@storybook/ui","version":"6.3.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"349e1a4c58c4fd18ea65b2ab56269a7c3a164ee7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.12.tgz","fileCount":382,"integrity":"sha512-PC2yEz4JMfarq7rUFbeA3hCA+31p5es7YPEtxLRvRwIZhtL0P4zQUfHpotb3KgWdoAIfZesAuoIQwMPQmEFYrw==","signatures":[{"sig":"MEYCIQCL7SfsqbiRvgFGW52Jh7+Y1UGx7lcqE0Bu8qVhjl0AMwIhAKLHcvRsMuuFgtkbzUdQ7awBdYSXje/FIj+tgvWnpFyJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543115},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0d700fd7700683d911e99aac2779aaa51e698ae9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.12","@storybook/router":"6.3.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.12","@storybook/core-events":"6.3.12","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.12_1634195400302_0.348970141167843","host":"s3://npm-registry-packages"}},"6.4.0-beta.12":{"name":"@storybook/ui","version":"6.4.0-beta.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f801f21fef95d799f5b4ee5f636af6e4d6bf1736","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.12.tgz","fileCount":387,"integrity":"sha512-sPKAGMvWzBZgi9jdXHgso2NQdip62CMCyAJxo4AN+4O+QDW7fAmkU8eqP0hbpanEcQfRfmHc2De92rqLRuBTbQ==","signatures":[{"sig":"MEMCIEzGVxwZzRoOZlFEB/m+LDcF0WRfVtRxRKtK+CJdp/IhAh9TMAjw1F9lLexuHA6aCG/GNN6CWgbrllx3/+tbJIaW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"603dac34374f54aa080a52957a9d2fd0c7f6044b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.12","@storybook/router":"6.4.0-beta.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.12","@storybook/core-events":"6.4.0-beta.12","@storybook/client-logger":"6.4.0-beta.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.12_1634287873393_0.22073815500418892","host":"s3://npm-registry-packages"}},"6.4.0-beta.13":{"name":"@storybook/ui","version":"6.4.0-beta.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"928afa1e175b4cef0c9b2e683de478feb67809a8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.13.tgz","fileCount":387,"integrity":"sha512-GmeD1xv19mXJm8l9qJWbkFo2277ns9aYItg5S/RFzkwB1sWQykzJfqbnm7nXXuVqbK3wfJi3GoRgnNPG8ISLlA==","signatures":[{"sig":"MEUCIQD5BOPwhO9Fe7hNgnhi4mtX5JQCDDJGjKKxqqjpcx1elQIgZDeYJlWgFxH/6wpNjWhA4LYgMA6Ik6AH7/YLmWp71b0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c9b8b07f1b6e8ec9a87d47a0dbf9d5756feb408f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.13","@storybook/router":"6.4.0-beta.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.13","@storybook/core-events":"6.4.0-beta.13","@storybook/client-logger":"6.4.0-beta.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.13_1634537619920_0.05757391486831631","host":"s3://npm-registry-packages"}},"6.4.0-beta.14":{"name":"@storybook/ui","version":"6.4.0-beta.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.14","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a265b705379d6ef459764a326d62ddec2f35f220","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.14.tgz","fileCount":387,"integrity":"sha512-aBv5Eo6rGIIIWNvtJUuK3mcv1+fjJ0FD9nFHMWRyeEfoTLRAI0fw5gAl433S5uYfj4qqu6nY34JWrUHkd+qwag==","signatures":[{"sig":"MEUCIFb3FFdNs7zmTGLNIC980aH95qV3PsMX2fmhTmh5QAe0AiEAgQiYzTf3L8CKjMmDqEFJfhEtoXJmK4NKRAvgbi069d4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"dce4ba17ef495796ecf22fccecda4d81cb9d6eb7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.14","@storybook/router":"6.4.0-beta.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.14","@storybook/core-events":"6.4.0-beta.14","@storybook/client-logger":"6.4.0-beta.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.14_1634577366780_0.13917087855086607","host":"s3://npm-registry-packages"}},"6.4.0-beta.15":{"name":"@storybook/ui","version":"6.4.0-beta.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.15","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ea9ae657f38e3d050c9c75f77e115291f2f283c3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.15.tgz","fileCount":387,"integrity":"sha512-v5dKlSI1n4F7bnbUXb6pNapKeR1J8ATUJAoz34qexsoe9xPT1idSH5NoS3Rz4ukslThT5eqGmf3i7hxQfp44yA==","signatures":[{"sig":"MEYCIQDYwglwf72Km7YH9izwf6uUmwbEHKrRcvm333X1+c+48QIhAKOY30IlKrMgX1tkB6ywPXXe6GwNmq2ctBmRM+qs1e6c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f3bcbe0094355fe373d47570cdabc548b93b0b64","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.15","@storybook/router":"6.4.0-beta.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.15","@storybook/core-events":"6.4.0-beta.15","@storybook/client-logger":"6.4.0-beta.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.15_1634653578225_0.22895258168803623","host":"s3://npm-registry-packages"}},"6.4.0-beta.16":{"name":"@storybook/ui","version":"6.4.0-beta.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.16","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bf5a052adeefc92ee25a2413373fdb88efacb764","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.16.tgz","fileCount":387,"integrity":"sha512-7atgwCsuNoKIQxGKrGltb1KVQJtwOSXvTqPK1PcNyXJVAlgRcCp/xB+RYCk9L0IV0nCsnba99mU7tgCibtBE1Q==","signatures":[{"sig":"MEUCIQCE7yn0BEdwk5QrILScHPkFbcBVXjQ+FsCcwPkWA/aGxgIgIXJ022JWudLmZoHTl1CVarkpOB0la+SkQ23rbI7Xcik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3626027},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"51cd442b428ccbb626003da5cc4491e670a1f281","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.16","@storybook/router":"6.4.0-beta.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.16","@storybook/core-events":"6.4.0-beta.16","@storybook/client-logger":"6.4.0-beta.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.16_1634745543608_0.19022021044729054","host":"s3://npm-registry-packages"}},"6.4.0-beta.17":{"name":"@storybook/ui","version":"6.4.0-beta.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.17","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c45e8d7e7a2c9176ec1264495ae9f1290ee48170","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.17.tgz","fileCount":387,"integrity":"sha512-20gT4UHv6yH/HxFEEySPXzo0oeb5SBe8KvEm4xSc/SLSswRExDkj0e23+S2CO06z6N1jD99n5nrZOR4XlJCadQ==","signatures":[{"sig":"MEUCIQDOsKnDxJZRr8NFUNu35iQKiUx/aEt5kDkJUA/RhrsxbwIgUR0b76Tg/TXYlFeDbbF3DcGD3hJsebF5gbEhVfBXbLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625840},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"936d37ffdea541fbc8829a7ba2c357ce0a948dda","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.17","@storybook/router":"6.4.0-beta.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.17","@storybook/core-events":"6.4.0-beta.17","@storybook/client-logger":"6.4.0-beta.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.17_1634794930653_0.27838220418487425","host":"s3://npm-registry-packages"}},"6.4.0-beta.18":{"name":"@storybook/ui","version":"6.4.0-beta.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.18","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2d6c0bb21e59c1b9f5441b4612a35cb7c723b2af","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.18.tgz","fileCount":387,"integrity":"sha512-Citol4ZGGE2CrNrRI+hEXEimzMoRqdKKzOPOMujlKVFUvJI4CbR3SLfNdFEhss+H9yMGokjhlylI3mDntoq3ZA==","signatures":[{"sig":"MEUCIDLrrTKz3dzVhles/krfGKIkhJw8yJlW9iwTVaLwlG7eAiEAyqSfulaZP3N8VUSYhv+T61bwECqSsf8m9ieBHNWH1S0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625840},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c84597e8763c4ca4d49069b83c72de97ba0079f5","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.18","@storybook/router":"6.4.0-beta.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.18","@storybook/core-events":"6.4.0-beta.18","@storybook/client-logger":"6.4.0-beta.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.18_1634814005832_0.769100757567919","host":"s3://npm-registry-packages"}},"6.4.0-beta.19":{"name":"@storybook/ui","version":"6.4.0-beta.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.19","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9c27d2bc0ba19bc4536c1ad953a119b9e4bbf8f3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.19.tgz","fileCount":387,"integrity":"sha512-tmvvDjm0aENWQhEsJqzmXr54bWDuiOyHEB/rkH2kNG4JVorNwuRmGjOnwpBV4LXUBErBkCJTls8NK+zD6A1U2w==","signatures":[{"sig":"MEUCIQDXX5BFixtj0p44bS1juVf1QoI2qGjC1f58r+rMgthuvwIgd0wsNdP/qqbaEdriblUcqgv5MUuekjKXGJpXmhrhd2I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3625840},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"60b9bd1e5123938a66ad1ae25a8a63d03324a14d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.19","@storybook/router":"6.4.0-beta.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.19","@storybook/core-events":"6.4.0-beta.19","@storybook/client-logger":"6.4.0-beta.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.19_1634884499472_0.6134780184459245","host":"s3://npm-registry-packages"}},"6.4.0-beta.20":{"name":"@storybook/ui","version":"6.4.0-beta.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.20","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9a3ca081d061c2ce0c41e1695e5c61d6fb27bd4a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.20.tgz","fileCount":387,"integrity":"sha512-uzJCSl1lHMirP53INjlx5ccAD2OUU7ho6herCJUWJXXS9BkY7zp4IbnIYJWKgWg3WYqzTLvt+ts/o4lTK+XJbw==","signatures":[{"sig":"MEUCIQDe5lm8kkE/7xqc0ANK69BEUfTndmB4FTAQhFtuZaDdCAIgXWmnC9cH3LIAdAX0u366YFChuNt6UZgVkRbSOU8PlDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3633221},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1a9315fd39f7e4abcdf3eb839dc29aedce346e01","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.20","@storybook/router":"6.4.0-beta.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.20","@storybook/core-events":"6.4.0-beta.20","@storybook/client-logger":"6.4.0-beta.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.20_1635188459998_0.37343140217795834","host":"s3://npm-registry-packages"}},"6.4.0-beta.21":{"name":"@storybook/ui","version":"6.4.0-beta.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.21","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"15ced44de619c2a5240bc169f4d4e650d0582f92","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.21.tgz","fileCount":387,"integrity":"sha512-GlqgG9V/+go9j9AAxTMRSHfcVacQ1l88HqlOOqogykr33b/aCcL+ESO3Y+cUNcELxI8bikSTJM22HxQqINROXg==","signatures":[{"sig":"MEYCIQCMFjZGAOPhO3AfKmMDyIWX3g2/cahoeLT2RAQTYIsrdAIhAPd5It/Atd1j/k3qoP9+Z6c/vqG73aYvx6GmtWXsT+zT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3633221},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"eb83ef6aefb6791324e2c70567bdc128cef09d92","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.21","@storybook/router":"6.4.0-beta.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.21","@storybook/core-events":"6.4.0-beta.21","@storybook/client-logger":"6.4.0-beta.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.21_1635355249190_0.18094213539212567","host":"s3://npm-registry-packages"}},"6.4.0-beta.22":{"name":"@storybook/ui","version":"6.4.0-beta.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.22","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ed7872a1093ce033b000c025599e9033f12c270e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.22.tgz","fileCount":387,"integrity":"sha512-OvkZ8Qu/ZOCbYz1s7bh/qQ1oI42NueOQjAXlzVuNE37dJDQCMpGa5B1UyIGR6tsV0gOqw6Ft2CWZIakWlcwB4w==","signatures":[{"sig":"MEUCIQCh4uoUqU+uaXOeah4Q63E16f3i9gRUQVw2KaZvIAcW1gIgF5zU+NW+NEeydAhFFx71oOs7RzysZxqeZnWtd77deYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3633221},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"680a207c0b7d5daee89633349c7320a3ac29b3c6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.22","@storybook/router":"6.4.0-beta.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.22","@storybook/core-events":"6.4.0-beta.22","@storybook/client-logger":"6.4.0-beta.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.22_1635437368313_0.5492892257332012","host":"s3://npm-registry-packages"}},"6.4.0-beta.23":{"name":"@storybook/ui","version":"6.4.0-beta.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.23","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fe0311deaf4e1a6e1f3da4187ab27657a56b41a1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.23.tgz","fileCount":387,"integrity":"sha512-1FPuTUgp531jv0VhaKcqeXwyn2IhefEnJp7ApS/B6SYY1U7RSoaQHj0mRoi8HmMxUsA8GQmrJ8CyA3yeLzAIGA==","signatures":[{"sig":"MEQCIHrfvsyxO0ERqDI9j02JLpjQdrG2nTQRvXWggqBaggasAiB0NTrTlFdZP1pIScIww9AHm9SUW98qxUF9ec9I8jsNSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3633153},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"34dd760d275faabff6855b84bb64bb69adc1ec1a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.23","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.23","@storybook/router":"6.4.0-beta.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.23","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.23","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.23","@storybook/core-events":"6.4.0-beta.23","@storybook/client-logger":"6.4.0-beta.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.23_1635519445561_0.9763877085816237","host":"s3://npm-registry-packages"}},"6.4.0-beta.24":{"name":"@storybook/ui","version":"6.4.0-beta.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.24","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3cd6309cb5f2c281ad4f434e25ce7cd7d0471e33","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.24.tgz","fileCount":4,"integrity":"sha512-Ft63xHn8LslRM0y5uPjHOt+beHCREr9j/cAuC6YEmZC/KaA/JY1FFur2N22i9qTR5kAgCfJs8EKLMkzT1iaj9A==","signatures":[{"sig":"MEQCIHSV2LL+jOjJteDS+6tXD2+ylnhrF9n8OMe5KTMgVpPyAiA68hIDpLIcx0Df4Zl/T92hnZLGKcLtkI4048GlWexIWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10192},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f53ba4d7210b5c4809d57c74d7a42314172aa63e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.2.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.2.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.24","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.24","@storybook/router":"6.4.0-beta.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.24","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.24","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.24","@storybook/core-events":"6.4.0-beta.24","@storybook/client-logger":"6.4.0-beta.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.24_1635825377388_0.999802959958074","host":"s3://npm-registry-packages"}},"6.4.0-beta.25":{"name":"@storybook/ui","version":"6.4.0-beta.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.25","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"992504d9735dcbd85f6f84e99322d298fe0c0148","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.25.tgz","fileCount":387,"integrity":"sha512-xxiqXQUX3e5hcw6op2SvRo8gQNbx/WvTAKOSZZw0j6VEqAYgQ2D/XbmkLXH9prqmiuSmLMcVLHK+LPVPwtgjUA==","signatures":[{"sig":"MEUCIQDiH/a8s+YSGV/MAkrE1Yt6ki8bbxggXBu/kPKVZx1l4wIgPjGHCvJI7Y4i0mRb52NCNHCsP7KiVtLn4o7FBqJkFnw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5bf101067e5b9387ce092301bea6ab4ee432f777","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.25","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.25","@storybook/router":"6.4.0-beta.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.25","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.25","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.25","@storybook/core-events":"6.4.0-beta.25","@storybook/client-logger":"6.4.0-beta.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.25_1635834226102_0.46231499864294756","host":"s3://npm-registry-packages"}},"6.4.0-beta.26":{"name":"@storybook/ui","version":"6.4.0-beta.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.26","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b4da6d466b226f5785ee186ac6f2d693662c410b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.26.tgz","fileCount":387,"integrity":"sha512-kc8bY8h2R3dkYG6zlUW4yWC9X0XbFxM6/4772bx5cZ0l1bavzVhvSAE62oMPfmZBG48K79TRqFM2JuBZtfEi9w==","signatures":[{"sig":"MEQCIGM0jVBGHgp6PCqeuLHYlgvQ+zmcDAOsEDhdF0t9T3vzAiABJQ6bYkrog6JN6Jq7sGsjfIiyEAZfTVR1/Lu+VybMfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ddc43c3b4cf4ae8463a2e284b290e5014e33780e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.26","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.26","@storybook/router":"6.4.0-beta.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.26","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.26","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.26","@storybook/core-events":"6.4.0-beta.26","@storybook/client-logger":"6.4.0-beta.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.26_1635861613236_0.18970883055147403","host":"s3://npm-registry-packages"}},"6.4.0-beta.27":{"name":"@storybook/ui","version":"6.4.0-beta.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.27","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"100456b16d222b60beabb3fe91eeb39ec13df801","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.27.tgz","fileCount":387,"integrity":"sha512-xs8x+v1VvE3q8XOid+G/JNmdnvCX0dtqY0b9Vw++5emHDMhBoF2wS++/W5g+CeC8j3nqGCwoHSQXDi0K0GV0xQ==","signatures":[{"sig":"MEUCIQCmQPHOH1xIv3zJywOXIRzOZvwZJftmreRRigkpgN+HTwIgcqxjuBPAlyu8cYZm6ccR4hJD6tTJ+Nl1xlPSG86n3Tg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b73d9e79cf41328a21eb5f8c1490f450abaf4142","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.27","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.27","@storybook/router":"6.4.0-beta.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.27","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.27","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.27","@storybook/core-events":"6.4.0-beta.27","@storybook/client-logger":"6.4.0-beta.27"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.27_1636022164368_0.04216881411186879","host":"s3://npm-registry-packages"}},"6.4.0-beta.28":{"name":"@storybook/ui","version":"6.4.0-beta.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.28","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"890e8a09afb385c0406f27969a9a84d9fbeeee24","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.28.tgz","fileCount":387,"integrity":"sha512-/355kEAxVgqZ4RGz4oYn1Ii9S7zxIviHITzhTwFo4XbZ2N50lYiLgNl65W41iU+3aQ6nWc3vNnszi3hJ5omhVg==","signatures":[{"sig":"MEUCIBrzn+aw6P9xxL4KiON6cuSjhLp1CFqN7rJbpc3Olaq4AiEA8a+bPJkzRZI1LTQbU3Sl/SqS5M91CqhroRzmuDy/kPQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"72316abb8354d1f84d2bf8f645b18aeb315768c3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.28","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.28","@storybook/router":"6.4.0-beta.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.28","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.28","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.28","@storybook/core-events":"6.4.0-beta.28","@storybook/client-logger":"6.4.0-beta.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.28_1636047711652_0.9558899375060839","host":"s3://npm-registry-packages"}},"6.4.0-beta.29":{"name":"@storybook/ui","version":"6.4.0-beta.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.29","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dd00559f8ff53d0fd9b48facce7ab94b1156aeac","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.29.tgz","fileCount":387,"integrity":"sha512-f7Gx6v8M5SpDQdPzw++kGAtn9MefcgDgAX8bCOotPYET9M5efVqQlgvl9AKPiqMEq11B4zzpevd6fqKju38g3w==","signatures":[{"sig":"MEUCIBENyzox4K5qLyfZOvSNWmu3jCw/AayFRx7E/OHqnwLMAiEA/jpZ8ISJZwmzzR6tNw//PtVACseaft0WzlbbljcuQBw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2e8d1c0f398c1fcea941899abe3a17c1e3b7d7b3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.29","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.29","@storybook/router":"6.4.0-beta.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.29","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.29","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.29","@storybook/core-events":"6.4.0-beta.29","@storybook/client-logger":"6.4.0-beta.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.29_1636136284687_0.048266839811243356","host":"s3://npm-registry-packages"}},"6.4.0-beta.30":{"name":"@storybook/ui","version":"6.4.0-beta.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.30","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a12093d76a33224d9ee28e9966ed9d44bb49e79f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.30.tgz","fileCount":387,"integrity":"sha512-ZixWjL5OahxHyX+FjI8573Rt1Wa2xPOUaFnWJ+sFUmQTmQ4IcsVU3zgDpO5vnlAmKB7Rbf/YvjVVajC6UFvDQQ==","signatures":[{"sig":"MEUCIE/09EMCELlNfbad4/fmWyl+JW/uxOqESwJpjknNFKGfAiEApVaCEy5ZUFoyHN9GG/mqPJMCk2ThD2MzSOT7i6aTWgQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"061df7c81746e8aa9afd4c6648f090aeff10b85f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.30","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.30","@storybook/router":"6.4.0-beta.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.30","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.30","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.30","@storybook/core-events":"6.4.0-beta.30","@storybook/client-logger":"6.4.0-beta.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.30_1636385846044_0.6975458633804859","host":"s3://npm-registry-packages"}},"6.4.0-beta.31":{"name":"@storybook/ui","version":"6.4.0-beta.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.31","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f4f25f179ab159976fc62d1e4cfd667bb2d54f67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.31.tgz","fileCount":387,"integrity":"sha512-bO2JJYG3nfWPT+AVPqun5KutI39otA6Yfq6Rq4OymaxhWxx2zCDAZks55UkWfZj1zRLGa23l2qLfY7kWphxXHg==","signatures":[{"sig":"MEQCIDgLzg1r0RKonTEJL0t92WGgmgjZVVST8q4cYtT7cHC4AiAhbdpkPwVEyWGz65OrNDnk7X/QRv0GSkrgpqaK3BI6Zw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"17ef07b50965ad82f3c6a5f7442211bb8f140267","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.31","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.31","@storybook/router":"6.4.0-beta.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.31","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.31","@storybook/core-events":"6.4.0-beta.31","@storybook/client-logger":"6.4.0-beta.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.31_1636484200915_0.09122565228438817","host":"s3://npm-registry-packages"}},"6.4.0-beta.32":{"name":"@storybook/ui","version":"6.4.0-beta.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.32","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e8ef87afcf2eb47981567acfaa259180a0a2cbce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.32.tgz","fileCount":387,"integrity":"sha512-rCvXSxUO+pqYNWUFQGt6crPmgEfBbbR6uGlXKO9o4JcNz8hKr1S6H+BJTDNIRra9eQuMHOwk0Jhppgnmku4Huw==","signatures":[{"sig":"MEUCIH29sl1y9yoTCVh8iajzHAGJhDThFMzjfEJSLPXjEnkHAiEA977dAra6lHgN0gSyOpTwCBTcPQGl6bsIZXIdzMOXAn0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3634005},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0f99f609b55928e48cca7c57f6e343d079bb94dd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.32","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.32","@storybook/router":"6.4.0-beta.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.32","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.32","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.32","@storybook/core-events":"6.4.0-beta.32","@storybook/client-logger":"6.4.0-beta.32"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.32_1636650981909_0.4652656768128245","host":"s3://npm-registry-packages"}},"6.4.0-beta.33":{"name":"@storybook/ui","version":"6.4.0-beta.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-beta.33","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2e62dfcd68c92604a2d08c1f09cb70afd5cc234d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-beta.33.tgz","fileCount":387,"integrity":"sha512-Wsg55vuMMc8g0cw/mWl97Mxg3Q4a2Ux/BNwgTN6LS0lL+zRypeIqEdKyecj/9U7Fm5QxpIHsKWbYvRAG4FZdlg==","signatures":[{"sig":"MEUCIQDS+vN/h0XjlHldTuQI7E4vGJL7OkA3bJKrlh+M5DfFVwIgKCXZA83KSCcMRBRGo66j++l6gGlB5qfp2aapUE7Y4RI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636798},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c85171dc319d1d3a31eee1b762f01ba84ae45194","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-beta.33","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-beta.33","@storybook/router":"6.4.0-beta.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-beta.33","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-beta.33","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-beta.33","@storybook/core-events":"6.4.0-beta.33","@storybook/client-logger":"6.4.0-beta.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-beta.33_1636725699153_0.4675768443835624","host":"s3://npm-registry-packages"}},"6.4.0-rc.0":{"name":"@storybook/ui","version":"6.4.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f7491dc71e31479c177364904e51b41922d8539e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.0.tgz","fileCount":387,"integrity":"sha512-zfxT73/wp9iBgza/fW6/9o+3664agqQk1DnebgfBI75pFgMT+nSCiMHev2RHorOOzZd1t7eJ2+RzhbHP+WUBKw==","signatures":[{"sig":"MEQCIB83IBTuQhB4IJT7PdW4600s/1mlp725nZQ1bH3VFdQ/AiBEhZmdpL35iVsvPuylSokycEm7Jf5mJJUVnkLhMHIv9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"812e75b32c7fe222b872961a83c05cc8ece36a36","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.0","@storybook/router":"6.4.0-rc.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.0","@storybook/core-events":"6.4.0-rc.0","@storybook/client-logger":"6.4.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.0_1636731281822_0.0833146436964487","host":"s3://npm-registry-packages"}},"6.4.0-rc.1":{"name":"@storybook/ui","version":"6.4.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1f68f6a8c3c78031faf1b617e83c5841a119507e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.1.tgz","fileCount":387,"integrity":"sha512-hOGdoMd/Bomo6BhgI7+s9zyAk3AXmZHi9+oX2Ce1iHT7J1yl3t+SWxj7VMh5BXlXCabI6P2KGYIpu7t3y4rC/A==","signatures":[{"sig":"MEQCIDbfs1njuncy2rGU3kkzUci36JpgwGYEobpWrq5BLuJ9AiAIh14MjqYciToIvvx4DqmdwcwgaCUlPmt2bDHjZyi43g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0d79fcc7dd9f8d949c2644aefb54e77a3f932db4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.1","@storybook/router":"6.4.0-rc.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.1","@storybook/core-events":"6.4.0-rc.1","@storybook/client-logger":"6.4.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.1_1636745350207_0.03582683529552044","host":"s3://npm-registry-packages"}},"6.4.0-rc.2":{"name":"@storybook/ui","version":"6.4.0-rc.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8d13da85a3a64fb48841262287b7e51d0b640335","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.2.tgz","fileCount":387,"integrity":"sha512-uO2FdaKdX4pWMm7F36WRyE0z1YWlgpTLnrph4OdjQeuV5nil/cyqIh2T8PU9yzQIeaFzmR1uE0fCz3almPii6A==","signatures":[{"sig":"MEUCIGfcVP8ErwlSVQu364JeC1nQ/7GgC8Br1h+wiIRQmCC4AiEAqcRoknnR3vRHG5exPd0Av3dJwKJLPFx5ynl/19oR2xE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkpkGCRA9TVsSAnZWagAASywP+QAThFBiNzCVv/tgw2pZ\nkjmWz6UlEFZYuuSZEjMqNLikE4IHX7yKA4ms/J8iiGMODKM8f1ZMvipOGOzq\nkbKcwumzV9c/R9DctdpsHSGXoDWPKJfhkiYvL4BgGvHgBWTi+9ruXIz0t6AC\nyaJb5BrvqOH5J2tsTaW0O/fcmYCpSK3Oa0LEZdTPpPBVNsK/UVe1rHEnoKkR\nd8z4eoMQ4UAqaFM6gPfMcwAwbbTkVQHUf/21s98z1KC8JeW68kiee9yXxnQX\nghLGrgpwran1tujqikEJiCcsrlThiA64pcar9NikQv1EYz7kcMv598yMJUg7\nM2FStHmPdXnAC1EAdPNmCAgncErSaoroQYp6xgEUZG5YIJE/W5PeF0eLRPZE\nwPadjlPebxudTUgAWlIzo9wje+ITcaCqVaQd93dm1mrUmyh68sjzZMtxwYte\nYzp2UGnZm8FE8tLLpGNZwmezphngIcQH62ovXWlIu/UZ0pRJnhJ4ZeDvbZpe\nxa1rbGs4sHGDE6/8S7u7y5/+p4lbebuQJxG7S60dkxupH0in6j7VA0KQBm2t\nBdeawrO+PAk6AoXw0J9RWh01gQOOEm3+Rshpe50lfQWuLP4ee6/qczSwJBZJ\nzE2F22Tv6751m/G2oxRKMzfDGm4/LtdNZEkQltNydWcjoEVeruBH77GGmP0Y\niyI4\r\n=MhbF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"16be10b522569b4b55c684e1556b91b300009bf4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.2","@storybook/router":"6.4.0-rc.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.2","@storybook/core-events":"6.4.0-rc.2","@storybook/client-logger":"6.4.0-rc.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.2_1636997381836_0.9051715046289972","host":"s3://npm-registry-packages"}},"6.4.0-rc.3":{"name":"@storybook/ui","version":"6.4.0-rc.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5c6972211dbd0ab64453907823e30f1b6a8ec004","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.3.tgz","fileCount":387,"integrity":"sha512-lM8OaLTesqcYQp/vnokOfcnBoAlvSN1DlrbwQZ4gn/GzNdx8y1NtT0CZXAJrEbwAP0u6/JHZUumGhuh/ss+ORg==","signatures":[{"sig":"MEYCIQC1v1p6hSErjVZyvKLF0HvKlkjb6iOFmkYG0EgwEOd02wIhAKxnhmSv2wPT1c1JwurbdW7uaowA6dEo5YARxU+it0Uw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk7xVCRA9TVsSAnZWagAAmlcP/iIg6fMl7sAellHlDlTy\nw+mVLIJZXGjeqwHpCEZk5q1W24XcyAoR9xuKCkBJiXdNSavzkrIDkZwXydIx\nmbjrss0gAkl/RKhiFoYmG/Xcy/nwxQzxrD36bbph15rBqp26/HUt/RDO7GNd\noMdYnXSbEf+5pa+8l6ifBUepp9/ajCWhItZ5jc0gPIecXWk8INrpRoDU5dW1\nhNf9uqV+PvRzzEpgW42uTdTc52C5wJGWPTriFqVwAm7Aq2lQuIBcr2wDAgCJ\n9u5JtJ/6jvrhdishc8514mj83SyDc3IUHDz7qeCBKWaPTtOnwLUe14GlA2p4\nyFC4YEnVjMzjMp2sPTlrOXgp0BG1UMaM7p/wXx09WkOaD9wokYHwAl0CvzkR\n/NaV/TMKVJ4SgVmwcWd0ECwTz7gmj/ObIj+kVwtM9Hsgll/akLNhaHuPVjvq\nc5tuudLv/BACF3QLrr7k3iznl5PVosBHqMUB9YRaE/KFN8Gr9AYwHNlqwcyL\n+iQYw6Va3AF8Fdk972q0ea0sd9wcdNdEysAc3f6k9eiIxLcg3YDB4HuqJHmQ\nvnOPQiL8vJK3JSrUcJe9V38f18QnDJYnRhCgtYCbg/CfNoj+up9e5e0Pbrvn\nGp16O0ngJtsNx8dI13bOQm5pZuUAx8spBVP+P+D7b0rIZHMFrdqNcWp80tVW\njBHf\r\n=5Cbv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f23a6daa88a2f051e2a94d803431ab3b3d11e26b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.3","@storybook/router":"6.4.0-rc.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.3","@storybook/core-events":"6.4.0-rc.3","@storybook/client-logger":"6.4.0-rc.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.3_1637071957241_0.4237281567522315","host":"s3://npm-registry-packages"}},"6.4.0-rc.4":{"name":"@storybook/ui","version":"6.4.0-rc.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0b1dcaf27032a94e70c62c522d588a7bc1af8eaa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.4.tgz","fileCount":387,"integrity":"sha512-N/yj93cB8IeOIaxSI6NYK+kAtDu+Mj4U0+IcvZpb+XNSLMF316629nVaALylIcuroiBgS9HFEiWXVdSDScduOw==","signatures":[{"sig":"MEUCIQC6gdigGOMh6g0tduJn75uKtQU2i+5Z35gpVk5+QBPuSgIgGdIGRyW+A3hXDmIFE07GA2VEDFS8dUbdGPcGEtgAG1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl1S4CRA9TVsSAnZWagAALRsP/AsOcGfcpp/a1XNb/O21\ne9bYePwz9DS5ccDS0lYkvjF5Jl2QEVsgLlS3DXmlwqn758BJfnO2kJnwkg/8\npdfUnUH6D+cv7vDNrqeH8BhmPKIAa2/71TV1GKSoFAAncqNXyhk10H6tqpfy\nPZWgnVGEwWJJoTJby0BCfflFSkOaqv2BKpCN4Xth8d0kkVGxxBRLShZ8y9fk\n9UpQ8nsDS0q38r5duTn1+uYsdG24iymoKFaqFWoo20oxaraWt8LnUV81Vzdt\n7IR7c393ZgI23IqemvDPR/CyGNk/LV08SOOKmZj2a1BQvA457L1yOp1Jjd8m\nV5tTRLcN51K2DbOG68CKIqIAwwXWu1IzpvowRXp5CDCazDT04w4xwpiOJ6RT\njQT/TqpaFPrNSiOVHhMOlrJ+g33cdnNByrMnF5/yQneZTiVuopn3GwZxBave\nWv5O+m6ItFMb87a9Doi9WTtKuBdzj40OfqBXZMsm2ANtO3+AM0k/qFU2Xz4A\nMYQzHU4MUk3Nn4kh0aSppVzNHn4yOERd9VnsW1BShKLioYgYLiRwElvx4X62\ngCsj+4HPyXHqeVX3fL/w0YIdmUUGq45O9JJ/dF8FYOrKj/6ePPBn9Zbrcksb\n9YcKDhYTUuqRO1qmhsYosxDWnVA9I2VwZ5ih15cdwigCOl+r3mrj/U4x6pw0\n8uIN\r\n=176V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"43653ad69c8c10840e3f35a831ed8bd36b9c90dd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.4","@storybook/router":"6.4.0-rc.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.4","@storybook/core-events":"6.4.0-rc.4","@storybook/client-logger":"6.4.0-rc.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.4_1637307576538_0.7729348514720502","host":"s3://npm-registry-packages"}},"6.4.0-rc.5":{"name":"@storybook/ui","version":"6.4.0-rc.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"58912fab33e9520f48620472554b262d7f953775","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.5.tgz","fileCount":387,"integrity":"sha512-QqI38/qOBTirCDjn4ZwmpvuFmotrnYamN7cFbu2wJDakZL2loB28m0fVaCQkosrw2vp2exNOfHzwJ+uvVU9VpQ==","signatures":[{"sig":"MEQCIC/wdYyp5T6tckmcKLt/xkNxdkU0dU7h71E1fdg2wNqoAiAmy+HzhBwOa/nLu4CseHqJDGibQJPGMuSTpzSfUexYVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl5/uCRA9TVsSAnZWagAAc4IQAIa/39NS2Ix65KAhjenw\nT3HF/38G7GKVowuhOF8Zb7ZNDv1fepP5w3i/siwafkEjiQq0xhdLrIBXPaD7\nii4oB/YgNmfaii++bzTbc/cIFVhMRSfB8p+ju8Wh3/tSwEVbbwXzVhELvSlj\nKpK/pDSPq0dtabZFRoPM7iX0BgSzQC6YtiWP+ZA/E9ws9cck8zbOknzb8qie\nWJF1fwjhrVGK5C3Wp0JklkbxfoHYNUfwcMMGaAYiv/SYSDIIAUH/L3kE/SKu\nanJtH1xN2HWU6JHeIeR2ySegTRk4w9h5kVmskNHkthoS/yeHb6UjPz3bi7+O\necHELx7iz+8v/5XQkGv79ZMhAjR1Swww9/v00ByrLgDFmkuiQvrBbkB+DJua\nXwMxCeEx5Rpk36sy9r5pfviyY090P+I9uocmv+e09wpKoDpThXyyceqiFOeB\nAViakp5hQumYgF4fbgNgYz66XvzHyvk5IKKmttZ2u00oMUMvP8OqiuCTDsr4\nqXek761us2wVUS6QKTuQqW7FR5dUbyyaspSj6gEtQjHf9/s+1mTjJGQZMQmJ\n4PBSNud5UYrxpK9o5Rq93GatgmsHx/0CLOqSUb4daC0PL6Bv8e4cBYsuMs1j\nOiGFJ+KG047DS/LZwAo6alQuhVAXD6l73HgOSCxt3Fmjmzik/MLQ2ji7eVOA\nh1dw\r\n=YlZa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7fd7a77028deb815caec3891717b1ec414cdab74","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.5","@storybook/router":"6.4.0-rc.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.5","@storybook/core-events":"6.4.0-rc.5","@storybook/client-logger":"6.4.0-rc.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.5_1637326830606_0.8575885594598494","host":"s3://npm-registry-packages"}},"6.4.0-rc.6":{"name":"@storybook/ui","version":"6.4.0-rc.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8adbd37872abbc52e13d0abd715cebc336d47c38","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.6.tgz","fileCount":387,"integrity":"sha512-CQXPwWWx3OjBXB6q1l3HmGCoiOVJGVBlTvvDa890qL0LBP4/tqyW6y+Zx7fsaOnVDrYqUHiIw+x0yyS3HxTRTw==","signatures":[{"sig":"MEYCIQDb2Bp5GpMiIi+679LPxIJSFfqgwK89TauJK4yMO+oeLwIhAJMt6MUFe978owYZdH1ZeZO/6UlL9reahBen+Dbwo7rg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm03zCRA9TVsSAnZWagAAmJUP/2R9xkiovUXFcg6N4473\nM+rfWiyESYlRjLswMm10PLzyEILpvlhguQjxff+YODMSAu8r1BQqDIW/M+NC\nyZIh9nla1Fs6AwPqCr/DYQU8HWW/ey6CChdaXPYVK9ND1iMKWDPmIaTpAySc\nBui0H85fK3t69k9Q7yuOSpFlicAM0p7UGskO7OX+91nclZ6Buj3N7Y4tt2g4\nb4HWlYFEvwvSfNUeNRTd0Qi4LNMTzYliGjTaXR34ZOKmxKPEZSupJLjXi0oQ\nrw0rutIA1miNqLN/lRzg6UKRp0iz0oGeiQPqZvKtj7PKyshsJt0FaVQD4zoV\nFEJirb1Y3UmOmBaOcYizDku5g2O9WqrBfOjHuyw8MJLrDHQo+TcBT+JRmx3P\nKO18AChmuUX8IteSSgTHFpjj4zY16a/vn2zJdEtMAZ+DKgotpVc1bjURPji+\n2ZDUkrlw1bzF54iJvGgRac1440DoRHN5WRyp+quwa7KvSM23sKZXkcdFBQ21\nVI5xMCa/nfJUyXoICku1U4F4DhmsYGzOGjkeBmZ1zw0UOf7b/aF0B8ba9FpC\nBO6L6tDEPIX6tJxHOkLk2eLiaXLUbwoHzzXgU23bpL72ohA3zgEdoSaVuA4+\nW0r2DtU3VMXCm/+kpK6HKKrG7DPo9o72KutRlhKsvLgwgUcU/QOcDE0DywxC\n/y/K\r\n=0rgv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b2afbb87f07d81f5c3830748490f6dca84d8e470","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.6","@storybook/router":"6.4.0-rc.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.6","@storybook/core-events":"6.4.0-rc.6","@storybook/client-logger":"6.4.0-rc.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.6_1637567987110_0.9357159564438722","host":"s3://npm-registry-packages"}},"6.4.0-rc.7":{"name":"@storybook/ui","version":"6.4.0-rc.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"238063426815a879e896bb56fd0faf76d31842b5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.7.tgz","fileCount":387,"integrity":"sha512-6W1+MrGwmejC2Ekd5ug8AdM1ulnd8k7/CH9+yQ1pU6idaa3gNX/ii5/Dm4ra0u2t3/XcvGXfOP2xqN9Y9s5xHg==","signatures":[{"sig":"MEUCIGeVGRD/pFItfN8iMgMiiMJxjDp7IiiYBoDjkIXbkr/tAiEAnHWCORqrr6+WfHUnvnbBl9W9OropO6qEHe5fYfnuKj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnYYzCRA9TVsSAnZWagAATrcP+gKBktEf23gN8kFqu6lV\ny4kgf02z6ipCooHJWYZixRtcXmeLJqte4LOy9W6EpN8KGQ34aMowE7wDbe/d\n/mCXfUkB4s+GiQqfr0ff9wMbFj2gbes/Lthyw6Yq3VBwEAwW6HZ6MPHPvTdl\npbnmZhg6Ql/H0BCHyDzVjBnjIyfTWB3iz1UTBK7RzuzlWMyw6To5ldAEX7mR\nb7hSGlw13sVe3kOgn8ZZL3AbnDGJLjcRsURsTHW2poE3MlnxEP7B0i9dZFnC\n63Ab8bu4VK/pQMmG3UAUXUDEvUZ3Mo4+N8k1VD91rcv/PpjP38T8G8mSOxEd\nRZwitnrtyN5Kg9qKKig3D6gSc/osEODV1cmdNNpkN0sDrfyU+FP6FCQNcRQW\nLmxkQTUGoAsCMoopxCrLCuuum/s/k1Tnak9l+OiA1c8b97blc+pPl+R0XA2D\nB4DxSCzW3FXPaiJTdHbZlPc/cfQYyqUgaTOIuAwtNd+68GUJ0qyA24ep7Sst\nl400KjnHNXSdF/OUOCscXccWO/lyljIjWy8vbeQqzUJ0XJxVQOg4icjHOizU\nBTdMs+SIOZZpfTK4obDndewFCOQjunJXzEKUZnGmvNut02ydoQ38oxrrBGWa\nmFDZADMcBvZQRPznq+gTFROtzdKA0puMXiIsRKkfZt19qGKET2o2MRnr3KWp\nHf7b\r\n=3a71\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7162286c0d8d122c7206265fab41c4c191c86d40","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.7","@storybook/router":"6.4.0-rc.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.7","@storybook/core-events":"6.4.0-rc.7","@storybook/client-logger":"6.4.0-rc.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.7_1637713459210_0.5461301834484233","host":"s3://npm-registry-packages"}},"6.4.0-rc.8":{"name":"@storybook/ui","version":"6.4.0-rc.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"abcffb5226000e1cb4e63f5cc9491ac9d926aab5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.8.tgz","fileCount":387,"integrity":"sha512-YH+wP2u0S+Fm9RfMpccA294NkFusCembayeiZ0R36r8RpTpPrt+OD7nBRLLltkp+YD07phrb5oi7M42ZNMfGMg==","signatures":[{"sig":"MEYCIQDYKUJeQZbmCpg6qciSW/tIbyNQ8/DeTUJvcu9tiY/JxAIhAN2IxzeghS9w702oBWheQOdAd4D6VVdUOGfZXgFr83Oz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn1iLCRA9TVsSAnZWagAA8+UP/j1rhiXhuHu6r2JbQfMg\nehGpt9xwo96dGqTZ2IcTZOnh6CHn/NA7oZxx7KQKfTWyP7vT0DpMioCfXRA0\ngNa841/N385Vur730WS3THrA9g7VpK0WOWrig+HEa4CtkrLsvpraP/3ODoiO\nlon6P97UhUpxZiyLaL72hHauLFSy9xcu1e+xR+8okdhiHT0Rb8yXXh0tyFik\nocoGqLhEhIkvAiURIhhRlt23AR45nsABmJO9ABXbrR3mY9b6/izdTYbOToHH\nnKejHF4ufEcUEtBwQT7WIKu1HcnQhTlvWcplvpdY7EsWfaQ91vqHPhwz8t+O\nSlBxwvDyCxFeRxF2UMZS8X0hWumtv3CWSXAvKwKhYF2QIHWNnyUaGNbgmo0E\nB/8ERjZWJ0G2cSGYzUxF6b/13rQw+OhGOZHUZMnfEj6trXcxUFVRmU484UzV\n4fSQmpO/5gSoy5P1XQrPbBWyzDj3kwtlnpRWhWFGcgCDAR6lr2fyWeC5Tkez\nFlDpIhZRNSj7kxQDUSDHrAdjV28LbcC+mUBIZXtazzILanmUV2yaaE/vyfNc\nz9FHwetf1c2yb2liOqwB0ba+pxl/uZokXpNlkSY8oRilV2BamhlRbBXqpg8E\no3DLguwMaAUWjzDYLc7jugmSRf4WYJhgQYkDxHXwihFv0jF92DFQUJhsAUMQ\n59p5\r\n=k5ez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0be6dde43b848e310e705a4354c6c8abe0431448","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.8","@storybook/router":"6.4.0-rc.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.8","@storybook/core-events":"6.4.0-rc.8","@storybook/client-logger":"6.4.0-rc.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.8_1637832842729_0.724139670638831","host":"s3://npm-registry-packages"}},"6.4.0-rc.9":{"name":"@storybook/ui","version":"6.4.0-rc.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9beb3db423debd70cc2692167c8b5f3a18994f93","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.9.tgz","fileCount":387,"integrity":"sha512-Y8D2QpquTjixflqvvpWvNEsoc7hULOw+9grB6Q2YbiDe5BNbvdOBLLy4aM7rq7GpyKUnPSVDBrUnuuxPfTrqqQ==","signatures":[{"sig":"MEQCIDhsBJL5BhUZqtscnEyZFY1Dw+roQsNEcVrF2cdieiLuAiB7QwxGz+dKvGw270fp4lvYVuG9RQvEwyxHagjcOQBXxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoEuzCRA9TVsSAnZWagAAkzQP/0I0aisKT7H7AB+rHnkV\nRVKkG2PCLIFkSabZd6LESkKRQOKGs10p/ukRna4Y7AbIGTpcqoqB4nYIDjVQ\nOFrI8dGnn4mNptPVdwLbeEl7wr1fyVV3pz66izcFSGR7ikZO9HpVE6h1PEn8\nguSQ79lmtJnve09m0H7tTk50b0qJBap+5GQmnNV0rI/WvSGh/5nXhGJPTCc0\nKG2uRnELTI01R5TPqmp560/LFRYxP5ur89v2lBZtrNcMTRaUpwDrsPUFtOwE\n1ySzW1RhRCYlNNLuJqDpga2DFT7WBnNN0ft1J5zJpWOSL/xLNO03fZH8zlQ5\n1McHL5KkFhaa9faxckgGRxmo6GTctZlb5XyiadUqFAnSYe4ojYLw6/h6su05\n6YKQGKAU1A/fk2CAg2qUBhxIcK2iGV5t3y2qjWxKz8/tOXjdhudrmuuTdqQ5\nDtd8I3llSlAhghu4jVtVJlhkTGzoJwE+ITOvtaw8yWFpdjK02szhFwJFthXu\nY+SRMMEq0MDPLy6PhC8n5E8jUohPqna+d5dIub4Pidp6D+0dST9si6ehFmL1\nDKQJZou8++lDArboddeI4WRpkQtPb+M7xQ/BnJtHQPmEe3GB+x69ZDsDdTWb\n5o2OaXJAvWXCpOpAQXMcLH/xTEUbn6LM1ySlcvMMw6aFdCI3EunWsuDobMb7\nuJr4\r\n=YF0h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d5236ddaafc17b739a8b546fd65603dd09142344","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.9","@storybook/router":"6.4.0-rc.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.9","@storybook/core-events":"6.4.0-rc.9","@storybook/client-logger":"6.4.0-rc.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.9_1637895091050_0.052700181758133846","host":"s3://npm-registry-packages"}},"6.4.0-rc.10":{"name":"@storybook/ui","version":"6.4.0-rc.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"82c888394619eabd47552ae30580086f0f93fcca","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.10.tgz","fileCount":387,"integrity":"sha512-00Qz8dJjie8VVj0QSyiNHAqk3rr6ut7rOI/lpjy10ZRCjrjSjmWksE4yITbFTeXF7NZgwCLLaMVr1705wuwFPw==","signatures":[{"sig":"MEYCIQDMEI9wxUaHu6xBhHkDzZbHjQvibO3n5VUeB1zRiO021wIhAJWP9dBTrlq5xDj4CPeS5ylaBT6LKKbBH/wh+Za9o7n5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoI16CRA9TVsSAnZWagAAH8MP/2MqZrb/P7PGthOhUDw4\n6HQqjhPNLk8LAcF6HyHCfLuB28hH2uW3m+4R37iDNcMfAE/ZkAtJX+ajZIFo\nqs5OkvfbXcVMhv1gUMaNzFC4z/NwUyInxMJnr1L3HbwRRMgrS5TPKQqSeosn\nNepJ6w+Sc+9LHTrzYH6O2kBoub6kWe3ekNcpM50CAQhuDk9agGfUiLoHJJKS\nfHt1RWWoP7VxxIfTd9iTBrTbjCNantzXvCCKkqRkuyossy5mJAGUNQQCCwN2\njOahEnEVEjSIWCb06VVeQ9/uBL/fRsLYLBiULj8XHLl1lQ9KgS2Ign8oldlK\nIbrLQkBwX1K/RW/nYhIBACvHU33vMmVK08bebTEYLl5a8T0BHF7uIvdbski6\n/yn15L146QPFiCRt96HY2YkZi5++4hWwP8tiYivA5bKWlub930ckP69D5juf\nSBw/lcg2+ZCX5EQs7gCwQH5PSCcpFN0Ygi0wMMCRbuah50XCfeL0fwM3UAps\nxF3AZJg01IxhS8znknKZSEasNFsVGXGes6IUumw384bHg1zrQoAZqXVvhegl\noPJ2WcQ8SdnLpBxTkoP6xhmtMt7rFXbEJEWA8U0v1jcP47fNVog7p7mYeWVH\nSMcMZEleB2YcArYWO8RSzgFjWHoNJx1VxUNX1HQBhSrjshsbHPR2yNB0XvVr\nxFua\r\n=NKe4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5ae60fc639dfd19becda5dcf42f4e42e6f88b02f","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.10","@storybook/router":"6.4.0-rc.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.10","@storybook/core-events":"6.4.0-rc.10","@storybook/client-logger":"6.4.0-rc.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.10_1637911929903_0.02222612513768052","host":"s3://npm-registry-packages"}},"6.4.0-rc.11":{"name":"@storybook/ui","version":"6.4.0-rc.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0-rc.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e46da6b74623870d65aec20618e73d3f8aa08381","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0-rc.11.tgz","fileCount":387,"integrity":"sha512-1ZEOUua0kIPLORaAA1WF37unYs5OndfZO4Y1msd3dviksaAz9oL3nQLDsa71KOsnS95W5rtuFedvW0ryRs4GRg==","signatures":[{"sig":"MEUCIQChTHw8bRdKWiafDX4W52I5+gGebfBfApqrnQ+X7CxaQQIgfFtH41BHY9oBJK6pc4lMHoHDIItXAsvq6Vwqo0tMF3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoKhgCRA9TVsSAnZWagAAlwoP/32WNzEKwYSI/isk1JyF\nkX8UFqffZqATOFJbWAH9S+86sSmYy3LS40R280hRC+HIW4pw5yEdBtqd9k+R\n1JOCWmbj6K55PBu2SjfJkArg95lVqQ6jvNqW9l8Yqo+XfLlaJPXk0NsMVXBN\nsNaOv1/0NjOHztbwkRUDqLafsPAN/HJwCoq+4+fVduDDR39LPzSbYdA1LEKB\nBViorvf6J1WRt8kaKDAMIYEZJ3fMkRpPkfTsf1QDpaDkHyhYS/VLx9PI3dus\nWThz8I3QxITSki9XSTuwgnSRXsvy/ROgldZFoNgbBFsUOi+DqRw9aDuK4vY1\nOXCnsypWuQrOznYpyD4xs/9flZvtRq0fB0Wafsv1D6cKrQRvYmHUJYQ+CIV+\nujgE77xwEV0ecAz6o0BS93Yu2/kH4IOPtZ1OCprR+umbKzKmtrSVZAYNvjZx\n7Tw/Vi0t842ynUtCVDUUa0xzSIx9CGBX8zWJ/ukdsQtBh0MXPde53+SZd+s9\n+dBGmU2rFCal1LnciEtQ7NKr8pVQv1NLhca7kBvPnU12GqCNAmcrG8idKdwZ\nSCUGRlbnAQXtiFLUpuSQDA1+qs1eaRkUE5Ba6XTg27fAOqE2pfPociEGybso\nANH0IplfvaFRHwo7yAEor58dfalhwpDDxpI4WhQkgZDE3oYpJH24xGGWagdW\nKn+g\r\n=ct04\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"77eb43c5f02179fb2a823f975448e706710931fc","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0-rc.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0-rc.11","@storybook/router":"6.4.0-rc.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0-rc.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0-rc.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0-rc.11","@storybook/core-events":"6.4.0-rc.11","@storybook/client-logger":"6.4.0-rc.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0-rc.11_1637918815963_0.8947403545678965","host":"s3://npm-registry-packages"}},"6.4.0":{"name":"@storybook/ui","version":"6.4.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"463942f6d3e804a7c7a41033a3b14a806916118e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.0.tgz","fileCount":387,"integrity":"sha512-s+1fOHBuLektNy5bqzxwXE5oYGyKJdrS/oTCUlmgbNJPFFqRfW8OFyXl+faIOybqM4IP5Gy5xjz9in/56vgbVQ==","signatures":[{"sig":"MEYCIQC4hCXU4bYCETZ9zkGBqKuwQ4cUm02NboQMLNHRzBwzogIhAJ+simgDrO4AS5J5UDADDQWo2dQ+eaDB5lfBrjLO4qo3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoQjiCRA9TVsSAnZWagAA3mcP/20Aq9BK+dArugOKIe7K\ncDVqGGYgP1ci/Lja3TLDwq4L7ZS8KQ3afsEe5mIe5W8lYXCg0OCBWEiZg+J1\naKFGH7LnJ4zdhmAiShazIaiu3WiaagZkuX8bzEeJ79eyO1JXAN3S/Vcblxxc\nK/iMBlygGMbM2xX5tO+gm/4AxTqwgsSlW5EKBQGD4Ni6QLFXOot3sAlKUhL8\nVTQsdUR/VdTIYT+gO6IIlYbrsxA2w5LP9JXUH0xcx8iygwALQ76qYzlk4Um4\nfWon9gNFNxxi9dHYcvdHL+PJ2ILOQDTIQnBL8+COaZY69oK6E/dJ4AN92IEO\nyKu5DMF9UxanZ8cYoqrx/nO+6Xdwbbr5pd9UX0GQgu1VWGZxj/LaTvb+Ggyz\nJ8SzE68r5yUstF0dxxhVHZpoJEJsZ+X5HrU3RYaCgzF48DOFlDcU1nKzdehc\nGcZG7mYL3puNvCj4TJUY1dZaZWHKlHv2WEergTVAN2iVR85oV6BNUxyXMBMD\nR5KFoBrSdXvm9MrfqBaca0DgVRu8gjy9Of3LwxoRs4+/19wHFnvRh78u85z2\nr8VFeGSL3QZoQKUzvS16QEaXP7tWujOaCuTC6/D6q9O1PpGrw/rl3EkBmVTr\nw1HYMcXo10SRWNyNAfs9cyN7j1qWUyEgJOrpswncCBCmOYydPvbP1EC2eAP3\nJEex\r\n=8iXf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7d4d6ab38a9c4ef18968fa3964b5084d87a82b71","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.0","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.0","@storybook/router":"6.4.0","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.0","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.0","@storybook/core-events":"6.4.0","@storybook/client-logger":"6.4.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.0_1637943522391_0.1447909134055383","host":"s3://npm-registry-packages"}},"6.4.1":{"name":"@storybook/ui","version":"6.4.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6bf99f38cb224cee60b6578e74e23107e01896b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.1.tgz","fileCount":387,"integrity":"sha512-AKJFg6CLLV0l4vxRvbP4QCNNeCJL54qakxlXoW0vphnU0Od3Dcn5M156wccBQ+hmrqFffAcU60/kVHjEq97TiA==","signatures":[{"sig":"MEUCIAh8H3kAhkMUZqRq1oJJm0C95/1LyphlZ9cTYKk/CDfHAiEApSIQtFSThJ/uVWMI/kng79QjaQAF+d+z+h5/YyPMzhg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpXHuCRA9TVsSAnZWagAAH7QQAJ4MroUDLw95lPPUt2Vp\nU2v17Hh+IBFxWfSP/pJeS6rG3EfrtS7tIAWbnDj4YNT2/fXhbmMqrWdzfQDa\nFrvJs9q1YcbgXxsI7PGAnqOPWbKgXdl0tenE3hES2+0vG56scwk/k1VvRZTI\nqx4CsidpfacIRJCBAu08djLB3lKXzWXd4ceN4mZ178+XkURDJtcfnrWlYq0E\nzl8Mtqao6XXwTMFFMb0ahwxj7rKx0ddu5vCduMAhYXuul8jn8AE3qyW2Wrva\nFef5wmEed8Kj6mS0VcvLV1b12WB2sK8Gr7OnKtthhlBlmupwq++Ku6NEgnWe\n+dZbIh3CsjBQxD7T7npS0Gh6q1jpDZclTAQGKhimYUBZeS2UDbNR2qHJznNn\nkHnDW+BIkW1SGHhfCz8qme0RCm6gSZGD6FFzVzzk+RMgaH+b+Zior2Icjfug\n6MKtW/2fvzzfbBGfv/P/WWXZEULzAIZNtNSJ82agHdu1KM7ddmeLXyA6ZX80\nbg7cFsf/MvWbexTDLOMfCUqjnMuFNpHAY6oDFYyNaZ/Y09YyA19MOU5drHoS\nJmYHx4eBd2lVH2tPTHexhBRqfHhEXx8y/EiNpgJwonWytZOhLo9sBe5QKH8l\nVv0VQoU8vnXJGcpUV6AS38K3hXuMlUPjNHjICfvFdjxZ43pHc7W96jgUJgni\nomhB\r\n=OG08\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"bb20e8fef506e05fb9c67dd55b0405b4b1043698","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.1","@storybook/router":"6.4.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.1","@storybook/core-events":"6.4.1","@storybook/client-logger":"6.4.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.1_1638232558044_0.7780971127200298","host":"s3://npm-registry-packages"}},"6.4.2":{"name":"@storybook/ui","version":"6.4.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ccae124b24f1c8f343ff6bc6b057e1a9f008d573","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.2.tgz","fileCount":387,"integrity":"sha512-yWsbWttFz3Fv1TWSJTLeNP2gA4SG61YTVqXhI60y69HgDE31dtN/lKg0Rf8+2ILD3dLOCa8vjXIC6kDOJk0sQA==","signatures":[{"sig":"MEYCIQDD1cZ6SiG/BORqQ20L/OjVLdHCiDlj3zK7RuRrK4DYjgIhAPklG39ln0x9TM+wtu6DfIY06r4HCLWBQk0wT6YqSv6J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpvlzCRA9TVsSAnZWagAAIaQQAJkv2D5lYcwZthHRf0wQ\nYwmNtYe4aWXgjeql2ArNk9nWv2o8TISA66V6L0m3Xf5/Gdxj2cPojcXAEX+k\n7mKWqKIGT1w45/4VaKuJF0UeLJ/3YI/It7h+dmfmT598e3KKdefQv6tBtmGL\nUiqIM8jwPqoEOFrCO/VeetTXVko4dM/s35YisUspIK7uhTlmqD3muX+sUmDs\n86+J1LcSFhz1qLS3yjWsrFM/43igxENl+heOyqmqoDEIkSi7bJAIs6oEIRSL\njjGyVH/Vdk6DB3Wuf4pUgmYrC8GImHR/yxvPC7wa5gC+iCmwHO2OLL8P1qiE\n2KM9pE7V8COiKrYPdcrZIg+8ZnMhU4Uhewb8i/S2xzM5LWmti2xe3/eLuZm2\nRmgZAkqf6JZL7IM4pc4lUGrkk/Z2qC8pT8GlK+qETkyVxt93eGmhIwEqkIFR\nm1Z64flMA91dHyjZtcu6rjr6MSPkOf2s6dtZNEF5eMB7/2a2AFne2aA+Crcn\nTqGWfbx1RrwqoxNK83mbvCyB772MdesjIcbg/O87qO5mQNP9XUv4M6qOavgA\n4oTYYo96v5VAwBjNGFb/BBJ8vOcKyN3PPK+meM3SbpHeJiZpqBvhXjdmJr7t\nRvGN2nuzUcU2ohowtrMw25ekrkFUfa7k6cT6G+uU/5xEbWf+ybasTrauf94P\nK8w8\r\n=A8uN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6e5ec774cf8e7fd8a1870fc2469c2dfa9ec112b7","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.2","@storybook/router":"6.4.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.2","@storybook/core-events":"6.4.2","@storybook/client-logger":"6.4.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.2_1638332787041_0.29054451983327256","host":"s3://npm-registry-packages"}},"6.4.3":{"name":"@storybook/ui","version":"6.4.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"099cdc7bc09c1d71dac9a9eb4698aa949ed2be6a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.3.tgz","fileCount":387,"integrity":"sha512-z9b90YctCrqNkfT17fhPKs5m11pn7Bqy7iOZg/1OFZZzRp4iYLzrGdkdwnGe/cpSaJ7pXwdmoJZCqZoXIrJCYQ==","signatures":[{"sig":"MEUCIQC2977jVzTIYJef5A+NHcjwTKQhb/xRVGx8akM33k54AQIgEerROwN+AJWSS8bU4T5d8a15V9OKRXf2K49iCJNr3Rw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpxmYCRA9TVsSAnZWagAAikEP/R96fot3Ro94vW+oNj+Q\ngGxyDEYLYgdw9B7I7kBnHhw22HbHHDa2kYtu0EU6mKnc4jzpyXFzHQXWWdvn\nBz9ZISGKYkI+4HH8QkErSFfM/GBt4znaaNx9H/8FhLOO+ud70y+wS71qNv5w\npEs6wzU39Qt6ympun7sP1Tgqu4Are3EKHYam+vldxR7FrX2CSWglZrLrdXix\nrFL6oIuy51RuKelxclB49Sf7DqP/TT9tiza3aVAM2ikEcNLzpHWDPkpfsSg+\neDNZBcKLSRi0wO8v12UIadSArfgtAJgfQN6z87Ds1YR/SUfCpT77LnFJqme0\n4udxxL3lTZWB0m7/sKgtnkC3ZST09iSfpmZdYvuJd25kaITWKrJrASEj/CZs\nQ3a685vg+K3K9WivJn0ptfwoLP+ienLI3tErLPC0vrSfVkvhZOaFXWcpuqfR\nExPrgcwTOMaSWC9NeqThW25tes4Amj9bUZG2e4QTMaJEXoU8bsKpf+HX8bUl\n27XveqYLKF00iqCw9c0zWzCr0aMbP1xY1WCxNb1GMI6rE9ByyOqdFQhCqH8t\nCkU6RXCA+nVZ2LCmfkqLqV3pA+skMj0iRW2lO6bn3I7Tu/AS2ZFgZ9I1a3IV\n50V6Xh7Xz5cXY42AqjHdevN4+qDqKVPLOiH6p7I3y9AgxsNkkfySacbUOMFt\n+sXW\r\n=dWV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3e8133aa834b15a7c7021c6e5e090016491b5218","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.3","@storybook/router":"6.4.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.3","@storybook/core-events":"6.4.3","@storybook/client-logger":"6.4.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.3_1638341016620_0.5332581160151932","host":"s3://npm-registry-packages"}},"6.4.4":{"name":"@storybook/ui","version":"6.4.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"66dff0dc5d74a23efc251562f614f019c044f1f2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.4.tgz","fileCount":387,"integrity":"sha512-oaPrXDplP9uA/g5Gxat3G3Cu4LoRxVfQgcs8bpGSlINZE7Il5+ITuLZQ3JPTnJ0hSvfjmiMTj4/Hytj2FKeyiA==","signatures":[{"sig":"MEUCIQDtouFnPFa/NtLrN8gECAlC7a8f/ViHniJOgGZkpuvPkQIgGqZbyZO5FB8tLDhj760O7xAVRmYOvHVSd48QunehmYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqAW5CRA9TVsSAnZWagAAoUUQAJyo2hJW6EqfjmfxDR3V\n9W1HHkImfnyQQVr6/U64kgdX4zKtEnZCTnoHdw+a3+/fOlgO3DzPQWV1gQ8N\nykjW/7VTmWf1XZkeXU2y8whYlvFzgbUbG4VjQGbK/g0CPem+Rv+SPhrU/AC4\n+uFYd7RiNDM2w6FIo/qQa/Nl1HqXaI53UyIjO5ptl5xtg07fS6KV0KY316Xk\nXsPEsvb5yZm0K/IrkeRQTGm8ZnByAXJab+QNMeS1xjuAtvnIoqcYhMNvZoJE\n1rXVl+ppjb6pDCv3OuSyfp+bz/wRM+x5KePEMpBzkjVWbMO8oxxCJr/5n+RW\nRBrlpoFQkJUGuI+y1e0kf+Uu2pxltBQqdPCc75ngOo7WtHPPkkon+Le3SBEq\nOTMDbj51JeMkJI0cX86D/L0hxQVda45cReJRtnkF2emkvOQ1j6QGYdyPMAQB\ntsS+eOHPO+47A7snAO67fE+o7HF5cGWkwgVB5MhrVW/V6FHGkwkiJAxEeY+8\ngf5x8yr0dylnHhvZoU2nJZNcq17rz0xoOMIEUZqLdbhbr/Z6kFJWOmRj86NE\nga8AENAy6P4V7i6XpmexK4yHljSnJSOkCzhAggUFp9dEW/XHMTUwGWjeiWTb\nVFj5E/3Kv63R+2O3Zc01Tcls8mzs4H23JYiVvQZFtaJw1HTw7uWZH45+qpyf\nHPHd\r\n=gPDV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1cae7e10e4a1b9f7f17ce3472b3017e20a97af18","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.4","@storybook/router":"6.4.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.4","@storybook/core-events":"6.4.4","@storybook/client-logger":"6.4.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.4_1638401465550_0.5959047499313235","host":"s3://npm-registry-packages"}},"6.5.0-alpha.1":{"name":"@storybook/ui","version":"6.5.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c2d1fe4e8d2bc3d9abe22b3e10485bd6a1a5a91e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.1.tgz","fileCount":387,"integrity":"sha512-NhYPGnryhcAA8jK9r4dG2rPhnU1oopksJGf4Gu9rWUJhPyA1l+AU9aLbzzxU3BVLulUZRvO5hljxFnL3wF4K8g==","signatures":[{"sig":"MEUCIQC/2USnpw/87qG7Pnke5tp8x6YQHp5CANQSP8QKmZk6BQIgfT5hUmta0Tx6beAzNff0z0WLrtZCLc09okxdejSH/sg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqQNVCRA9TVsSAnZWagAAThAP/jPLcT8jGt1mQhqQBbMh\n1TwI67w0+d5UKWfUnxcGnfHWbq5wERMurgj9sU8+RruSEFFV+r9+ds2sFKjx\nCrHDnFR9bnr8pn+8i/htpCJLhfuiQCrfeyRUtzegtXnXFOQV8PmfjsCC0iyh\nPwk3S4xqM20SXk3WRi+CVpfelhkhDxUaZvIt7+oh9rxNxR2vI0fUG+660++D\nuXv4XS8QL27wNBAAjGrhb5Lllejc4vd/iEfMod+S5lGi/VmQbZI6VLp2raoj\nUAzsfhEy0HoPIQutc4FBsh2II6gtJeExaLFJKwKOG/wG2UESgVBdVsYQ4Ca/\n5UD61p1S/sDv+QhE7qS6+gvIS0ySfjfQX3QwdRwKfXiTly+KVNJ1qV/ezFKf\nFz/dvHhjfsC+HAdf9SXbnXUOiT9qIGrofPJcdK8AEh2nDdSbTRKJ4uBwtA3G\npzKjV7c0cfLlrDsQKiUf/g3yT3yPw0b5DY/MNLYpYMJak2FtJT3gz1MTDJYF\nffy1YS4ESIXY9P1t7194t8EZ0zpktHDmrpcaNh5Y6UxG55c/Vy1uIa/pd3NX\nGjq8wO2lXKA/X5W7/rnMA0q+pk/fHWGCbryY37kAUooMbFEZHMraCou/yoVD\nh3x9srJ3NjOMF5CizFoKb5879g8e6WE3tjPPZdWTml89oP3UTqktn+0O48ZX\n3wqH\r\n=kQdb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fbf6e247a099ec45c30f8594f255a088847b7957","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.5.0-alpha.1","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.1","@storybook/router":"6.5.0-alpha.1","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.1","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.1","@storybook/core-events":"6.5.0-alpha.1","@storybook/client-logger":"6.5.0-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.1_1638466388892_0.08986729467265642","host":"s3://npm-registry-packages"}},"6.4.5":{"name":"@storybook/ui","version":"6.4.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f633f1b1c286acea08675d0ff26b8568263cf92","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.5.tgz","fileCount":387,"integrity":"sha512-QNGKiIjwbDgqMdmtig9+H2FJc2fF7dyqeWDniS3QkPJYnowEN2DFN3XAtWB9kfJ57StUhMgYRvD+aSeR7ZOSeQ==","signatures":[{"sig":"MEYCIQDCWvkjO72oVBIj+JQbeA8LQ85svg52HwKjcotnXuQspAIhAPajGI9R6ZTXB+WTUV+ZUmoYDBy0sU/LMfoH4wjpgDdF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqdFFCRA9TVsSAnZWagAACxQP/2ai+vzv54KqJsoHR7AK\n0X8lqctN+8XM52QCkM9rEVaYtuQ0fkmhO2w2nqz0Rv+nAXfXxj19Zvn8CiGu\ndloqJYgYroQBAgXu/G106prE087p+cyX7XnJghb8x0jCKB3QAtWOx+kpcODS\nvcu8vUKeQ+JIxIbSfd+5Q4Ge7a6oCqjyXCyrubQHSiSlIHAlBVJHWHSYYlcc\nzAxOzj8TSZGodLvD8jgsD+mwJGr+Lz9jNvrFx9VTa3V3CQWARJGywr8NAGML\nXJ6ZgMT8BNPcvGUDqkx9HgRetSH1gSmX5+ABdyl2o/QcCO+WBNGDGrEtjzZr\nNdieTYSc8UJ+hHx7/PQsgp1u5AQ+QHRqIYFTOP+dwIA/7rJMHHnySesWi3Nx\nh6v4lPEZx3QxBKBttv+N4UgNp+/jiMqiENqrtDHMvfB0zoI2UsZbJw8LgPkV\nxF5KQB7KmEwnX+NXdS1MlMYbFCNAWznqv8SN2XBGXW3pTPnNgMfbsZefqqRT\n8WzQ3wg+P2NOhRrKLHxJlFweR9cvcW5SseZ/5UmUATa0ESvhRfTz+dBgTj++\nX6LvPGK36pkmMjRq/wWAUdCAFhKP8V1fXauwHnRbUd9ALjz+rKmDZ9S6k4lM\nwdnD37laVSBi54rXd4nCe2r5B70iFy/0K5h4/NB1gF2Yr5kc+6wTqOOY2QKp\nE1GA\r\n=3ymB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"21b21f32a1d9486d957b16061dd5fc113f222b8a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.5","@storybook/router":"6.4.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.5","@storybook/core-events":"6.4.5","@storybook/client-logger":"6.4.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.5_1638519109051_0.6673735766425362","host":"s3://npm-registry-packages"}},"6.4.7":{"name":"@storybook/ui","version":"6.4.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3569a7637b44af7bb935f782593cfbf024e5f7ab","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.7.tgz","fileCount":387,"integrity":"sha512-cwEstNRKn4MZPEImQY4fkTR7U72HzWLkR9s36iuP3K3bRw8TvkmFHSkBOZah4b3i3rfhwTa3Tb01vDXX0rF0jQ==","signatures":[{"sig":"MEUCIG67Bxjv7Yk6beZsj3otI1L+lT9kkEgNo6zKe/j4WWIzAiEA2KHZGtY/hs96ejEj8ljsIBWO41xnYQnASShy8r86/Fc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqjfWCRA9TVsSAnZWagAAhdUP/ist33iw8HCZXq3rDe1D\nHQ6mbFrHsLOiGcFRlBfdouJ+CO2KQA5pcOAYarAOpYU3j0/KDL/bxtrF11Mz\nJZwtluBbJHCy5GdJEVbyq9bJF9BYsUG0zUAHncywIf+kBHUXoY+V/bISxGXd\nBRlAr/yCaV/8vm20+d1nzVbZc+m8nDwPZpmE3dTgBK1Po3k6xHOEEB8hxssf\n6P66kSvusq35KL3tEP5Kg1vo+rAzni5vkx91VUDFK2l+/Rn4bWS+EHeOpMhu\nssiBDO2GXxm9jq2bXl57F2rL/z4zwB+B9OIoApDdhnINAWGO4VlUT6OxRi07\nliCsxcLfdVBwZeXDw8meqqqrxjuJ6z/uteWF9vF4YoUsChjBWgw/k+HErEWC\n+BeaY0DQkzLWYM14VTxD3I2OsbaGOSKbMapT5sHENB6XGtOwDOnO+Jvo67LW\n5oU76aMP9oh/Qt6o2/UPM4dAESmb/QmKR6ZOONPTgPQ8LD3ijZswO0guA/pc\nVFKc5Ey9Cl5I1S+6YK8nYCotroVBiHvd1VgnjZyJcnhH8R9xvCLx+A5Yi9SD\n0biN0YbqWcvWIvjCG3hwo5WiNs/bcsLxWdNyGT4TsSQqwk9LjZV1bgiSnv8d\nnHPG56PUXQmLVqOqC7JJ6lnuc3XYRUGVZD4tVztBTK66ZS5lMiEoG9ytK9T8\n9Cbq\r\n=Lyep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ebad5c8ec7e35a292f4d867b709f031a0dc0a8ea","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.7","@storybook/router":"6.4.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.7","@storybook/core-events":"6.4.7","@storybook/client-logger":"6.4.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.7_1638545366168_0.6953705961222012","host":"s3://npm-registry-packages"}},"6.4.8":{"name":"@storybook/ui","version":"6.4.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"82843bfd17a2e92f855ae94edde48b64fcce0fd1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.8.tgz","fileCount":387,"integrity":"sha512-vB9lrT55QEiEcBm8CXeV0uue5C2j72XKZh2ZJM4o0v2b82pCe6pj/mdIoCbaOeZkOvlPjKDvPUAzjbzotkJjNA==","signatures":[{"sig":"MEQCICN3CagBxSLMHYyxK5zCy0y0+JyVHPqnclo8c6DuEyT7AiBAXOR6ZIexMA95E5ON2lB6ckFRtofQqzX9U+pV4Sq1Qg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhra0/CRA9TVsSAnZWagAAI0YP+QFBuZsUbR4ONE5Tgp2k\nhE762VBQdXTJmk8BXubUqkmEVZykbRvMRKudbERvStF1+R7WbGIigpkoInmy\nqD5tbua0AiE/C9rrcOu2SLeUrIxVWcHTqRWom16GGdrGXUDsvbRtHR2+2eH4\nsKsyi8+HTV5A7rgqaXXW/lNHb4/tA0fgRPWFmniMwuiwssFBVrJYgBTYNNfw\nbJ0YutlZMazxXiOLvwhjQunGttyq0pbGYI2Ev2IlllAHR17DmwTO7r/v6R8l\nqLV+MMrKlwb2anIpDQBN/LDzHsCvVLHXjnKOuYOzxAyrJif0WXfKaO2R+4M7\nladtky69eJzyAmJPO8m3hE7jULwZ67YYBeIKdQ/rwfMpkzmppvtUx+5qURGk\nLphRoBGWcthE+9z4P1V4+oSb5DeQn5jNW0XqlzmleeGz5VAWxHlGE1OTxzbv\nJwGqIQjIOyApaRZpubAqgJ3DJt9G4ExLQ9g50w/CI/ldLGVCiDyabn7qaH/z\na32igYWP/7QOBEWB2HJo+ZGKWR7THXkQp3zYZ24GQAQljESWwyXg+CT3fG8u\n44LvgjKZgiitXFjOfGR7u5vBAW8InZOHzgMshOvVBWVBMy7/BaRZdcvgCokc\nSly1tKS+t4fEgR1GWOaUWbpgF/9ZQ3jUC2+sPbm0aIqL8fJ68FO2+KVwVpeD\nqT7E\r\n=zLe+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d6b59f78a528a5c7922e71d28b583dd31ad67e7d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.8","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.8","@storybook/router":"6.4.8","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.8","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.8","@storybook/core-events":"6.4.8","@storybook/client-logger":"6.4.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.8_1638772031743_0.09349635799560563","host":"s3://npm-registry-packages"}},"6.4.9":{"name":"@storybook/ui","version":"6.4.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c01413ca919ede20f84d19e556bf93dd2e7c5110","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.9.tgz","fileCount":387,"integrity":"sha512-lJbsaMTH4SyhqUTmt+msSYI6fKSSfOnrzZVu6bQ73+MfRyGKh1ki2Nyhh+w8BiGEIOz02WlEpZC0y11FfgEgXw==","signatures":[{"sig":"MEYCIQD37clxB/HxvuuguUMxaBVke2wauQQ34wIo0mRyeYqY9gIhAIwalGJx1/ioL/GPSlucFR1WVVIuVcjMPtmwQ3N155OD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsWemCRA9TVsSAnZWagAAI+wP/034a6NGO3CyE9tYIXpZ\n10LRkqDwnnT2sbMe1+Y5bC4AOsbfU3EC9tQmYPPilAum8NbA5IyMI9K182hw\njcyraOM07FClY6qEDL+PjRdgRDU74U8OxBNSCP8yBkY7sdsFlqJpWAtYhRkz\nK96ag/4yIPlipI4aYMz8AjJhtMdvA/IN6KRxsd9ieT+OowdtDOkZFjuNkP+Z\npYZgRSDwh3vF+o9Z7AHRpdfCVa9Xf4EIHM51/0IalMByfWKhlib0wwekOYx+\ncFLQWA0hj2HwodKFaD1deEn8keConodiS0bfpUYh9AH5OF5BW+unt0vTAxlp\nmGaMsPa9ZD2wduZEGfbFoLWz1EvgNKetyL4c5/eREggr8b8rJIfb4g2MJc9t\nQlkN5J4qIw3uI1u7Qjmg53VDFR0HSLcpfr+hsXAYSGYOdGwaWTdXLQl6lFsW\nAOasihtrUojk38H8VAutjxpGQSKeKeVxXb2nFYWtua9TyPEnYqGkoC8Je8PV\niCtw/H3gZBbFv/8cMyzOd1jKe1GIkp4PDrvg6EDTxEx3Bs+tC1LNLwbZnywP\n8QDLcR4HDWlguIkMwW3u+vo6OVIohBUKOcntvC6dg0Sem8cW91ABKPzosfRN\nc27pbszgQR8oBDfcQzb/+xSoQ+4A5qW8QQ1frSRQUpDotOZshvj1P1lKplte\nAynM\r\n=0oY0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7d354c89322080b241454eff2cd3adf9c11306cd","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.9","@storybook/router":"6.4.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.9","@storybook/core-events":"6.4.9","@storybook/client-logger":"6.4.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.9_1639016358190_0.34850364124111977","host":"s3://npm-registry-packages"}},"6.5.0-alpha.2":{"name":"@storybook/ui","version":"6.5.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d0875d1e984f571112520b25b1ecceed07fbf521","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.2.tgz","fileCount":387,"integrity":"sha512-9aaqdWDlgF2+MSnqI7ICg49hFNMHYM8ufXhZZu8atfUKyjIZ5LkVFxK+KbZjZGOohpna2Nj537WHTC+202ig4g==","signatures":[{"sig":"MEYCIQDK/kIMbPc9KykaXVaIo2qh9lzqL8oNYgQTj93+EqOCtAIhANCNMB3zjfbrZsqSdr5xla/RpytmSacZdHPwKK3h8tic","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsW0LCRA9TVsSAnZWagAALLMP/1ZUcAMsFP38AUww9soh\nhh0G3BVFOIo4pAi1glVbvy4cm9lhrFo1h14h9KSt2gQcPfTrvBBN6hUjY48r\n5h6O2qeHdJy/vwyNdHsCn9t4CUFwH2wVM8Ar0r6nePRLw6OFRXDucWpaf0VU\nk7dRcE0waYOb+IUONN2heYiE2jQ6hIGB14lb/T+voOYd2QDFpKvDVH+kRfr3\nzCGNFUUZVfvu45DzUsCCzOFYBmnFKz6boxMHOFKJWAM8KDQoALp4iXSxmzl5\nKfISyrZRVr+rnAEnhEJuqnowLFNlanall3t+qdmDMkkOFZxqKAKhE0I0nWM/\nz+/J1fJJ5BigRpUgrF//JRiPikSoXMiDas/bXAcVp9//1KX8FQ7dWobMOulI\nOXYLxqs0rI1vMdyYERN2PoNhQsXvH+OLpU7wA2scd2A4CYES+FKJQh1wfXv1\nV0/HK4fKLBGnuVumDGlOg4F6Q9Yr9XqqG+MjJfp78LdTbC4stATVwjShUzz3\n9mZIrDRgUNmWiGXaFUA2mgrdgDIb0NehV0Fl7tE776y1OGm160bC4ZfS/uS+\nNiffDfsCBmzjNvbt1GUyl9zdazBnLxJJbOp2DA/nxQbzhCWupWdaZrgx2ELJ\ncazQG9mzRe9jcBdNemKRXD+lE5J7YlAd8LCtIrJ5IPDY1862eEG75kX1EPjZ\nS/ca\r\n=UBxW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ca9d89393f36d156e34819fe120eb7e6819245f4","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.5.0-alpha.2","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.2","@storybook/router":"6.5.0-alpha.2","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.2","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.2","@storybook/core-events":"6.5.0-alpha.2","@storybook/client-logger":"6.5.0-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.2_1639017739431_0.3380557567203324","host":"s3://npm-registry-packages"}},"6.5.0-alpha.3":{"name":"@storybook/ui","version":"6.5.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84b714fd4a44307f1d0b04a369d36af7e54d3d1f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.3.tgz","fileCount":387,"integrity":"sha512-qLlWfwWshY9EHAL6W5rYXEjcPuTeJ7Gs0w51bWypcCwMZcDfPqBbQwDa80MM67ArZLgNF9Twqw3rLMK+5jtlSA==","signatures":[{"sig":"MEUCIEt64AVIVIxmlcPG4HKxlcZvLmpHoNf3StDdsB/NHlKxAiEAjWrOKR0NzETy25VeoDlo5eU9msSi5ol3Kn7ZgWRjiA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsaMtCRA9TVsSAnZWagAAfHYP/2yXQrjlUGGtd1k0qMIW\nWLEBT0X9BhgJR6b0mcl+530VkHFs+lBbC3W2SSr4oCST1U3ZHyAZGkafy2jx\nDsKBD1oS0zc0VKNQby2C/bVTsMf0+6y0NKZbnUW50tsmUQey37kXg5/8o79T\nRrGYc5o6SAvl8zg13VEy1kweyWsQ4Z/kSsVMnShHM+stHUwhJcLpOltco9Sz\nHm1irXpuTB+7Oog5hFQMsI4Dkvel54svbz0gvQD42D16oXvicyarbzl7bU0p\nVIplJhI5fifjsaADh8bLLHJBN9FZQnyW2jCg2GyhGInDBSGORac7qv2UkN7a\nNkS77Rqt0GGu5Y5MEsdC2SxxOd25FMyX7xEUqubOcs8uiaeLvft17LwDqgSX\nz53ab/CXJU/wnElUpiyrT5c+An+TIKLXRQws5d5HBjzkR9d7UDPxtOU1Zqok\nUHEo3luPPCSd5FhPXqeBI5C8f0zpjQwHT5I4N/mBlCCT8+N92ai1t7K0fQvW\neP8w1wr1H53JmfPkCwpf99BWly4beMsOk5VJeTQ1hoF+9BBaeq5rAt+pmwvn\nMihb0tDTXzUrXKitXUAvdf42V3fZ6bmiqScba3uLbU2D6tHjBQ0cFBJpRgE7\nsQzWxiiY5tCKhSSBSoqiwx87C69y2IpU+o8LqlhyarrB+EsDxaTuHFzL2+yn\n5MsD\r\n=mnNE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4d971f7d493ecb388017a150a9943e87c7770d98","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.5.0-alpha.3","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.3","@storybook/router":"6.5.0-alpha.3","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.3","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.3","@storybook/core-events":"6.5.0-alpha.3","@storybook/client-logger":"6.5.0-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.3_1639031597097_0.6079781960243174","host":"s3://npm-registry-packages"}},"6.5.0-alpha.4":{"name":"@storybook/ui","version":"6.5.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2b7fcc4c43d113b310fe2afca806458718f1a55f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.4.tgz","fileCount":387,"integrity":"sha512-EjCrHQrV7VMk0FgMMmZF2B17fytM2LMMQDgNTOkBb9hkrj2AbxsxHxexzeuC0A4tCXI1dDGnwqao+tz0T0Cwdw==","signatures":[{"sig":"MEYCIQDq0zYFVYZ24Avk93FGovcfxtjaabwyIARO4TWGu/4/oAIhAOoH28p9EEFm65P9gglSIlwb73ucjpyazMI1nt6ih9vl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvWCWCRA9TVsSAnZWagAABfUP/i/h/i1xFoCxwKcmXyEj\n5dWOrjwJY6Z3VfytJ1eqr8eO1I0nSBv53iY4sZENqB1LlHHw/2hnyY/rxy8g\npUoMqw1vksKS633+jq7Hs11qdgE6jXoCwCUtFM6xFL+FeHwlhk7NQU5q1Di6\n5bvHpH+ix3hsee9TXT22TXVPgZT3q5i+XNSK8aaBTw7rw48r9+hxSVQVzRO/\ntChG2MDexdUBLd/JZ3IZJrBQGYwtwKvSo2D6v8U3w7dBXCOxj4a0VQ1xDV56\n75BTtanD55/MhDFzr1smFu0tp6/FuySOFTt2RqTxmnibUm5WytQa4JpyKdj0\n7Q+y1Gaqab27EAZ5k0xT4gd3UW4AzEqnmiOeqnGFNmL8xno5JAYaJBvM63tw\nRq2Kn3BFGGcDsLSMI7ROeMyYOgjUcveUp4RShJERisXidEGoQllN6J42neqv\njnIHlOQEy9MTwDeLBnPg1UNRNEZfRmnpLPgHxxX1/n1P9Y6ZZ06an3hXa536\nZw7hZ35C8Qhl4ZUQEppnUvT7qwRQqNx1W92qS7K7bdvzG55UkV8dZcXyvuf1\n3diEs3ciqPohf9B1/baeMWprdG8cDh+JGGzdnoewtu4DID2V7rFSat3JNI0C\n/89/Dy5iUoU1e0RmFzFtKEui3FsI0Q9r94IIJ487Xd8EF12eAR0M/y8gjio5\nRH6u\r\n=7hW5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9a73995d6a5cfa36c5a5ce60cb33259ff40e2fe6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.4","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.4","@storybook/router":"6.5.0-alpha.4","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.4","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.4","@storybook/core-events":"6.5.0-alpha.4","@storybook/client-logger":"6.5.0-alpha.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.4_1639800981831_0.44670950003968346","host":"s3://npm-registry-packages"}},"6.5.0-alpha.5":{"name":"@storybook/ui","version":"6.5.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6c76ea184cf3ce4cdfbebfd7e33ff80628369464","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.5.tgz","fileCount":387,"integrity":"sha512-lLqNZJZmKDKoAzzdB1Lo8gSCFYa/Cc1NyenAmQU56HCn2H3UISuWUdIgyctXv4LmXtHsNQfkEEDYcDbSN4bpRA==","signatures":[{"sig":"MEYCIQCGtdLVntrw8hgbyAqzLEw/U2Klqp8ojknom/piJAdKqwIhAK/LGbRmHddaM1nbKgt4WND2o3ORnSLRmOmxj0OzK7fB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxDobCRA9TVsSAnZWagAAxgQP/iZrpqaSNgwWTRzFocGl\nvZF3Kw4DP6c9kVbz8bV7Yom79IeDMiHjIBejBnYbK2O4o38W4jeMHjvY68xw\nSeiD+vno9pbp/dglQMaFY6PL4Y8rNlet1rIGboqfAV9hS9TPbw333bQ6EyxW\ng5P/F85JzOvPbPcW2FT8tQ9vRuKn8eox/yyUKfnFJFKZ7dCZw4JF5+BYPSc0\nx/3gGKFtlf5BOR5qeQwLZxZDiLNTbagmymxAGTVH9fnJJURamh5LtLdIc+yW\nAcKS/Q0rIFcDEg0mG7QSf+Se/HE4OXoZ1nIdN+w8SEEm6g3227/JsNcF0SRX\nukHnbT3y2S7iZ7lCbdgjX27BZOGEbP8N8PvySg5UwOilnWnMcMj8fBNuNMCQ\ne9QfTekbPvs+LoKSAjDpeniISMXowh7Pa45KIE1/Ir661GnuiWVaRKao9HXm\nxb/izmgkQACi+lw0nkDGtmlViqDiNgq6apRdUu2fcaMsCpNI181oIwwgoAeG\nIEm6p+PC4n4pCbyauqZD8ydVJlLYP56CczZ6uvvHw6dLWpZM7anjxokkyFVV\nz+QCjnoHzOKR8q0BlxMVMQHlcgSBFdyA+hBl99uGXUJfDlMfrst6PgcpLGPi\nn/UtHDs2ZxY6qWAKPVhzkrQJSzb/J5Xxb5K012rCZSNC7w4zUr4qwJBglEfl\niDp8\r\n=HA0D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"df18f2ad3794d61c59c6458f66f73635502b8963","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.5","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.5","@storybook/router":"6.5.0-alpha.5","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.5","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.5","@storybook/core-events":"6.5.0-alpha.5","@storybook/client-logger":"6.5.0-alpha.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.5_1640249883308_0.6311687948885338","host":"s3://npm-registry-packages"}},"6.5.0-alpha.6":{"name":"@storybook/ui","version":"6.5.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"560d3810d15f4c9c9475c71333c84356970a0524","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.6.tgz","fileCount":387,"integrity":"sha512-Ma/QYscS5E2EGO7KDXo4BR873nwjdtL7LHfFOtzbFKubGlXy85MAQmKT39mht7y/nhooIEGWXjQmxH8Os0ZlDg==","signatures":[{"sig":"MEUCIHPzt/Jj1EW9KX/RXbhmRP0dXSw7gLH3+r/q3c42zZAlAiEA43h+8UBPDG+2d5WgqktYcLioRvovffDaGQcLtXlw3Ws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0x6sCRA9TVsSAnZWagAAYdcP/RwzCCjuwS3gtpJowRrj\nISovTI1GS6Ut9wOuXSwRg2iGOPhAIn0ejjItMSduuuR++LqYl4+WZhUlrjHX\nvrTpwT4O13YgtLt63I+0PFrhoI5ISt+oE1NBNnxF7e2F5lGcmJry0DKfWoIA\nWOidwMxmQwCmrH0rUjVqsq3pztoD/lAu6kSJomLxFq6hrdHt0PULjyFYjqKs\nHsfQr8DtdJY6XTqa1TAQ976df/eL1s+gz+bqLXOYp+WUPyiajY6WW6xaqHq7\n+pf09UkFaq7E4cjeWJaU6xvlpdioBrZhxTgpMTOMVi6/GGffpiU/1a8lxA1a\nEDIBau04wxzJyXKLjxJhT/fDXXUdrHviSUIrgeDWzZWW0XfrD2BiHJz3Zgpq\nG1GpcQ0jKBlB/FVsDDdVEQJvm02Ju2PqkW9q8OD9nqTTfYk21ApsRJo2F/OL\nPhNpim427711QT2oIY/blyAzWmcFgXauagElD/wglyUHTSBp+IC4QMk8PYAT\nfGANHPjNgED9Hpwx6pgaPjQZsYqFZOkIgxgsnUc8mpK6iTOIY5Ylo2/Mout1\nylU9o+JJ/6Gk6XOp3MDaQd/COqohrdUHg4VtQpdwoDvjiAAxwLsnsypTEJmU\nlkQPiKAbUr4z6f5scijmIJdITJzFSu3AiQAIWJxec5puavPd/hUhWsrjAixM\nMPvJ\r\n=5vuR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f2ec6752a3e940f99ead3ab721b513e5d1b76e17","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.6","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.6","@storybook/router":"6.5.0-alpha.6","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.6","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.6","@storybook/core-events":"6.5.0-alpha.6","@storybook/client-logger":"6.5.0-alpha.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.6_1641225900172_0.766191062486312","host":"s3://npm-registry-packages"}},"6.5.0-alpha.7":{"name":"@storybook/ui","version":"6.5.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a330f858d0499ae856b2e21ecc22fc2028e11805","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.7.tgz","fileCount":387,"integrity":"sha512-0pwK0VFrTLbSMdcIQ19MQFCVdTQ3VSHIsKGC6PjjVRmTcIFYWPI5HwYExJOkJHenCPYLyyPHvCf1Mvg0BSYS9A==","signatures":[{"sig":"MEUCIQCn27mFqG/J3NToxyYAdiG0cICSA+iXhaEvIv0Zv3ajQAIgTOfYD2Iwrq2iMjYKUUlbETDkdHLuzdVzpx3kJHNH+nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1DvYCRA9TVsSAnZWagAAmcIQAKQgeRokUo88BIoGhXm3\npNEqKVJAEMuhVZFXVfOAgUZjbocAasVcDxn2+fAQ6iz+jL54U+SLRtku4uMV\ntu+cscojp4PnhBRrWEcWeEn84dSqx/LE2czoZFMqh0wPYg9F4OUFf0idIE+x\n0YkVp1G4wDlCTJROxnKWgGFMBCaC7nzMyH5YA4rn/1IyvU/OJTJoiLtqRGdW\neGRj53Fr969rSP2y03t5E/kwggCp/r+4EDEAbeK4xLkqR35Vti0X6JZZp8NR\nz/s4ndVMUGykWYj7jjd2PX/mHWnNRBZIu8N7ecrZyJywqvCHmHffvvtSuSyl\nl26nSybEa/LCnxJs2qykrt04BDVJetjsjIlxDvnlJxOlpdZIY5y6uGA7MXnk\nnI1D8PG0FC5TtVkHYBz+M6wsUeytoWgISP5BDV2stITQ+X8jd6n6LeK9Bb0q\ndzzWwwUaJbr+0a33QZ6dc32aV9i7rORXzpbIHfaqG4KD/kmEHH80nCyrXzOh\nNccFZYtkP3adKV4n7M6cCMkfz09IZGNCyol25Lz+7zGD7+Dfddlw1/+dcS5W\nZCm1RQ9eu+Kn6jI5lwSpwxtjy4QeWS6DyDdTNtT8/5Sl10LgjtcxyvyxH2dF\nh4JCfDtMwri33aQ2t2FnpbQDRrHxZw4QySD8Lt6i/hvNiWjQkK8UIiKG+Ckr\nB7qV\r\n=qz3j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"eb1ec353f7fbdf90d67576d93b9a23809d6cc0e6","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.7","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.7","@storybook/router":"6.5.0-alpha.7","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.7","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.7","@storybook/core-events":"6.5.0-alpha.7","@storybook/client-logger":"6.5.0-alpha.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.7_1641298904584_0.9424460830287629","host":"s3://npm-registry-packages"}},"6.5.0-alpha.9":{"name":"@storybook/ui","version":"6.5.0-alpha.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6df63e3c03d05fa0a0c45c95973a316a8aba94a1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.9.tgz","fileCount":387,"integrity":"sha512-rVQ8TKd2OpUrZQ+DFqrGS8P0uYYBzYLTIuxud1jWnBDHDuSho/T54m5cFgE+/gDCyHUrpFtes7KHRdfFejkNIQ==","signatures":[{"sig":"MEYCIQDHkvfD+fpdb8LPHH4uYUlWDbYsaR/6Mut2bU78JNIIyQIhANRxFIt4KIl7ehesyfRIlGiFA5+2vJ2e5CIDaMlanpso","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1dqQCRA9TVsSAnZWagAAZC0QAIDEF5lQ+BUnky+T8Rsi\nq5TUM7LbIAUrUlvzJ9tH2stCX+Lo82TsrygrRLnYLPafklfo9W1nRhiLOgGu\nyW3tYN6GvVvnJ6oYbcK/TrzbeO1i9RA4fh+O0AgSud6ycwP/X0/8IXrPjj+C\nhgZ1tJSGuZV/YR3t3ur5bxqpSPbMizhM6tTze38XPjJQGX6tswE7tgTgNMB/\n99/LviNwL/Z5dfasMYkBApOsWTlcY0rZ25aXUPsrr6BVm224NECPnm2y7KQG\njLKC+q1AQmD8Z1egAuTWRPmtVnvs3o3uvgR2RzIIDj9Zmk6qzdDjVmk+eWP1\ncXqxXJGnZAA9XXl9s+ANM+maxX2BhpcqEG+GbSss2tHFQe2yIQ+Gggn88//X\nM/c56+FX2gA4zyDiM58tV1Zn39DWinUmiS1KaWnnVLmVcsiz3R90W7LOQuiF\nLY7NXj7fEOYxeTnh35ZRqYdzZqRkqEOZ/E5mbBXU/YNOsHfus7nTvRO84DD/\nNVgR6tFcI8c8u/yQ864DfVvuY1YHMnuAWw1APHzAdgdENVnBvAYYg9m1DZko\nVVN9EYM8d+Q+J300eKjmT9drH4jyH0IaHPCMZPRlRO4h8WtvUo1hjYcBhtbm\nU4DyXcgcihPRR0Vy20bdTJU+ovXwEk7JAuaMAlfnbIaO52OjOsZP05PuUJlp\nq8zB\r\n=vfqH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fb124ab94e8b5ed0920bc7954e6f6a70bf79c37a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.9","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.9","@storybook/router":"6.5.0-alpha.9","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.9","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.9","@storybook/core-events":"6.5.0-alpha.9","@storybook/client-logger":"6.5.0-alpha.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.9_1641405072670_0.24293546081698625","host":"s3://npm-registry-packages"}},"6.5.0-alpha.10":{"name":"@storybook/ui","version":"6.5.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dbc86fe49272d0d1a21bc298960ed23dbd3c0659","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.10.tgz","fileCount":387,"integrity":"sha512-dEg2L1exr9MCh0Vlwn7gAS+4fxv+X0B+eHIyqpvLbES0PejuscnSMs98dQKQzipQZK13XCQXZXiBeKY5IWxD0Q==","signatures":[{"sig":"MEUCIHi9Kf9n5lXfm5brg85JQs+ofS18OIP6THTQiAU4BGojAiEAmSbvkPzsAiNwhPL6bnkQz1i7hEBQOjtjv8pDY/hLW5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1wz9CRA9TVsSAnZWagAATtYP/0cCFEd+uefAJuD2/AfF\ns/jUurMu5HXDeVhC09Pq++bC5CZhk5FBvCu2s8+Vhk+wObqeLLcvv+8wg9Lz\n7/hChGBTeBcsr6jpMFFDaNHbACJu8qTBQrPAHaLUoS9U/5oE8PD8Hm0ipUVk\nqxf4teTjIJmIn5TYtD7vGvdtGCnAyEDEijzDpEJhlBmrVJVXWUMmbkV6oYSt\n2aVch1+KuCKLG010Av/W1xD3sa4CUcY9WSV5Gvm1q5cU3mCq/Kg9WnrGIpzi\n3cigRRYh44QoNFE4DFXqD/6KepFUTSMZnC2G/We9XuEjG55UtCrdxjxZwB3d\niHDPtC2MKE4m0ai7NhX1Wo36OO+2AFhIq79mW56nUkOqrsscSqKPnEMwH41j\nomayJvLxS9lfXI5k4lgcvGJMn9ezC5+C3/dmLCX63lUvlxG4BWkFrK17T3Td\n4rJgA0izGFbgTgnBC/K2d2RSu8BG0W0WSKTZe76SIaaJGCn8g85DVmwNKqdG\npNEEdjCldicFzCXNbt69AIvrLtahxCo7ebFgNNwBHgYKNqNkal9jrWFmj03h\nbA1rLSddCTaeHR5r+uClKx7ijmNuAcJSVeTbRWrV6tUCZRPIoSyAzSRKjIAh\nGZ6QbpenNYaVFFU1vs3hhbloP23MMJAij3CSPjj18IZeaLLxH3LqRHTNSWAD\nu/WL\r\n=RaOO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9f7d260e82218d8bbf4fedda39e34d2e9d9813a3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.10","@storybook/router":"6.5.0-alpha.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.10","@storybook/core-events":"6.5.0-alpha.10","@storybook/client-logger":"6.5.0-alpha.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.10_1641483516991_0.38348036972395394","host":"s3://npm-registry-packages"}},"6.5.0-alpha.11":{"name":"@storybook/ui","version":"6.5.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"79972b0d815ba0240b24fd481f27967559e0833b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.11.tgz","fileCount":387,"integrity":"sha512-th6Ic3cm3E7ue45LBIhC7sW3D3G0G89I5/XNIocRxdhOQ6QhXeJ98+Ues2bZLLvlsLDJqrTr/tJAG2SulM8gUA==","signatures":[{"sig":"MEYCIQCZBHzAqqcRxQh0/QpV8mPgxbshD3S6Sy2nBSMoLW5DRAIhANVgRBjyPv0RjhNYY7O7ypFCfSHycNeee2G1bKfuOCcT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UmXCRA9TVsSAnZWagAAcyYP/jOHmdAhpvBSpCDK3z+g\nc6jHCnqd7JNq+Xtd8370GQH87IBsgIMbVqG1T6AtxPvhBz0Ck+mGRsz2uSN2\nyNe9bP44L+WfqD+hEe2psYWyRcKAPXna3awjquZ5lBSm/LUtMhCqYjV9TkL0\nZSGMrzo2RuRWnRy2At8AIMbp2IAFI7rnDVOpyualR+CqBihkn/zv3Y+F8zKL\nDsXW8hDT/MxGofa+9wgM5zfglZLyJuOCcF0fp56WWJkcnn9O7i5f0ogvN+mW\ntNfYPbrJ5uHEL5c0gPxCIPL7z4Ljf2fzF6QD+0Oy/P1Bb/S/qwCRZCpuA93M\nhIgmlo8N0a55fCxnDPqhgbrqm6UgPdQV0n2qmzB1W6y8i6u9wD8ZEiaD79IB\n3ZgVoMABpOGjYNpwJvCq8H6iaHN2zxo3Y35FqzESylpv1NpZSpdVTBKyEyv6\nezDUfM4lRnbre5C5w+KpeyoaqyftsIA1gGCKpvnfxfro1CYM40vnuVUZ9YkD\ny8ql8jkfEllCIuWY4KZLtOk71aoFx1Ny6/+ujOLUfkwsdHqEcff3m9ufll39\n11sVpF+PQjQVToCayAdnAyA+ZbmPjludzM6q9ZhzrPLIl0oUhhSD2W8Jql/+\naSkI1wdHUVK28jTkNaWmiJKNiDEDW+4/piOdpWNmf6AGlRBH5sJ/zxFb6ZJx\ntTEJ\r\n=Oo1F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c79e86424b1828328e12ad66e84f73eb58d70c09","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.11","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.11","@storybook/router":"6.5.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.11","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.11","@storybook/core-events":"6.5.0-alpha.11","@storybook/client-logger":"6.5.0-alpha.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.11_1641630103382_0.3213560305523757","host":"s3://npm-registry-packages"}},"6.5.0-alpha.12":{"name":"@storybook/ui","version":"6.5.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1bdd1436fc329be4ddb0965d4e1e6afb6c267856","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.12.tgz","fileCount":387,"integrity":"sha512-BB7blDukBw30sxRCT4EMBv9nJWNqAe4v04C81HU7MxmnUvnl7O+wfzgSy3zWTHjCHc1ql5Bi8J/qRh6zQ+miAw==","signatures":[{"sig":"MEUCIHNmOivvocVLeyxvyUgBvJMJvSYsmZdAEmOzEaKQc9lRAiEAwip3XbzY9l+593HCxBsndsAiQ7zkcrZLRSZb52jNQOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh248LCRA9TVsSAnZWagAApTEP/iecNshWpp/+zuNb/SE8\n4vS4bn5eMod1fLkyAnrMVsNrDDP66TSqxlt5l4lvTgXRUe0Daf63jDteADir\nRKFFSI5Vb/kdjwUGst19AIHC8BmMT61LuJEuDeTHSvVfnAcSpgrdGC0fTFQI\n51gIee0QO4S4CBydk+l0mm4rvTB8axXkuzxobrPK4OOeFc27QrnCiRtVzK6x\nA8zDLMejOyKQa0Jdyiwv4QYYeXhKN4SMlboj9POyUuKjyyxm2EvOwr0TGOd0\nsSxf38VTBs51T+Wyf2gkygvHLrKBVAuzFmC1QuoejVvXUPfhavllQGtOBMul\nUk5BW6ruIyyXbCFPHpNJ0Zbny0O01WL0UYC9nECj4n5tCdtsXTlzJud279QZ\n8T/Q9lQuHMuRsg7u9f9KV6bdTN2OedRRhOQxm70NPX9ymy9a2xmK2rY12nL5\n7hfFUdJtS+xYg5ZFFxA/hCoh1ZwummupAzob3+SLB0sVOhUJqkb21fO3zLnH\nZSffBX8WO6J31nZ8SxFBx3p0wA8VbU5oCVP/kBxIQigU8OwU7wAJDRtKUtFp\ntkQlMTBWT1rzlyvoWkBszrHcIwjqDqKkWXM5i/s4p06cw1NsKeOm/kSmM3iM\n8jbal50K5mcjFCPfRynDUlhIlmvjFpVUupABB1t8ElpBvzlCV2Kyc5/1Dgmw\nqy9o\r\n=Zp4J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e1f8050f2461859cd560fc166f2dfe9d5c478a55","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.12","@storybook/router":"6.5.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.12","@storybook/core-events":"6.5.0-alpha.12","@storybook/client-logger":"6.5.0-alpha.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.12_1641778955639_0.9684266825445478","host":"s3://npm-registry-packages"}},"6.4.10":{"name":"@storybook/ui","version":"6.4.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"02330d1520ff792222ef224803abe5396e678a3b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.10.tgz","fileCount":387,"integrity":"sha512-11oYYMGg0C/tfVIxI9T/jDBDkrT58TXwOOCfrgqG26CHzMZrO+/TUtrs9vyz2lENe1EODl6QwUhl1Mg0+6puyQ==","signatures":[{"sig":"MEUCIQC587/imDmIZRw2kuq+RtlEtp4yox77dpyqsfVXzYg/eQIgbNTcvAjSQvniTfasO/C2tHzHi/8V+cUF0p10hrYM+xg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh258+CRA9TVsSAnZWagAA9BgQAI6RlMBH0and6DNdLVIU\nn0vB/uowPonsujd0oCqdo3e4NNFOsTgorD2P5ALOlVFeLf9+7NJDy53g4Qn/\nK42hurp0leuuo25G6JvH+rD/mm4KLr+IqsST6dId+2svNODKEPllZXnWWJVc\n4x++oGdlfIjMor2kOEM2W6cqlueGGOGPFbKnqFdSwfZYeKwrtF+xx31SEUxu\nBYhGWahy6t0OWoO8YUWxcshxTtv16jVZkHOGgc0cNBB6AHx3IACXHrukIF/w\nCiQ6sW6f2uAAZC8bWmYcN7GDvfjYmx3ATueGpU8XhjU4kFqRGLHT4qOGHYes\nRgU5o9fh1v2rRpWilnlMx26II3pAB4Mcf0qXaOZIUyK30JNkzVF/5az21ESJ\nOiYQvd8mXLi+GZbvqlH7UpMuAg3b/n/ZRGT4IhSbjx4XWD12y0qKljXA2P7n\nJQJ7W/jjWpkNXK0XA3MOHFcGGLU6Y/Z79NeLfsFU5tMFQ2INcbIRKYbkcIgi\nGujH2doU1Z8aW8MnwBSoBEDSr+DSPYU+t0dDeNaHKqwGcHx8Ugximvh31g3t\nZY2lv89lsgo0UHJH1Si7EAbFElGkr6n1q5tyVNM3lYU+dKsbfwDZKldGWBe/\nYjeAdL6mdq87dRYVKkOdgN6x78PoH9gAi288XJGLiR/3HPK+XcTWohmZePiW\nKR2X\r\n=hhQo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ed6c4a7d9c14d705499c118b0bac33c57de7ebe0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.10","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.10","@storybook/router":"6.4.10","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.10","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.10","@storybook/core-events":"6.4.10","@storybook/client-logger":"6.4.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.10_1641783102220_0.3247567588174003","host":"s3://npm-registry-packages"}},"6.3.13":{"name":"@storybook/ui","version":"6.3.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.3.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7ab11530f61b905dfacf055ec45b6a790bc41cf6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.3.13.tgz","fileCount":382,"integrity":"sha512-DHkAChWJZ+rRBD0jV8GI28E66SgpL1EbsErRzeII+TbiSH4L+vIRLOfMawqyXBlnZiwxw2dko+iw+Ou+/dWOwQ==","signatures":[{"sig":"MEUCIAqxf2zoujWTVa+VjA0Ki0jG7MHwBcaVtafio7T0MvAwAiEAgVQxKuWa0wHOSxAFS3+R6hs/xIqa8mvVFc6Vf8Uwd4E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3543115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh27h6CRA9TVsSAnZWagAAkQsP/0+YEKcrhHvuZ6FuR2XS\ngknVdS+EpjywdxZU7IhgbDvn05Z658ACZlZweBBb0ikhbjSrRy41VJpKclfT\nwNVqvSPVBh1qLfI4baDK3SMfAF/ILw/o7YaVIcf6YTxooHx0DHUp+D+emPCZ\n+HuwthmJ+2FEHpya46inQVuzjLdZasEHwEl/t1l9wAfE/LDLT6LlS824L4Ic\nQGSkzeakWoQ2MI8+eGXBGi5XSDllJdVKqLwScFsI7MxUDENJO3MIEleWU13I\n6ETdaAfLwRtnmBDL0okoCVmykOA2OYBM/XdtiaEqgeYmQ8CQFD5IquwamPFd\n0L4kDSGMCGhktOIawFQUfUsB/SPM9tSKCA3xJKOuNLQ1gQSbcCqJuFwSc1uU\nkIhfBaaK120RjayneBZMJ1abmq4eANGvF2oYCwoPHa+CWEJzfRmqYy/BivU8\nmTtoUoH7YbJUVoXSd0xXG5zHBD6j0SJ58wKcSCgPsuCxIYxA6mKbuBjC5S7i\nyeTBDyoQKAzxYqTfHDTCA8R0VPdH8KfmihLrpjMLR3+XZ+gDO6s+QX+MAoJo\nZCICDZmh/BAQTWrjhzAhz122N0eoYa3O0+GHDghun6m/+MxVKHgDzvqucTDf\nSJ41ymW1fjhUWln4nC8ijkogLz1zNFRKCVb3F5N5up431sxIjzAPScHfRlE8\nI2dj\r\n=a9jf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"bea9abf33d4d260f7d2e204837534dde3ff7792a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.20","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.3.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^6.11.4","react-draggable":"^4.4.3","@storybook/addons":"6.3.13","@storybook/router":"6.3.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.3.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.3.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.3.13","@storybook/core-events":"6.3.13","@types/markdown-to-jsx":"^6.11.3","@storybook/client-logger":"6.3.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^5.6.0","@babel/core":"^7.12.10","babel-loader":"^8.2.2","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.3.13_1641789562563_0.0019473451926581564","host":"s3://npm-registry-packages"}},"6.5.0-alpha.13":{"name":"@storybook/ui","version":"6.5.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"380f3f5de5a23087cdb621e4d19dbd89f2354c14","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.13.tgz","fileCount":387,"integrity":"sha512-/3YaXjrHd66MnieDqXPct405xTx9qTu/hL/fKZj8KimoQ6kUAZNbFuvgtwaEzO6PHOvPjdeBhaW8bxwRvI82fw==","signatures":[{"sig":"MEUCIQCd6b8KW7rB5K0N/MJcV8/D0NRSzYEAW3QI9Uq8jm3RbgIgbML0+21BnwRzq9BcbsbVvdloPGmsyhqGQA8dqwrFh30=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3Gt6CRA9TVsSAnZWagAAQgUP/0oL5Cqjpd4QxIuEyPVf\nysYYrTyViaO9EcqZ34OzUO6rv0y5Wojqm4Q9QGVlavl7KeQwmo4GGpdqHnry\nbmB/dyOIw6EL/mGdvacKmBIckE9MasFSFNe9TrbHn8P4itGI6A4NlEsQ0vkX\n8AU1R1CenyFuf3qS/YN0zs7sML2Ae2CmskplWTRPTLJ+wYfHN67wRaXzY8DC\nRU8e9Ru1yFnxL6aINiHaJynON+Y8I+yOx7mM5JTyBGGbCivtJRqmrDXpHQ8J\nuHt2aJOFwx6ftnkq3babLyedKfX1FFePfQkEraTcVj8Bx0+/EvfmfmfmoI5+\nWTbbdiARAY2tbJVfD9vvLvq5mVJ0pHbVV8u7L7HvmQXWwGm6a1l62GpZL/OT\nDqJ+oct2K5szhrmIGlzTaLSdNj17bSybU3PvBbmkNAs1/JtMpW5JaK80p8bM\npb37k339oZidpVlSEcNffLX1sJMHVNuVkAyHZWI0cfQgsa5fKxerHnqhyVMS\n2ZgZLHyXk4Vqs5MLQ4d+b/OcCaUK9SszW4R58Br0WKffgg3JIdie961OzKN9\n3xnONHsRebECBq9J34aYBa2l39wMwvP82/QBGUPlBdq2Urm8t/4vA2WJNG5d\nmucy8Y2O9SPTl19iQbhfp3bM7dGbxXKRaTaGpZWhhOTv+kWIO1qb34WlwlVR\neFDX\r\n=j0NT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f0ed19fc336498c1512b6d17d1c3aeb7fdbd8105","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.13","@storybook/router":"6.5.0-alpha.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.13","@storybook/core-events":"6.5.0-alpha.13","@storybook/client-logger":"6.5.0-alpha.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.13_1641835385836_0.12374908277287178","host":"s3://npm-registry-packages"}},"6.5.0-alpha.14":{"name":"@storybook/ui","version":"6.5.0-alpha.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.14","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b13a43144fd99d342a3eaf68cbd057d5c1ad7958","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.14.tgz","fileCount":387,"integrity":"sha512-dKmxjzG30QCe+QoTnCuZMj1mIVb/j+nlMHZGU7Vd9qtaR//bBei5bhVP2Tfd6GHl6HmH0C2s/lY5MiW0hXOeHA==","signatures":[{"sig":"MEYCIQDciLsXt7bYa2xRLmvSFug6QucZdQcE60GLOgxQOg0vOwIhAL0lmE/riiBPE/5PTX9D/JdnoFFDUjl+qB6ZVnhdW4T/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3aRvCRA9TVsSAnZWagAAVSsP/jBpC95dHG5K/KokCnkt\nxZhQx1mUMsKJxfkrbPa/Z2+IPfvLlc3hQiY48vjcQDa8BzkiGHerU/A6yW+r\naKuCunZEUbRgChzQGh5Ei1ZVS0qkN9J7NWPeP6fygh/0lymv+haqf51sY3vL\n6gtkLEgapSWxw14wp2hM+WTcxF47AGkzMzE3j/Mnk+rPV6EtdGMXyqQ73XiK\nF29nObECwggIn5mLv1HYlVwFVe6Jg/q8X2VFCccp3qJjaZ0MT2zU7yOa5+qA\nLYS5d5PNQb/7PQMLLGwWwH8nUUcnF+q3+y8kg5bPLN+4F+7uUcFBR/Y/i2bF\n00+NCaJRJQ0z7KHM1+sphxNcbUFboIrN4C4fngGtOZz4JcNCcpdY1r6UWkfs\n7dW1Thd99ugbgZ2vnscTEZwo4r+2//5GU0Uhv9ZCMe5SWcTh4ruhjK+XV8dt\nP32qeJHEz+FJ7q7raO3ccamxML1LjQcT2JQIrfRMMTog0YLSdHHfOkKe+0z2\nFoJSmdzCJOiHzj6GiRl5Xth+Vy02oXvWKrVH9OUxFgsMzhnKXoLXzwcTbRsx\nyNBrwcCaAwOswRqbxRQZdiz5pLrEEU+VLXK3nSYOwZ9Da92kMwa/e9IpGJSE\nCpeKDyQeZ4uOSiyWtmdj6aZRAyqs80QIMH82BQvaqavgUYvSncZheJ0Q9soK\nHVkX\r\n=z0VQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"24b50ac6f5f3f5e03e020144f5e0fb5dfe2e0dbe","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.14","@storybook/router":"6.5.0-alpha.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.14","@storybook/core-events":"6.5.0-alpha.14","@storybook/client-logger":"6.5.0-alpha.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.14_1641915503379_0.43042267776251486","host":"s3://npm-registry-packages"}},"6.4.12":{"name":"@storybook/ui","version":"6.4.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7b460e4128b750d79a39f097356cef5a5f370318","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.12.tgz","fileCount":387,"integrity":"sha512-POkMFc0pTH6u/EiRpZpLCD1iRUektWhuWnF2cQEgP00ZY8rveOS6lfLZSnmrFKfkmVW9OARH4fcnlzNpwu1y6A==","signatures":[{"sig":"MEUCIQCWb4sKfhXX3hohPtChjzBI13QOrHqknln6kqYxoktRsQIgadPneJwoVdacrlURa8Edswia7pHQI5hKyt+Vu4pMYhY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3a3OCRA9TVsSAnZWagAAgrMP/2BiN3NJnYskYm6FFweY\nT1Q1gA+bIkwrOfLwNcEhyi7wUazohuXp1AukkKbU83ql6wf+xmbWgVVE5aCr\nGxIbKugcaNBGHHtvicwMpDPgZQ1CuMGOQ8y/AaAVv1/jPioYmaH/qZr90eoF\nUfvfVCi6k/+8VbGzEzhFW83K/jUtiDXu6JnxHlcKcq1bQW6o2ZVmLh8ybNjM\n9PVXjHNEv0W1IbBkknDc9dYBTpmBrbYNrDYfdgkZXU8SJkYDcvsofZ93Bn/l\nJkiTVqZM0EnKyY6Q0xFFFs3Ah6gjhjRfzsJBbjoJt5vtB5nAaFBeZvDum5JV\n5bewi+QhNU494lrDTbOInLvL0s1w0xT+7aH0W0G2uZUWUW7Mqpb4UJEYGkSZ\n5iCc9FYWmyOuzOF4dPOOHY9I5tmBN2QX90bDRWNm0rCEpS5Yx5XZtWr/noZr\n6gDyBYzoCH+smObg7K8BcMq8GlGvCeoJUOG3nQBex9G365nRSaCa67+V1upO\nnwKaAEW/ef/cBb9ICBVOVBcfui9RBsCwYi602Jx0LEVzXxpkOFcmLikK7NrB\nfQpSmQvtMPrPaks1rqkB67+n2uYGAlVrEb1Fr6ITGbFT0ltr7rl8QrfebOJX\ntqInDpLaMXo8g2la6hpKZsj2V2pbzjz9HP3UWdO2QvzARy8luWZGPaacNse5\nIBbu\r\n=obTO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9ce1a3b24f39b4a3307a1a23531271ce1fc738c2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.12","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.12","@storybook/router":"6.4.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.12","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.12","@storybook/core-events":"6.4.12","@storybook/client-logger":"6.4.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.12_1641917901796_0.2945642704864695","host":"s3://npm-registry-packages"}},"6.5.0-alpha.15":{"name":"@storybook/ui","version":"6.5.0-alpha.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.15","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"62ae9b8c52fcd58be44edf3e3b408834bf6af925","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.15.tgz","fileCount":387,"integrity":"sha512-+mVMNMo09alRuHTk4kr/B21gTVetCWbsSvbiYVoFhEWaENy+6K8zbl2Sr/lDoXud6oGyNKWzDfJMAYW1iYnbuw==","signatures":[{"sig":"MEUCIQDg+HdNG1BPaJ/adQX8QzR93zzqRkiX5HkeLGWB37dUrAIgNa3MXxqTk4YXPMRpbqQnDKEwnj2JtVHMQAvgOLuSgvI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3rT+CRA9TVsSAnZWagAAlxsP/3QSEsyBh2TAko/S3fU+\n1V2Vyy4616xv17UkYLWjaktra+FS/kaa+fsIQZAXhycCuOijjXt74VcoFmta\nWTDwWhqrfjPVFShK9fCsA+VPqG1tViTHiDk1SfgAq9FsrdK9kSfWsrgtSaUi\nceBpuXzpGWGe9OEHq2Z2y3AfiSoIIbJnX6qOnmvqDTKGekJIt2I0WbBSp/2e\nfqdF/6anSGqhGaCxlcz+SVNcgsyzZCpcrXfpRoB+oKnWh6NDweais/iJucFG\nLXxrw7q/b+QB6S/lx4A81pfXov4gDz4Xl58iUziipL3gUXQXWZ/+3wxbfyao\nu5M76j74LgfOIzkRB/1lAn09rWZJxO231z1rdoEqti0tkv73/tpn88K8v3/m\nc3XlxFUrsjxBOiPi87VEudt6McYessxHn3jUQ9WvD/bZPJeIr6qOPn/QX+2L\nWFRm+wQB4Ky3N6z4sl+u8NsDCsGIWhrsGXqJ1sEjaD4xVWaQi8G1flj6IHeu\nmf4ZhwRXbr+/YDUg11WhGiG5oxlh+oIEfH2lCaWszH0Wn2pXDEnp8L3oneeX\nFsEK5gw69IYuisDVb4S4nwy229UMU4mYbGUHNhiiHZ7h7yqKBrNIfp24o9+m\n9Zv92kjtWDGMB/sZkNlc/K/kW5zA97s9hL/0Jvoar5fXPUVY51KdEBp2ZSBn\nixl9\r\n=pQau\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"090804c9eb7638d6c3b39dc6d7610ef186a7642a","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.15","@storybook/router":"6.5.0-alpha.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.15","@storybook/core-events":"6.5.0-alpha.15","@storybook/client-logger":"6.5.0-alpha.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.15_1641985278261_0.38039650265376923","host":"s3://npm-registry-packages"}},"6.5.0-alpha.16":{"name":"@storybook/ui","version":"6.5.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.16","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"83e53ae23fd25d7cb22e406757cd896d6218b9e5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.16.tgz","fileCount":387,"integrity":"sha512-Qj+VyBRYI3xkgZF28v9ZufNfE9hTMmSDdT2jZIKBdocyXR/3APYGPdlusYzKjZpSvolzXJventm3luA7Uoy87w==","signatures":[{"sig":"MEUCIHPWgJJBnr+sjrGe0WailxShzrHJ3vyC7DZPOkdkSkNvAiEA/08KorvBRn+ZvxeE72RyKPwup71L1z5IsOXU9bPgji0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4BKDCRA9TVsSAnZWagAAst0P/RoB0JDtAEgd70Uu9Y4i\nmpVbNhdcsvT4NKLQ94a5rpCWxgQRSTv1c2PwqQT4hVxQeGPaK5izPXANnYWW\nQyaIA7drwxclgixerqsnV+ynEpn2EFKJJ6IP4r2+E0RvJj7zQJZY59ERiaUD\n0ENL5TTvFxaiELwkat17N0pUArMPdUEyUuXZondZgJO3FLNtv65pA7gM7nrF\nWgivd2UfEpUS9cWe/tOf0RnX1oldNM7BJ6CzSRp7X61O6BBAhJ1nGDeSP/53\nmqbRcHX+NGBuPjk1cq7n3EHAXWt55KIS9/DIDOxM6uq6pQ1+J0011abw+/Os\nLOiZIzHpQdYNb2zG7nG9zNkeDJH3tK3FcWYO14LzYW/9y83Kbg/bGr1sQGmh\n9lRSf+c6v5DcjkE5uYul9MbfYu+XsEbtMXlUDc3dWLEyqpPTSThPvvMT8C0o\nLwn5cPSXfSYq+7BVn/QwcxBUh+pLhYEb3m7D5Znfox4e2GKsPgGezBHGhjHE\n+Pew5MVir4z/GIzDqWz1iD3eZud0tDP18P1Xz3bzLhEIYLQw+GHb+/T5UQto\nW+rFYpazPhaVbtXka0QjGy3SNb2bNL8t8kb5pIRC2XoDUMUEv/JcW/80r13C\nQ4m8uEoSf+kk7UK7QnAt+N4ljTZX/nhPEopMnEt5gjbDLn+hA8eFAiVUQo6P\noYvb\r\n=BL28\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6d5a6d7bc603eff573a7b3ed3ce226c7d057ae72","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.16","@storybook/router":"6.5.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.16","@storybook/core-events":"6.5.0-alpha.16","@storybook/client-logger":"6.5.0-alpha.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.16_1642074755464_0.1184848930325717","host":"s3://npm-registry-packages"}},"6.5.0-alpha.17":{"name":"@storybook/ui","version":"6.5.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.17","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"96d15347a79467b0497ecb650beba275c081aa0f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.17.tgz","fileCount":387,"integrity":"sha512-MhXze7YSGo86415P+aDxA3xccpVtdCR3QSZ+cJBizIkwqEooe2Y2hdQPfWimLtLHkT35l9lN5fjw2P1YL7xM+w==","signatures":[{"sig":"MEUCIQD7U6FvzZYO0POrbaIYx+xhmAWaNDGpLkBQY37+f0MZrAIgf1KjYHri3LmSW9GXv6Zw0vjlskDl6LvtPXCPpb/XypA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4WD+CRA9TVsSAnZWagAAJaIQAJEslxG8QBBxyTgGrPgf\n9lFLNoBV4bHYTmP+KKwcJCLdNhhidpgm2kqtLVlvSO+IsakPUKcKPbBYI/Gb\noOpyb9VKqzi2mJnhtXekY7O0mWMsxMzu4QhZl9v+FrkjeGx5f8ZDWmrdLCW+\nXSVkiV7wwk+vLJdolHmgEybEqb+R0FiSzY9QI9p3WzXP7Q33hArBP1NcBz56\n5NiG+7jTgnjrabXQ312ny/VW3J+mZRsfNbEnPkjqXWIXnY8cj/7EMjZd/72q\nbxZBjbsr31pJuNO8uy5XRHd/qXnJKmMOb6UrI0PghMbW/XRd6QQfaT9wq++x\nNj2phKWRdKwAttHnd1ns/y9dXjuZdX53H7H7Easjift7tTx52OtifLRqAGRk\nDfNlWGY2HOP/X75PnGAXTzDfm775I7OJNRCAjVVmFN/mgu5WXypn/SeUTzBd\nqtaS+AA0XXiLcYIJNehavYYjnE0GYUYFbVeiJqUD3ikZr/VMwUMaUFH+07wZ\nsY3mc75DhrLU4UEPMs+L2A/qLx5FO3+NrCUl2qZQXzgMlAyY9z6RwgBsmxE9\nUuGbJ0SvAq2k3Vy8D+aUE2dS4klKcJLzhLOxktwcmYP4p/R83gDTyS6u2i1U\nPHn7N1q5dhqlH9aZctz5PXNVEmsjNB2xNvk4g+6HF8YPdtg4krMA1gSJFuGz\n5rnQ\r\n=x7Ch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"26e445b71ae37aeb97e0207cb5139666e7071c06","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.17","@storybook/router":"6.5.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.17","@storybook/core-events":"6.5.0-alpha.17","@storybook/client-logger":"6.5.0-alpha.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.17_1642160382419_0.2904960893273938","host":"s3://npm-registry-packages"}},"6.4.13":{"name":"@storybook/ui","version":"6.4.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"79e04f988ca537a4c350fe470ad7c14392794b8b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.13.tgz","fileCount":387,"integrity":"sha512-EvpWk2iHjfiWkuMuzYz5fXl4r7S9Q80EtFFVkaBEZfIoKjvIkxppGQ3kz892ZdXzuazzvni2qcb7OJA9S7AgLw==","signatures":[{"sig":"MEUCIQDp5gV7WcuZBKV08yDdd88mL2ELEucd3FKQPJCUooIgMwIgLskfswxKU/T/ibHWejDmCJ9hGU/imhFBhDhJcua1+yA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4km2CRA9TVsSAnZWagAA5xMQAJrWyC3h5uHoYJKtR5OG\nLAzl4cdyAKBhbKgP7HcEXSHNFzBba6E8rGacVNbBubVpA4k5qJY7u2d7jQAO\nJfysRYd4Tm+qi/JidSaF5nhNPRVXpk71NUqqInKAMOYcPT8lFFya91o1GYlw\nzlBraO3hZGJ3kXqLpBFmZl9Aero9P3Qrz0Cc+X6yuW6tPxugxbkzIh59woFk\nXmIkF6TfOK7MUHMp0LbRwaKxBdpBAMLw9rFoXZpX4miz4mn26/gkFGl0G8Qr\n6dhCLG50Z8meOUOsSPW3BMEFsbHmoy48bY/YV1CohY7h7WFw3tZ8EZHiEgun\nDk4PxMPzfulEgCgXYoFWyDG2TkLo+Taw8uJHe8MThdkdLjYFgpB3+P45L2+D\ng+/GcfcE051g5Do8vSu+bQ9+XS9ZnmB91g9VYw6rVIgGk1eWck+zrxyM/Jfb\nfOs9lvI9B/VRaQSfzHt3X+g4tvkd1QRnNkKxDWtREqpGCn0gz69WQgF4o/nH\nfK1tE+aXnFXhHU1TDCPmFxes1w0cSjc9k16Z60y+8yInhJjP1VSIQaf+d9Yl\npVc3/ZLoOLr+8qNFadez4GQfyCO0Xe3UdUJq9avhoOyVk5yCEMjvWSdSxrvG\nftpHyrP5KzcyJV1dMteOmcgnVhHRnqUYVN4/JtdJidkXbfA/NsUXD13dHYJc\n8pbJ\r\n=JZHT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d0c1e8a2f33b515a945d1a1a83560ba7045f6a5e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.13","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.13","@storybook/router":"6.4.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.13","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.13","@storybook/core-events":"6.4.13","@storybook/client-logger":"6.4.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.13_1642219957990_0.8687893213649966","host":"s3://npm-registry-packages"}},"6.5.0-alpha.18":{"name":"@storybook/ui","version":"6.5.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.18","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"290c742126f199a3d7f2dfc82ffd16fdadc0ffbc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.18.tgz","fileCount":387,"integrity":"sha512-pzMspGHf4mglictmGC/AlxsTYkFdTe5u0e1myu7ohkHPGRouBgHOjRPKWgAVJhPgWY+fgO6CKALblDGez+pIZw==","signatures":[{"sig":"MEUCIQCgrPPqZud7BoTcKW5+dYR8pcK+a7vRgFAqhO6I7scXEgIgKjOU4uQof7fK+OdV8mPpVbXWEefh8CMI8IDdNG+vNuk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5EJwCRA9TVsSAnZWagAAN8QP/1/oYgYn85t909t6tHwA\nvt0qLYTGID07glDP/JHlyhJqTdsBNl95N4HubxlhlDwrVTq5ET5l9aZII+lk\nnENBhK/mCT+4Kz3nIKeTV7sz6JS6wGlDPMq8mmc9+Zso9vSPBQeV+x0tF7kU\nsmmqLVbYONUtENoybLUyQGHKH+isIDI+AP0zYHiSr2jBIwTmrD6Ca6DBgtMA\nvUR5CmezH4PwNm6xI0y/r3BINhZHZx4f66o0lzRhrLcibOf8G5dprmfGjPVy\nYAkYEeA6RCfHtFG3N4K1f6fOPy9g0uuTfnsgdUAoLrdq07oT1Gxu3PJfDMUI\nZlDQfwWRlQq3014YeZW1saP+FPuM0OKusLGVvcDaKk+HGXGx7Wlc7F67t34O\npS069PeSo0eqlcJX1/XXMbSuLKRJOPkVddM0tOfuOHgTotULccIBTLbpNh9j\nDTC5cRisPf0cIk/7Hd9/klsardG0KWfxODkXS3+2WmizH4/BC1iV2L11PgY9\nUDAL31TKhh7TS7DP4fqL1p+1WyDmq2vz/a0Qf9aIaFyk5DWvZxcS7OXmhzjD\neeWU9/rsfW7xFoMzauFq7vzC/cKqFCJsRs9yVZjqgUa+rRJrIMaJtmj/hk5v\nmuPAAP9q8d//PXCPzUYg0Y6g2Uvianmq5KqXkdhK3BF5FnnmO8WiJK5hKfSO\n+T9z\r\n=/vF7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3dc5da601fde3d52c3661ee553f641d3b1d7e269","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.18","@storybook/router":"6.5.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.18","@storybook/core-events":"6.5.0-alpha.18","@storybook/client-logger":"6.5.0-alpha.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.18_1642349167837_0.1751680516588594","host":"s3://npm-registry-packages"}},"6.5.0-alpha.19":{"name":"@storybook/ui","version":"6.5.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.19","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7c3299bb2f2a7f46fe8855ef75ed52374840ea09","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.19.tgz","fileCount":387,"integrity":"sha512-8DiqnVQbAntPx8LrowmtPBUO2X2zLj0c2xjJg41r1w6pX2gRFjsnk2h349dYrP9xRabTKYVPBTvCQSQs0gEnQw==","signatures":[{"sig":"MEYCIQCIccLeKGlVMwqhrb1pnvmo3wmHcNNAVaRVtrcnQXvGWQIhAIwdjlQsjSfu4cMahTHh6ExANFb4sS3sMSC7FWaUT/KC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5VqKCRA9TVsSAnZWagAA+TcP+gN8/0ipaMzfzGwEglqH\nBTM1ewNb2TQMvPO/D1impooFhoCD2qNyXTEVKF651D4azsqDavYeaxQV9Emf\n6NK8MLlFUU7Iju8ElZzbtxYPfaH3vGoNPlIw2fpcTe4ShsE38pKUDCsN307o\nVA45D/NMVISPVSzYgHkTJSCPffildvlSnYc3y8+Pdg0QkaoigYsATOH0IWg0\nk2ppUc1itjBbup1nTCA7sKjfX8tIKmSFhG/dSWrTMcIAUqfSptsw1yLBw5+f\neeQXcYic/VpgWuW6XoTJ/E0g0BXu/JVyfm1dXW4SB5JxlUU7idUNQRs07FHe\nSG1figPC0q8DMrZcwTx0jVTaqT68mMeGMln+CeULv2k+QAhdDqwV7fHu//ub\nSHxcE2ZCfkK5s1Z9eit0GCFvfcRLZDUweVh9EUq+9QRAfISWEuOLB3jnRwQm\nRalZAeHaMnNJuGpqXcSW6KEJMogHWrM9adTKixEdRbzW3ONca6w/GNRx+aa0\n+zYjMiXDRyH5I6t6osANHrsROxtPT8q36jfM2akuQVFdJbT8sYH1Ukkgr/A7\nK7SaV7xX5ulQCs4QibQj/OiL3DEUXsZ51GfYlPj8uR6PMMBIF61RXEOwK+7D\n7+C/AmgkSf8Leysul5KxCX2Occ4FdBnGOJGimTIExMIc4NbMS9wgOfIMcLke\nJXGs\r\n=F0gz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ce3592fc323ede3d33939b532ff7400cfdc1efa1","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.19","@storybook/router":"6.5.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.19","@storybook/core-events":"6.5.0-alpha.19","@storybook/client-logger":"6.5.0-alpha.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.19_1642420874436_0.936906878931276","host":"s3://npm-registry-packages"}},"6.5.0-alpha.20":{"name":"@storybook/ui","version":"6.5.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.20","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6e026e8b9f944aa9ec16018500bce8642e4bbdbc","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.20.tgz","fileCount":387,"integrity":"sha512-T308kHKJKFtMruL9gSksyYIjFjZZWle12kViVYEzy2iuMo8Axu3nCNpIXo94FFJFkcCcFBqAiTreTSigEj6WtA==","signatures":[{"sig":"MEYCIQDCkaWk81noapXh7DlnI2u/xEj/5C2nZOtsBBjkBTNYyQIhAPpeiTzAUTGI9szVYQDCDtG+ZG2jr0x24lgS2+5L2yzn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5tzNCRA9TVsSAnZWagAAe7UQAKUaeZzYWHo+4mIBIJju\nEiHRVwT945MO9zjCGTLkDHZ6J/b6cJt5MlRuBdBeXdsNQsTmcJhb3gzAl7SJ\nQHAbzQlrml1NN1ci5PTVre3Yj5VKVanPf1zq8kX+6dphdHvP3gzMz4gLrTtR\n00xlwg0mi36+KWPz3kzkRbyqW1xjXREJI7Hujlzii3i9IaBJtQ9m/LwBA+UY\nyMaPlNPd50gfyJaCUe4sQvpRWhJeZ9CxLRKRyu7q/+iOG8gUGOcLb4XjMoXj\nYVwmTEHsQ1q6vVo712vhcnHZMlbfww58Vcxh2bqskQnGqgynvI705rRZyUOw\nVs1/4mvtDhrUNYtMEoHUadYBbomiDt1m2jJlFY1lSwuIHjWD8ffBmCHO5seA\njsGJs0eVke/caBGTyJumYluD7Ec1vatsm0GOtS59AqsjVo4oTDislssEtFDg\ns8OD8D8hR0HUk8AfWuiOmaEEC8Cy2uz++ysGPPVUAmo08qEn9GNZurEhbtsM\nI2bYaxSLPrxXOVOl7dyR3jBBMC+iXD8wW28idjrK437IUvBPd21ADuhcYt26\nxQtmahpDyzR/W/qWUbF1xDdiKjECPsj43+4sHqMNDkqADRTRTIEGljxGKc61\nc1V+vPZmDN0eXNO6H+WvDdca3OU2gX1vD+GP7CFM4X8MySfFufkIhl6YaXRx\nlCTq\r\n=/fXC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8b9f966f4378d540c767bdbeb1840f910ebc3375","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.20","@storybook/router":"6.5.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.20","@storybook/core-events":"6.5.0-alpha.20","@storybook/client-logger":"6.5.0-alpha.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.20_1642519757088_0.6355716665821824","host":"s3://npm-registry-packages"}},"6.5.0-alpha.21":{"name":"@storybook/ui","version":"6.5.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.21","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"df9bb389f2be2a667f7b74497e9c3122c51739f7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.21.tgz","fileCount":387,"integrity":"sha512-hpzTtrN7C0et2TGhdypupzIiOYv6CCN2c0LH7uLUuXjiQpj+eVw7K9lZeV9cqEMemjly00AGXqzdOB++eJ3WFg==","signatures":[{"sig":"MEUCIFCRJGBiQIqRMeHDHSNyRKHy8kKeGtMkOW3WWfABIFTWAiEAzrFYGaK9gOP/HYusEbZYFgumCro3eh/XpyETxVdlXGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5uG9CRA9TVsSAnZWagAADJkP/3WfK+CnXaWAEtCGeZSx\ndRaza30jmd2sxjJEauetq9ZU578Qdr7ecFabFGCFjmUqsuKRhzxkcGhF4LS9\n9BO3Q/0yrG9nraIcyKzKylM2DDjEVJrBu3Nc1Z9fExxgzwIoA9Qd73CPbQIX\nUKa+WM6LiMbO1KPoC6nxOqn2uxYK1YZQIAQJ+0tAAqLtDy1PxO5zQtiVqUS7\nIQE8Ni6HeN8R202W1uOXOpRcfBR7b7kDdL2P2UkJCI3QbQKJJZWqcIDPb0Fy\nWhn+4NS53hvgw7dYSfOLCkNARbmK4p32dRJc0YanrXNvZ0OwA23hOSeEtqNm\nl5o0S+w9Szr46w6QN4eMiSZ9fqpiFRnUJuv4qKDYC+YBktb0YfH3WBbE7+6G\nSKXX/lNXu5HKBMukThfyiMylvyhTeWy6u8viZ0v6Q4DOnz0fyGuraq1ywnA1\n8GsPRJMNe2fir3KdxO+/b62Sa67kMNG04UQ1YEnWVRhCkGe4/5eI3TngNyod\n2u/0hc69LCntkfpwfy9LfsRRl4wIwHvWuRDi1cP453tXSXYiBRNG//ywuZlW\nOh+f3BorXFiDIw6MsMq/BG5MmJG/Kt8MbRoAFXEcBTlxRNZ1Q3zojNHbpfjU\nh6NztfRWCRbznmK9iF1JWDQZ5sntAxUe9etr8GxESkdg8IM/BU1EkbRJMIxa\nC2k0\r\n=kJV3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fc1a84084556d61fea8bcaa197f7d85f3a9a107d","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.21","@storybook/router":"6.5.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.21","@storybook/core-events":"6.5.0-alpha.21","@storybook/client-logger":"6.5.0-alpha.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.21_1642521021047_0.3132050131815145","host":"s3://npm-registry-packages"}},"6.5.0-alpha.22":{"name":"@storybook/ui","version":"6.5.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.22","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b7720c77697a9a2c35338715aa93d160dc035692","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.22.tgz","fileCount":387,"integrity":"sha512-vAx6TaCE8oUvuvxcFGVRi07iUWggSw21FVmbzonPaeRxxwvfXLrLligKy/8XKvToDwioDbdkQY3gYeRgfvJeew==","signatures":[{"sig":"MEQCIDNJSBfO/whcFLu86hjSTJeckK/T9bcV1dmc6aRgnsQmAiAKa+fIBYbnL7CMPvmH/QC2MkCKtKMNNX8Hvka9MGdNhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3636616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6Tx8CRA9TVsSAnZWagAA7pEP/3n2Z0FoTklxxAs4gLPo\nwYAL3eoSP7IE+W6nmo60Zf5WMeOwrB5IbsnVZJOLx0imxIPQ7W+MFWEYVhiR\n7gu2ih+/xms98THsQbJgghEtT8uWrcNYghh+nUj0JLJDCXhQX1UePKjJcv06\nw6Reuz8nqoiFW9t5+eQ8NlIEj5l4QKkaucgbKFviFxK95mUBNV2S17TfLIQw\nFm1RFEtrwwPl3O7aZA/5nsIuPb0iC6joekAfLJ8yGcPBJ0054fEcd+biQjx1\nVExhtLF9amjCEYqdD2CHxCcFr1JhDjtWP5rDuLQP8Cc7iYVkMcZpL/T3ld7l\nkfrZpY0Sv8/YqJr1l9rSXRJfx5qcLDF5kpd+fy/oJBR9kwsppCHZ6xhOtpqA\nRiQrY5FP3xw863ImNyaqH0+ydtwIn7gilSXRrUlmB53TCxzcTJ/UDTSKEDsB\n6Zg3avrVlmFf6wMsKUcV/Jm7wtl8XHnrH2AmfRiKv/GauvMClygiZsM4SiKJ\n86qruL9NFx7o1fCUtie9auwui2Yg9Kfs0QkxQX5FoZ5igzSUYHxD1SYoK5zb\n8A5XM1Z4dGVgav64zhBwc5Q3i53y0o11gIsLmL2QgzkuSJPWtABII0TuojOc\nXea8pWTbY8NoG0S/c/hyzgP9UE6ytwd7U9kj+PNCnuiSvKji7bGwZTlnwH1K\nSehK\r\n=2gxu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"585e074db08c2e8814c1342214ecf03505e585e2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.22","@storybook/router":"6.5.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.22","@storybook/core-events":"6.5.0-alpha.22","@storybook/client-logger":"6.5.0-alpha.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.22_1642675324506_0.9883346591261732","host":"s3://npm-registry-packages"}},"6.4.14":{"name":"@storybook/ui","version":"6.4.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.14","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"59f08ac8d8eb782fa13fc9a8dd715222c96bf234","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.14.tgz","fileCount":387,"integrity":"sha512-nZsd8GXzYwmmTjZUB7pJMh+Q1fST0d2lFkhDHakxLaPLwumibw9NHJ7bRWYHFlAVYpD0c2+POP3FpOW5Bjby1A==","signatures":[{"sig":"MEUCIQCNqSzxkw/sQF8QlNkiKJiYAumaZLr8+4yajErE2BViOwIgMGpqaomKnGURCGr7wvNPFEzmMhCNiehSgq99VJDDZzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6oOHCRA9TVsSAnZWagAAkYkQAJKUnJSOueeRqZbvgnq1\nxRlkhkMGtcvsPsgXzlr1NjU+wZsYa1DPLBsK+j/4bdTWR4xlRHhsIJkreTZK\nLj0Zbo6qAwyuQutkLCvrEt7pn9Z6mbfAFKM2Cm76qgGyMSGUfilGpw9wbTxv\n49Ml94DuTJFxj486674b8/Tp+IB7TrRwjKTrnHPqqf6HpYmOzgbHeRfSlA1e\nl3B5F3o/hgeUHQOJdxxM61R/AoLtcvvxVRN4iN9A0cEfcHlt3i4dBDaTVxUu\nFIR6hPPczfFmWi80H4+ylQVsVHWPYzyIcfnCcTY0RqRkDjJ5olv/cEfXQRmt\n+/03px+CGAnen9PlQ2GYl0jh32NWOdpouMvtysh4qg0/B/sZ9HFOjkI4Y4Hf\nA9OLnR3ob41IMJozWLd4ub9LnXkEA9dyjGmLSL7MK+CBwbteREaV5xj8dN7g\nvRr48xQlOXjXVXsUC55plOzKzpJDZadwubvMai7HPOWMv7JR7TutgAVfg1sT\nJ+/H6s2t4PVHVec0ACnW0eLC8nQzYUVH2oL8Yfvu2/vWcoXJfZvisBeiZ55Z\ntQMD2Gfusy9RKWrjfDV8oi4tVfGwN+nPL7yWNNDEpl0yut0zy6bxc+x0Ahgs\nTLQJsZKMP656CAO82ghTBlt0LLA5FbtGJtOPFf3S2W53gyxZAvlZImuTceVg\nhBMV\r\n=3McJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"cf71c9f2b86e71f39c0d452174d84f34f86879b0","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.14","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.14","@storybook/router":"6.4.14","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.14","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.14","@storybook/core-events":"6.4.14","@storybook/client-logger":"6.4.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.14_1642759047592_0.47377763041983423","host":"s3://npm-registry-packages"}},"6.5.0-alpha.23":{"name":"@storybook/ui","version":"6.5.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.23","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e7832c82425999514b713d02862d1ac95660f00a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.23.tgz","fileCount":387,"integrity":"sha512-TuxBrOyindsUjk2vc4MoP0H9BQzlAwCFSDB2BW/szYaoI2VQecfz6cA4nsf2GZvSnugC2BEwY9b72wqJHoBoeQ==","signatures":[{"sig":"MEUCIQCV16l+4+Bn85gd/Tqwd9DOZgpluPbnCGw5iYpF1RWy6QIgTO+SVYP3v/b1UGMK2IFFq/H6qOWVZJ5LD3z0p1Yl7GM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3650291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7tMECRA9TVsSAnZWagAAcMMP/AphLqFL6h2xiHRg6NIQ\nuErPiaDPlDf0e0x4rxshc8XGvNSgxBxg4zPlj+VjFQluh+tQ1MD+pnc2eP+V\n2dO4/2Q+Fcdqbid57Y9DNAHXygserYEUOvh+BJWZ1PTyPFgB0YogT6s4Xyq7\nJTTtuEYWqnB3dVB1NYKh6EPnRwdzpNkdc19L760AG6IQbvzXHX9YpWn1dpRy\nfAWe6MB6Nagx78ptdwoMTWRr3aysenF2spVkDMmDQthQzXbbHnh2Ru+J6DvX\ntjti+SvB4aEzb1yjqUUcTyurz72s1owpbOnX9XLdJXJ+EcotZKcKJt4gB6ZQ\nbHzn95LvAATrFH2OX7bS27dGQi2onOkcDJrZQWUKBWao/Hqv+1nmjKG6VAPO\n9nHBOJ32g22uCd4fpc51EWHGWginRbm8TSHOxP4pP5y0pXD88roaoTuyXIa9\nPrrhgxvfwLr/OLJwFPNveK6HEgiLuyT+HD7DQ0JgTykE/o87XxzQpcGLG+NA\nj7PsKX+XvhKcDy1EQ93uvmomud0u2zXpiZSGtQUGEvqITK/JCn2o3CqmKB8o\ndqFzbvVAhpjgjCrnQhopF8pVyqo0r66DOb2JzGBCecR7ChSWqRvhZIKuQ3xz\nVr3NSSdHo/UhbjMuW5G3Yp9NcOOfaTFXogJoV1/k/AFSGIkpLqJDJ1uGmQ+h\nUJd9\r\n=pBY1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0006ec45ff04e42229dbee92cc49764699477e1b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.23","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.23","@storybook/router":"6.5.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.23","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.23","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.23","@storybook/core-events":"6.5.0-alpha.23","@storybook/client-logger":"6.5.0-alpha.23"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.23_1643041540357_0.7289277044158913","host":"s3://npm-registry-packages"}},"6.5.0-alpha.24":{"name":"@storybook/ui","version":"6.5.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.24","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a592e7318aad88a6c2eb487165074fa266740a67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.24.tgz","fileCount":387,"integrity":"sha512-iEOS21lcD21NRAM8WE+whx0JUAX2ODEaB3UBtu6HjKgMUSFRBLuVb3e4gho0XwEZ0Q3EWhLGQ45/TNEzdMcEQg==","signatures":[{"sig":"MEUCIE2CyV241R6bwb/p1Kpw0cG1LBgRNcfENsCaQndIuOIOAiEAiUdDV26sxN7j4M8vL/SWXWfHSyn1KrtS7by1rk6j+Uo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3650291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh82OKCRA9TVsSAnZWagAAeAgP/j5OY+CFMgluv1n8Qit7\nLqMkhIaVC49Yyx8kRoaXJzpok43xFQf128DqrUmOnzNTWCw/CDmJR3pYjwZl\nNrrC+W5PcOsEVhiw9UuXDTV0ybfREFgI/g0dm/xBQNyFrBg2HdZNTTipL0wF\nIVqPjv+ou8ywf7ewevQnsrgbW0qx7PcTRgfMLLmgvUzkq9z3mdJns+5Mw/A7\nMYqPrsZo+4UDPSimygiBUAhYvwdh/sEs6VlbGivi6G0BZTKW8K3FRBldlmAr\nInvoWiJL+b4MeXqX9mvigrLAZkYm0ZY75jjqJHQ+e6b1l+LjZvNGhUrR/xL5\nQ9hrPSo7NMeiA8DnOkivzss2D5gLDWX1zVyUV/bzwIIh4gnuPOs4NdvspUt9\nriIIL0TEMow2JMYHKy3jIjabeP9SdMozs7rywqlt2cgMKQiv+yyVD2ySZdU2\nsbjm98i7rhgg+835lYFVNYMdfINaFSldXPKLHz5stwdIfUCXmBl7j5Dt05yh\nKrnhJZffITmnc4QqyiorMjopqVv1fGOJ/d4zVYykFWoXIWFjDuUV8Q57uzh/\ncd2Qoih35O0VKyM8YFpF5BU3QAHVjXe00fUGQ/F+XUMNq6+/nZ17rRBrVAY1\nw6RLiHze3l0NWenqOo/5Jn8nRg5zcpTijL6a5qYdWxAbZbn6zrBbp0dQnGpP\n7FrX\r\n=Pl0C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9630a513a02d0faaa812d0761db396468cf8f3ca","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.24","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.24","@storybook/router":"6.5.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.24","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.24","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.24","@storybook/core-events":"6.5.0-alpha.24","@storybook/client-logger":"6.5.0-alpha.24"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.24_1643340682077_0.4037378194971659","host":"s3://npm-registry-packages"}},"6.4.15":{"name":"@storybook/ui","version":"6.4.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.15","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"600519bd68611adfa91fe4e820306fd01716ba3f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.15.tgz","fileCount":387,"integrity":"sha512-CRPBP3hoGXmFAraQ8jLJeR0UEBWzzn3T174+pPtgVVRhbfGfoWl6kycdmi2/7ue1Vu1Yg0vH5wp9I67/nsQG+A==","signatures":[{"sig":"MEUCIQCoG4ji3YkK0Qm9LLbOPErr2N5B+2tc2I1jDRo/RJrarAIgNbpx4Ie4djWJ/LnnirEJOqp2R+cE8n8RTL9Zvs5Ih40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh84TdCRA9TVsSAnZWagAAIHYP/0Ugi4C/1fI/8ySfNrkv\nYcw9nEf4ytGf2hjNkegNt5GbX8q1Ah9BIa4hx0pP1ieMgvb3nT/U/1nh5WDz\nWrynmKCALF6khJA6F+59gwT5AKUbrBzPUiOFc8EIerxNDWYAQoVMoZlB4rjv\nxT3xjCjzyjAfRmXdlBbHEbCSGZUGSacP3oqRLYnYpMy+oj0lkd9S6AuOiCDw\nsF1+rru1Bf0JI1fSixZw4JPHOCw7F5/ys8yVsooK1JpyhmnA9ghwUDJARD3B\nxa3w6K5iNAwYnObTn+RkM68XZrllw1Uo4COWVN544unEMXvGxg1qb2Rr+zK3\nUqPp3HUiPGNQ4EHps72NbfyZES3VKfqW2raik2YlMOztofAbpx7R46o1ig0F\nRO2esKbiIBF6XNvJiNBsXz28iZOP2uwJOZ0DxLjD04AwgCtSW0wQsUxdnuDr\nPOd157LxR2sAd/geGd1TUkiI9rLoP8u0jA2p3/ejtZpwCC4Al3F0mnmiyPe1\naq8ckYj7ni0wjh1PjZeM9idYq0L2IY+uo+dabypIOw4+is6EHA8R8a/SpLl3\nQJQ3Ke7SpB2Jun8aEC7SZ0zxaRMifhptOnlN+S1qLS9MR7VeIhNtS9QH+D56\n6evWY6j7PuPlQiuX7IIYZNLbsjv+m9gf+onaJQlzl7/BdNlmw/JOmSc7hh9l\n8iqk\r\n=Yk3n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"63a20d785f0288b86aed9e29180abbb07eb3ba8e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.15","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.15","@storybook/router":"6.4.15","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.15","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.15","@storybook/core-events":"6.4.15","@storybook/client-logger":"6.4.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.15_1643349213076_0.4119098411641733","host":"s3://npm-registry-packages"}},"6.5.0-alpha.25":{"name":"@storybook/ui","version":"6.5.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.25","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8f1a090a28044f53bf83bcae3b03ef4d237a904c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.25.tgz","fileCount":381,"integrity":"sha512-zpiTSaQXBp7lYPV+WlozAT+o/Qns1or718CG9ykgFtSkGs6oBSS86+OJSkiECzeLUB15bN6hYEfN3N5Yj5c4xg==","signatures":[{"sig":"MEQCIGmRJYhIqCqADCj4evXeM9tzQeFzmOtohnjIjNvdtUeiAiA6IdHmkPn0n6YCl0MwHqHGMBidXT2Acjr3tRkErv4+CA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh886cCRA9TVsSAnZWagAAuaoP+QHtabTtGqolz6+8FG19\nGh1YR0i9VTHEYg4NfsP1B69+k8FydUeaTMc4pTGG0VGWDZxS94Wl5+07ah59\n+QxjSE5rO2e7jYV3xNig3sgVMJh3VTcnMT/yRNjTDSudTvOxSW6V0W67Xhi3\ncF2bwQTcl1V1mdu0YlOkMOjpAHH+7K8BA11gDZhaofzXIVcZnhs643Q1+sXq\nIjyNgs/GxOf6H+oqwrEak8O7gRbkHWNszjl9wgZn9EGQhtLluDGcFydDA6V8\nNGcgmcEs2jk9yvG6OuOBQcDunL7ots/r102mbiOalNGea2sP433QEAfAeeWt\n3Slmrau2Rht6W1b94avx7QxZjUb0gNFMvUlfHBa1E71NqEOGAI2N1iEbhiPF\nQSJXsvQJmvv059+Nh4K9938zjvdO768z5ZDKpaj5IINvZjOEvmgvpXa7Dwf8\nIY9nfj7sD6fvMFUP2tRvavO6c3no+BIomL1A1HGqr0RpGeq4WRv53jPgj46W\nLaTu8dayEpVN9NdIRZcZtSVtpN2MahyI8JY1ClkyL/TZ5RRBbGPfOVxZjdqR\n+BA4KTs4gZ4cS1Ie9L7aBuhdg1pJ6+JaVGozpUsgquIXQD8Df8qC3BIqo7OI\nPm4PhYvli2+9Gcl7qgOCtBAQ4skzPYJCiQ2IQGR71teesgTD+L5QeSGoNXBu\nmrwV\r\n=BcmE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"25ed23c17e07452af0dbd34665eb9a6dfdac526c","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.25","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.25","@storybook/router":"6.5.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.25","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.25","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.25","@storybook/core-events":"6.5.0-alpha.25","@storybook/client-logger":"6.5.0-alpha.25"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.25_1643368092756_0.03999549418750381","host":"s3://npm-registry-packages"}},"6.5.0-alpha.26":{"name":"@storybook/ui","version":"6.5.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.26","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4c83a0b19016cbe4fb48a768edac7915fdeffaaf","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.26.tgz","fileCount":381,"integrity":"sha512-47tPo8dtSCS2/Ny09aLgtsMt8RPp0V9gJzmaA5QiFxTceGDALfwAkccu3YRTLqLqoUn2ouYB/tqwZcGyEYcNag==","signatures":[{"sig":"MEUCICATlipf90QRd/3FRIeYmBX+H3MVOoWs6PzsWueB53woAiEA7XrgzB2qE6AH+PQn8epxq2Gq/LlTA1UnCTcXXx8Yfqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh899XCRA9TVsSAnZWagAAuioP/1xhbQWbTm8Fv7tnHUpS\nKL5k5xnUymLRR6E83zzii/a0riYNS2NGRK8kW8xF6dZoxmSkkjP0udd/j/GV\nIEfsTwpQMGhoHG7tgHW97+W1cGnhohBK0TvupHgV9xl65oLufsUn6PDYMWGP\nz22Ui/LwNE8Q6fU4/KVMIzfqc9sWEplJ3WCATzJqhwlVO7rbxaXxBVLC93O3\nXg8xY1WgU+JhxP9uY+iUxhEDdZgZAk5eOCHlUNV4zC7fei8lqXu8F5qm/0yb\nI91A+72H9DhqLFi8PWisiB/g0Sha7tHrweOVi2GVRwfvgxaBNpp6Agy5FGlq\nroHRB2t+KMJ+Z78e+0WZGeU6pd78j0oRv3l/znuMU3W1tWKiR/ogyl8SU+FH\nvGaR65SZpZ0LSz6joi+YPrizjrMJBdFDX4yZ8ywue/8+Iib8LSciJlETDYd7\nJccCx1zwjGMMpwfqya6kNAS16tUflMqIatBCa90nUK2EoOQYyD27WU7U/h83\n+nANDKDGgEj5oAVxZr31crtYkiPYJ8H8b9xPuSbgPdpEw4h8i3wij7Kp9dfi\niaw46GPXufIvouHMNdvr0xPW/v7nkpJSNJdMILUle/eV8W1TZ/AWVxDxJUV2\nqWIlz/1FwCaDk1Uoi4gUsB2YQlZo3dbbDhmPUv8FlAmopXkQ4+etyXQUg9Sj\nJVOs\r\n=8emf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"80fb653cad6cda80f1982c413f95f2f966d94e01","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.26","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.26","@storybook/router":"6.5.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.26","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.26","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.26","@storybook/core-events":"6.5.0-alpha.26","@storybook/client-logger":"6.5.0-alpha.26"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.26_1643372374927_0.23463145915893202","host":"s3://npm-registry-packages"}},"6.5.0-alpha.27":{"name":"@storybook/ui","version":"6.5.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.27","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"46019700e21a6695eb82aac6de4b61e2f86fc17d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.27.tgz","fileCount":381,"integrity":"sha512-BACkoXFGBu/8oilnF9+MtN0mACBD8sisfO6Ba0IsMMz8dpp6fcsKU1ryV/MkjtFGmLskLoAlQTxdPNYRqYxl5g==","signatures":[{"sig":"MEUCICI0IWfKQqFNuyrwIXFsoaNUJWMgxTxjq9rQlXhIIO1QAiEA0UDslAsRS8iNifO6mChHfBLtezEfwfu0D5cQAYzATu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9OcmCRA9TVsSAnZWagAA0wEP/1wkSyiiIQu7InN+e1nc\nD8A0wIGkC9wbBhbbRdZTeAg6r/QhuvGOt8aQzqg0TuzfkiF0AFFhD9vNIYoS\nKECLHPST7yBzZ2ZIP95GwpMebHnrjUgnvSqIo6q6GQrdFtuiMxehKYHrHTdZ\nRI15z0S/Spo9OQPYYNESI7ymKXNYTBHcL3reIS3lt6AHypjyndBZGL1hcGkx\npuAKPfXRHqS/UTNaI8WuZRDHfOPR7KWqNmdFiH01+64xdnfn6ViiB80X7aa7\nlfReN4D1dWk9Ek4i+/bF5aPmYvW+eFfmdz1KFWHzP0g420RPVCvUAdkVXIzh\nJsPJMWkjhi/8zqAREFrJHMUFzGxaEnofV65QHI8ZXnKpr4u5Bw3hKob4ksWl\ndCiqj7h4wH6sp0gkbv+5rGH+fEW7pKS6L3I5vh2W4EUnl9IW0ORDLEU9YOaC\n4f/eBuiLIVjHQperIzQ0pPPL1Fr2++IgKW6IxgQQMnQvxoIaC/VG5fJc7Gez\njz/rUQmaTRU7OoXUfEeYzqjFJtqQhkT5FccBLwQfnydvzE21oUicWgDowUrn\nVcbjUN0k8m1VKOP8AhhGdbLmkpdC27hBfFrzTxdHUkX3rdexdntUAkmjPV7s\nUh1XWpTKewfY+WPa5haVxV9uh0Wmbhq676rctYOD7eGGiRbztLcGSGWrKN6y\n8AL2\r\n=IsYb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2532ee915bc340aa4e1ca0f13afe5bc190f9903e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.27","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.27","@storybook/router":"6.5.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.27","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.27","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.27","@storybook/core-events":"6.5.0-alpha.27","@storybook/client-logger":"6.5.0-alpha.27"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.27_1643439910202_0.355470681400587","host":"s3://npm-registry-packages"}},"6.4.16":{"name":"@storybook/ui","version":"6.4.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.16","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"04a44991786c3725d2938da938f2ffe77f177c9c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.16.tgz","fileCount":387,"integrity":"sha512-/+qR//RoKQ7ieK99fYJxQteixNu8KdcFEgq1VDNMOAKsp17LSU+3bxKwm3M+dSKDT6t3oOETa3aGEB1B0dcnFg==","signatures":[{"sig":"MEUCIBydzLMhitqM2mFLFCEMxqIQO8vngj4HlDfps3NVJIeWAiEA9D/Z6SRkRQlthdHp6BzMFTG6MeaSvwIKpNVM3K/bztw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9O1DCRA9TVsSAnZWagAAZCYP/1Ls9MHYPrzwZU91ST+a\n1qjvvaJXwrOA++qU97aBvDN8PRtgU5qpN4Jo98F30wDRcWhpjTzUP5S07/wC\ntfvMdRLk2sr9SwnLeouMRLEnKtbP/9zXWxTKJIXiofqJSV4i+/0ydBSoHEUK\n9mfhPmw8e5EA+yeBflYMynIbyz3USoyub2ar4rSqSJqVjPFk/NGJHHQQSU9u\nLmSq+aNItqhPOlNRkMkL+jj6j4k0gRUGz9vHOUuhGieM9zO8WL/MBeHOF+zO\nFr7fHypQSmTwq8LxMyQahZJfSsD5RTlururn8pybQngn3m+TRiCMEVmnvu/q\nXCHgW4KLRKxdCO+DoyP101vj25Rt3pFOhwYb+440JYu7Gr5YfULUErvakXUq\n4NEpX6Ap8n4IlHN/PGcXNyp6cPRW+ZAf9gWtxKLy45UrLmor+oP6DFmpKITk\n9zm895rOQ3v26sLQiqYnDDwy+7gt9sfEBLTOvF+B++//3wrK9hdnRSPyvv24\nPqWd4Q0Agd6Wc5XGaSHJPUDfwK5CF62zsi2aPZdblgxQEPt3JdwLhkdYr4Yd\nwKkkRnCv8y9JR5NBczkOZcTvTjm3oGfQqx6N2S5qzkcaS2BlN5C5vepYl/NY\nBWD+EDO+X3yPUcAfcTUEB9o+SYz2Dw/RmENQsCKWs8pBymecbRFYzbgdwMHM\nv/l9\r\n=G4+T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"450fb4e44d68bc7b11fe927c390488f336a2431e","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.16","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.16","@storybook/router":"6.4.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.16","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.16","@storybook/core-events":"6.4.16","@storybook/client-logger":"6.4.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.16_1643441474989_0.8577227339634947","host":"s3://npm-registry-packages"}},"6.5.0-alpha.28":{"name":"@storybook/ui","version":"6.5.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.28","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ff201bd1c342eae49b6305f0a5ff614eb66215e9","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.28.tgz","fileCount":387,"integrity":"sha512-JLzDz88GfYGYTOYkre6RYrYMo1vUq6/bcXJr1iWsA/jEJECmRtxLWAFPKgo+4P7AMK8NVgPPkH2in5QNbe+bvQ==","signatures":[{"sig":"MEUCIQDioCbjB5PF/1GjltLJfIvXSAewYZkn1p1bWKNXgUms/gIgJO38piq79pWkqGAPXZ+Ag8fSX2uDJF4s987CoDoTTII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9V87CRA9TVsSAnZWagAArZoP/0UCssJdd6l2JfOoUE4o\nQJbj934Vk878loWCTbOWkCVU6WEeIK3qEANxwjHBO9XXjLr27klzJRauGfJt\nmYDeAFydPzmg35XsZuln7XtQdYTaiJYgh+hiKp9UdlyIWJ5Y5XvvgNmRugqo\ncEYx1ysKkkjVf0O/+Q9/A8FeCUCnu0qr09BVBReT74N9RPz0Y4WKGNaLPb/o\n2AXepFDo8uXcWCbQELeTDim1GK2HeCkcdm8mM2dp/OR69DMDr92s3DbcwrbL\nMxQzjSfX/ID6WbXDhrnZq9aS1I0RhsbVSgL5seaYNB4suN+q8YqxUNGotkC+\nsKn44wbcc3IvFZz4ep+WueG7PKjE0XwqJk2oMvGw26mcVxMEgDcd9o2LDDso\nek4DuXp2tF8i9qQjC4mlsMMQiIpD2I5Zn3SOX4cBXXUFSsma+sGFRkqqOyXt\nAKe/HwlqPJBnj+q8/3bbjHb9zqE1pw4VtrJ8O0CmpLEPile0t2siPEwIKdgg\nbeFnXeMZojk5Agz9Q/GSZkQ2uqgvB616/sy8N7OZ+jzq8M+tVw77il57okTt\nZ9qwi1aXdZaMIYu46yWacbezgzqL+SVrNd6MkOnhCBJegnwokj1IB4Ntu5+Y\nhqP6nhlk7IBInWOyOv4kYrlG61gfvbWvdGKzJrY1XDW43GF0mv1iA/UdNA8n\nWx0B\r\n=qDns\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a95a47b6cb372d38518aa220129169d889b23d64","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.28","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.28","@storybook/router":"6.5.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.28","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.28","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.28","@storybook/core-events":"6.5.0-alpha.28","@storybook/client-logger":"6.5.0-alpha.28"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.28_1643470650993_0.6026335359995667","host":"s3://npm-registry-packages"}},"6.4.17":{"name":"@storybook/ui","version":"6.4.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.17","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"926aa1dbb4d3f9a28afe6edd6a0e5cb667be8e19","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.17.tgz","fileCount":387,"integrity":"sha512-vBYV8PmvhYgMjjTRLtOHIisGqr1nfajAgOC+wfYvGLbF0npVEt5PfDieG1LTRc1OaItWLpKKJcByqSfL/y9Qow==","signatures":[{"sig":"MEQCIGGpGfgU9xko7BEtmG5rV5GMY29WgXVEV8plRcFGVULUAiBOoA505rVuLl21HzgaE5S0BM8KcVNOFcE4RX0+S3nE9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh90W/CRA9TVsSAnZWagAAUSAP/Rdut2ER8iLWRRxtW/yk\nF/KiAIP8sav79Vp5TBV5SC31clc/z+0ftNH0i3aBTGisUlGZFXPL+dj3w1oJ\nvoDUoqKZUaBZuz+LqYprg+jBXmJB7L0TkuZjlMRgRPhkI/VxWdQrToAoYARU\nHlpwyKnH8WF0bpMh53Yw7wRjFITZq+YlaI7W5CUA6u9eQJWC13/B/sAhTvei\naZXedj2rjPc+T/OfhT2JZLB9ddSWtFfCukqIpgG3oikh+y98RkXoMoGpWPt/\nIXSiTeZh5Hl9f+J4+jbFCMjLy3QrzANLN2QQJgIgFZVwVWNrBBAoRMAr68vT\nndRhlWQjyiN8vAHGxEFJB1doRJW7XowDIl3tDvGaSdagjQVq2J1vq+JIMwnN\nNOIQVbwb34IXT5xv5SvMmMkIK4o+3X9qTtuq5vWyc1VwDDSRLUFnsD53j+aw\neX4YlhLJwwcioTQ90RVK4chtegbNjQZqhc1OTh/7wXMVDxIpZyz4+ILt/rO0\nRPNRZ5Y+Y9WXB9+dg6EaE2eYi/fbflFYtREoUWFEZziRrDlZq/d/nz9zNXGr\nyswLw3e8dKtxkafmc3LOG0q7v4tcsCAlPZ3BVw08D2ZuxmqMYOYZv1NMXPkq\n0P3qK/bqymcGjz3RC4TuiJyoPct/aJNaT8lVLjtUV2BSFLhMKWK9WzoJBcZg\nZwe5\r\n=2o9H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"dc061f3e38151d25d2cbfb5d16a4531e7ec6e7d3","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.17","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.17","@storybook/router":"6.4.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.17","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.17","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.17","@storybook/core-events":"6.4.17","@storybook/client-logger":"6.4.17"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.17_1643595199430_0.5683153145239792","host":"s3://npm-registry-packages"}},"6.5.0-alpha.29":{"name":"@storybook/ui","version":"6.5.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.29","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"25fd6cdf24518961cd3c4b6f3cb739d711f6e283","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.29.tgz","fileCount":381,"integrity":"sha512-fRWxFFjJEX+ERYwfVXaZyDESwtTnHx4CKNuiA17Kie/wRnLM0LXM60dJd6egNbQuBri/MM3nZRSAA+TN3VZ6cA==","signatures":[{"sig":"MEUCIQClWYDlx8A04sbure8IiGXZBrbxNd44HTqul/2eWPyRFwIgEZ+pr/M/DQw3W1A3QIrVQu3ZGbof6BVKPoueqMuegq4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh90roCRA9TVsSAnZWagAAmu0P/2gVvyE56RTp7/MGS9/N\nX9602GPVot4b0CCU60GjyUhHvKLaqMhcbKC1pvFkjmM82jV4vD9JmE1zi/Dt\nEL5+Wnhipd8zasmo2rV/u3EAkGWjng/DrgvULqNzvh0c8uyzYcsGyzn9KgIp\nMQXb1bTgHAsNU3CjYB1YPSt2LPCQ5rXTFlrDoR+YhFItE2VD1HMkhlLnabNl\ni8DVjptDmbWXHJI+lM/gCsaxEre+UoUcTk7GULxYhfrKdrlpj2Moh1q68DzK\n6V3z0bmSfTkXi5mwU+Jccj9tDKANDusSbEeDsuXHGIPrN3yEpc136JnsWk5S\ngoal37k+ZF2O4REjw244hgkTwgG6LU1rjcfX/oV/4CjKNjX7zQpmYmnniR/a\nPnc4eq8saKNYtWnZfg80DCL7xk1EyD5jcZbTd12iGTZGw7bjcgesvQk4cZDq\n+l9BFoVx/ZB+VE9gBJ1Npzq+fYm6cYg+9j7n52g8EmRJemuuoA/h+08FuZXj\nbMMACs1lDQIvJieHzwKBMqBfzmfz28nSXx2vNR/TUVnrEOW6KsousjbG+P+W\nI5Gt6Qw0KzliQRbDyO6zYeV7aUHSjTGHepqIK6POhuBBwwbzYL32eIqwwi8k\nmyyMED3cjS7AXH4L7OWF1ouA/Omj9uXxFUAdKe0xTCkPdKwaLE7uJ+ZSvDO3\n5+I+\r\n=VFSj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a8c2388d04deb833ac39c40f27b0585c47456615","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.29","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.29","@storybook/router":"6.5.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.29","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.29","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.29","@storybook/core-events":"6.5.0-alpha.29","@storybook/client-logger":"6.5.0-alpha.29"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.29_1643596520142_0.8821573431690815","host":"s3://npm-registry-packages"}},"6.5.0-alpha.30":{"name":"@storybook/ui","version":"6.5.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.30","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4dd812ca967732983f8d67fbbf9aee8201a8ac01","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.30.tgz","fileCount":381,"integrity":"sha512-ZHNVx/4wfBlD2tBlZSorqGXFcQbYtYRu0rq7ex+akBqasZ3KKdRI9gGHaDVjf7l9+j5lBFjiKlbNEnrQ9ZuzlQ==","signatures":[{"sig":"MEUCIQDxtNSlBYkXaUDXfWyczsbDAPwZZ/RQGXHxHA1jDk7jMwIgX0PE4H26U+gIlriQMr9WFVou1N4XHQg10zRoER+3dHU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3649750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh95RKCRA9TVsSAnZWagAAtPwP/0FHhl9zSK8RqYdJEph8\njs08Onze70oRc1QAPFXIdDkUdDP/9eFfyEktUcsqkY2u5g3T+7OlQ/zBTdND\nCTBtXFfJj9ihkoFP2u0VdZRaOb/IwRZ/rLU9ohBosItT03T/np/XkY9zo5Ia\nncR8d9OMgx5Si1t2cAI6jtsSWPFnWfHYyrSZfcoZN5WtSQeKem24PACNXGmp\nfoRJOaMery1zAg46Dj2S3DwF9dlj1ukC6wFYNVU5J6nZmnlNCEUKL408O8w/\n+lMJSxn+EX6FVBdDDu3Y1o1U0QU2SmVrzHNcM2dgwn1YV1DkSl+XQu+PpWf2\nfm4tW/+tKXalTTjun7TIZ0J6pBi6qAPJSzSCX2zBsunEo3ONHHRMICveoG3P\nEimlCH8yvfWzHbqU7A/cdgwPAW0msZI1ZqMixPlefobytcA2nWOIltIx92YT\nfg8dow/kiMdVrCHOBI/uDNBs0p72TD3b1siJGHunUmS6EupSVVitvhdGCJmf\nMkyDhqd33eGqbAxkL0C6hisCC5WQKe/KJga4Bm6veDg+F/k4TO3WT/fa56wo\nH4qhoE0mPtRS1EyXYQtIh8jRuP7HNRfrrgVSe8UfC5JMNDuU4DJAdqXd2CjH\nJ9zbBfjL2tYSGHlX4/NesoCHmc4/wqvgcAHeQdqWzdMRMkg5ZMh++eta58Xb\nmNpy\r\n=Zi2B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4dc5ec5956f3a8cfb07e3c4b3442fb3f6ac95662","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.30","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.30","@storybook/router":"6.5.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.30","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.30","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.30","@storybook/core-events":"6.5.0-alpha.30","@storybook/client-logger":"6.5.0-alpha.30"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.30_1643615306308_0.6036261389340556","host":"s3://npm-registry-packages"}},"6.5.0-alpha.31":{"name":"@storybook/ui","version":"6.5.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.31","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5424ba92f065d29075df2214c2bfec7c41cadd49","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.31.tgz","fileCount":381,"integrity":"sha512-eJTnNBhSJiKqs3V0uohrazfQWRLeVIFtE1CpjF9SZ79gnARyZjphXB3A+voiNyd8Ak1mqP1I2AaytULzhAAqKQ==","signatures":[{"sig":"MEUCIG5tqVwGSIkFduIeLh5s3LMWOcHMYfMuDrb+/QtJZ8oKAiEAqYsqJ5Ut3D26d/qR50E2+gXcCK+yLQIWK8eZYhmUgVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3652966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+TVLCRA9TVsSAnZWagAAb7YP/RXkVIf3Oz5xpT/DtG/V\n8nBZ0OzB6wymQfhaNZeWO0gV73YTfEwQr53lIwhLIUxR6dN156fQdeqjxozu\nOfLekWVxldnOyX8V6e2OLT2hbaBOvWsdkmo6HmrWdyUrWGl8tB5Ak710hn7w\ntrGcM7r22kN3+uWHTSD1PjXPJmETceK7LbbZcZwGkrSvvSemjya4h+7f7z9w\ni2uBblpGQoc3bx7eCO01yj6oXUde7slFqyRtwVhNuEMWrb/h+AGsHMXV0v05\nVWo23g5VFglNsA0vhzyY7I4rZq3NT0llaHKnkLvXq/ykP07fr3jVZmxPu0MF\n04wwu7olgAa+XZ1q8kG1a5fYXG+2glx7hiy0Ts8lxOhGFDjcluNfpKmyfbo8\ntZ1WqY+YSJtoAQ4aSp8ZKWNYlaQ2Imiv8EeDx9FmYYGwOIBB7kcBlYDgUhBa\n1cuStIe3A/nkV+Zrx7Tx3HWpBqEnPiplDPVSmDCKB1ac//eLQGha3dZTj4Jj\npNjnpJL5DkzpmLMy0OdztNJD8dkFjHzRp03wgTikQdS5IX05RaNv2sbGvSbR\nwOaAsT9TOzCFbkIqST0/L8kfI3uRERiYKv8E20dy+bHWlnUUxN2tGIH1MDKl\nsuEx8eZssrb4UR3YEi7ibIZx3NoflFmbOSX0UkDtktIdUuNzpFBNXeh+Vs6s\n/cVI\r\n=+Bxc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6e124b7c457588818d07583ca576ec3c0995f809","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.31","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.31","@storybook/router":"6.5.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.31","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.31","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.31","@storybook/core-events":"6.5.0-alpha.31","@storybook/client-logger":"6.5.0-alpha.31"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.31_1643722059676_0.6950547163965757","host":"s3://npm-registry-packages"}},"6.5.0-alpha.32":{"name":"@storybook/ui","version":"6.5.0-alpha.32","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.32","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"125207d51599d5804779f3cda728ff15272dd4af","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.32.tgz","fileCount":381,"integrity":"sha512-JfzCYSK30r/qi5/XFHOtHT77wfvtvtKxyJte+eq9vm4X8eHpim5aSOLQ/SoRpshdDFkwYT0halTZlImP2puNHw==","signatures":[{"sig":"MEQCIGXoNBOR1IhjtPvZVslBHvfe7PLEw4I5Mm9YIn46WAxNAiAitRMzNWbtXP4t99LnbuuXIsH/ObYOvWRu0Y/t3etu5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3652946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+UfpCRA9TVsSAnZWagAAfQEP/0PmyNqOd7dM4pxb9mC2\n/RRfiyNlH3kBuW9ByeX///0rtBESsaY4P4nYTkVwYHyLg9A3P1rOaYqAWcZ9\nRMhU1dgVxXNJzu74lQJhLVkzmbSS756vwnvv4GY4ZmMCsaPu/3lC+X2xjtAg\nB/JkTGoY4f4yfLsukkqudXvQ0BdofCc4h6XCvDrZ2ffw8HbtuwaXaXiq7XMW\nK83f/YCmXZeSQyXKrzDHUfeCNBfUD8Cew/9kk/FaoYe6NmxmkwRKD/Dsf1Xb\n6vTwJbgdBbvVUhRJwRjqk6lgtUMQBmBeAMep20Blq5uf/kpqdCvzbucStsVL\ng5sNdm/iOU0D2+6m6clYxP6OpJJ92GCwVBFE3COSq0ekkPFkmNLuhxnvj97b\nq0VsNRM5UcLD1CNPRnlKQ978JFDo+c+rT843aUSk1gsdEPOWfi6xW9oM9A90\nc0sfMcHt1q7rKqQlApv4Db5El4oh+Ah9AYhwNl82j5bZb7bkfYbhKL6ouhE9\n79ezqWe6G0+3ytxIxcOyterbRfH8VPWkbDwG6eAj5+jxz1fkaKx7VlarB3X5\nONKdWxh+/jlLGzIk0/ZTtr1XNJcGObNgKnVCNH/7lthO9kIafrBiRQZwhcdW\n7bQm1OfcjCzhhyX2tI2j7V6KmHmOA9DWcRi52Ruy7R0pxLnJkMIg+yCj+lUi\nDiQT\r\n=etYp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"efd7c324921bb08899caa75f707574d758e61dc2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.3.1","@storybook/api":"6.5.0-alpha.32","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.5.0-alpha.32","@storybook/router":"6.5.0-alpha.32","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.5.0-alpha.32","react-helmet-async":"^1.0.7","@storybook/channels":"6.5.0-alpha.32","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.32","@storybook/core-events":"6.5.0-alpha.32","@storybook/client-logger":"6.5.0-alpha.32"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.32_1643726824822_0.9992998088648501","host":"s3://npm-registry-packages"}},"6.5.0-alpha.33":{"name":"@storybook/ui","version":"6.5.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.33","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4b5f3bb3bd2c5d232d8cf84d0bd62cd4b09b9616","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.33.tgz","fileCount":9,"integrity":"sha512-D1Zsdlw/68x7aN374UrqWJzmoxMT1eFHlGGrd6+JUL3487z93Uwna+jV+n+u/vqdX4jf9/EZM6iZm4Kcxuxp5g==","signatures":[{"sig":"MEUCIBgfXC5Utb0O9IEOtjQPqlJvyFIC/0NKmnaWXcm43ro3AiEAjd4pvuWh1DbbDOp33AZwaZVFgsPIwxHrEvF0IZZwVo8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1794200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+VWxCRA9TVsSAnZWagAAvNsP/1qgSCOfkKokJ8UMm+My\nOiHGYkRXJmZ38RXVMvSDzi3qZLkLZC0mOZnYFY8VSKACB1c7Nzz237OuwE4x\n3z6dn5Uc6vfNOTSIxPFWx1Ufx8g8u5uDN5pUEQ195suPSo2DhWW46xcRm/FL\n4TFBCGkr212MX7L1HI/2sfMRN1crESQfL9P3j5jFb7U7UDTJq8KGHMeV9nVB\nGTk+xptuUfvVj+VEQKWc/CIgA2LRZQJO1PCPlIyOB5wRGOnC7zwsIuUBYpuO\n2N0WiiNm1vcF64AmgYj4yhJf5YlCuhW8tFVkbtSNL15Lhu4REZeyJfsDTst+\nzceWPm8ofzLR60BFPdxLKdYJprYDySbcZqq+3XvrOrYw5HEhEzZDI1TpcjId\nsgve8O7MAjWvQX8kom5O64OK4n+xX7u9ZIUf6id5IxYl5FdFSvXpW0FqvyGd\negRSugY3WQMlucXruOpXVE/WIl7w2CldJ1i+z/2U2+ZaKxLFQv6jyXhWDfke\nui6jNGkHIZt1jeDdEpYaWHIksBqbD7XiNw1CBN1YnIMVFfXQ2/6cAqhYx6Oa\nNmWV45t7kvWpX2azrassEt1MofayXjn9u4tWasSFHUNbw33MDha6mjxLpBOA\n4zHn5Rrz0Vo2fdpLVnEvj4n1p9nO3mTu5/NyCe+8cfFEj07EAoyP4vaSsoM2\njqyw\r\n=Se3B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9ea863a7226918e763ec5804c19fe7fa02aa5e59","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.33","@storybook/addons":"6.5.0-alpha.33","@storybook/router":"6.5.0-alpha.33","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.33","@storybook/channels":"6.5.0-alpha.33","@storybook/components":"6.5.0-alpha.33","@storybook/core-events":"6.5.0-alpha.33","@storybook/client-logger":"6.5.0-alpha.33"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.33_1643730353398_0.9834165212930752","host":"s3://npm-registry-packages"}},"6.5.0-alpha.34":{"name":"@storybook/ui","version":"6.5.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.34","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"22259b701fdd1a013cf84816163f781ce100d657","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.34.tgz","fileCount":9,"integrity":"sha512-y7YQ/yN3XdUdwAbm8p85u7a7XXiR5a1ZaLunGVj+SBEWeHMinT+LN1i+LsSd+H50pdshzh1h1GmNCsP07/3Crg==","signatures":[{"sig":"MEQCIG69cyT632e4bYGJ6OrbXkCjszvR6jAUGQoWOb92x3x1AiB9gdt/sb+RmmbMIxuzYkbyD53Wkz3G0NBfaa5IunTnrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1794200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+m+6CRA9TVsSAnZWagAA4bkP/irSm0STvhQq2Z8YY6Um\nm4OUT4zihA9jvrodvBPl0Toqn/aGWpDxwkLUiVq3JhRDWV8D7I15sCQliCsV\nIXZpdzeIoY7+W/UgNY6vff1B6TfKRCN3TVzYKD1CB3j/rO5o8/MFNWSDW2FR\nwD0AtbxUzq3/+FmbhPf/BOBAdpmySnb9UX/m05zA7AK7/AhJdwfZnsAlLHDk\nOc3ROS7CG9HNUdFUcP2Ho1q3XFadz82qDciJrLaRctTaaTBGxh+5YrA7LxpO\nJHIcO5ZrcwRvWcV1Wi+J16sCzXQsMcUrldcj4MTrwcrSOIe5QD+ziRpDZwsz\n0mZzkajIA4lU3wXr8h5/noOEAJf0lcbwNi+65LNTg2ovOfv2FdnZQFgFgvqr\nB6Y6P+IXeV49tTxTSGHZf7saTVbH2MV2PJW9DdgKiiJnDznH1Lw3kFA0I9/b\n+JebhqC8qjvQRhYrPYB/dG/sSzHf8WjrU4ulZ9aimZJsUx+mrUXsOjEoBBYt\nxM8i2PMNCDSYczUiGXegd/ZS3gV2z+rloCKsqZRWDuVbXolA5XoakMnkH6g5\nWXzt2kYgW9bxMOf7dPQKxx9El4iagB4tZfdz0A7a5MDw0JiCBMpXwx/JccWw\nb2Y1Vnjn3jMYm/72ZOKe0wgx1TLS4mBo/rHjqAg3HE8oIqisaAdyOViM4qPF\nESsd\r\n=oN3d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5eafd588972634b4d76ca2ebf01bd5ca2aaa0119","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.34","@storybook/addons":"6.5.0-alpha.34","@storybook/router":"6.5.0-alpha.34","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.34","@storybook/channels":"6.5.0-alpha.34","@storybook/components":"6.5.0-alpha.34","@storybook/core-events":"6.5.0-alpha.34","@storybook/client-logger":"6.5.0-alpha.34"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.34_1643802554519_0.4381145773445809","host":"s3://npm-registry-packages"}},"6.4.18":{"name":"@storybook/ui","version":"6.4.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.18","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3ceaf6b317f8f2c1d7d1cdc49daaac7eaf10af6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.18.tgz","fileCount":387,"integrity":"sha512-f2ckcLvEyA9CRcu6W2I2CyEbUnU4j3h5Nz0N40YZ2uRMVNQY2xPywAFZVySZIJAaum/5phDfnOD0Feap/Q6zVQ==","signatures":[{"sig":"MEUCIB+dQn9y+ccEwWq9rmltaEUvAPxrJatGNkV4UezWLP1iAiEAqWEba9w62oeSXqglq1XuBQrrlfNt0NjBhoaMEdZIpcM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+nu7CRA9TVsSAnZWagAAqUsP/3vdlkCee0w2Pb2qaecN\nzZEreCVyjIyRM6NSioqa+YEhagwkE1D3wnauNLChYmxXTToJPnUgMQrbVsU5\nt+y4eF7BCqplqZhyNnrpcC1VllySTS0glKMZ56ymd5XHfSzfp6K/IoZpLHoo\n4oJFvPJUEFZ8P3X3B8k5wPFNdPNhFWbP7YIKO2A6a6f7Q+SNCQxry0yYefky\nL7EVNJC9OGu7HD+thC3MzJlBDF/8+D56woKevTKXbL/sItzvoqR5tlsxd+iP\nqMe4/HUoJDxdgnQ9ZIW9ayGa4XanlzxFrEXQNA5lHD4aaZCRAXW4suAZyGTA\nvZhyM0Fsr1jlim+2mMEuR/1EAd2jnaT9o07u16brVd1s/5QhCp7ksly7P0AL\nTVr280RgWAlWqa9E/Cxg+bp/NqxjRQI/VXUeocQdRGoKA8EULK4zIF5kAZ5j\nvQW3JCdBxsewYprMPrkeuUTzIiLXJPJ8mjGyjcFtD+biCoUgxNjWDZHriGwL\nlhtktmESJ6kWUUPzrTswjQC8qODdjSrRzwd1JmI5sR+9i1MMzF8u5rbdMQDm\ngrn1jPGZ3DqnKS/pjDSIqplkkWEFLuQYcaH0jdzZ1tAHWNyIhfhVzgk0o8Wu\n49rPpZkw+vMJP08TDfx+wEa1f3GaEc2HR/DeYmoi8MQITBt4OfhPfUVAE2Ti\nfep/\r\n=cLeI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2c57c56209263201a5d3dcef473e2f6b337b931b","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.18","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.18","@storybook/router":"6.4.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.18","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.18","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.18","@storybook/core-events":"6.4.18","@storybook/client-logger":"6.4.18"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.18_1643805627696_0.08840293575673819","host":"s3://npm-registry-packages"}},"6.5.0-alpha.35":{"name":"@storybook/ui","version":"6.5.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.35","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3b8c67c6bbc585b5f1e6a82f02e57c105ebfc20e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.35.tgz","fileCount":9,"integrity":"sha512-uShX98WP2ZUA5gF665IJ0UnGssvMG+Y172dkSoZy32vgbOEpzFqBD5A4Qy58+U5b/lES9NvC4SSCofSPqccAFg==","signatures":[{"sig":"MEQCIFkr2RBSA6ULpIJ9ppTHMoYW6FyT+NPMWn7qo6mmlj0WAiB4Ufe6Kzgz4l5T9qwXuEXGMv/lRfP6eMNpA+uaEJqSjg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/S+jCRA9TVsSAnZWagAAbn0P/A8do+Gg848tShbyqDls\npTuHz1Hs35OVZ4Ee6CGTUI4hCjr+P56jkY8wvQhF8gWUzomoABr3JhMGUA5h\nTN05pwtYc0ZnYfc/0KL2eFCOEr9aSH/+8hHIXisi1eamiIxCwehzVq9zMwhS\nW0Qq5Czd7UkvnacaZ+PtmAe7D2K0pLSa515RleZjaHQLbnbni0MxuH92gIRj\nKRxYul50+R2oGfZ/Sh6uB94fM6gMc9wvWl78CQne1JEZEC8K3t90qQUdH61g\nHg8Ga0gZQ/MdR75sdymWpnMM8QYN3obU1JmZ7MoIm+ZwJeGo2wVMPa1b3P2p\nCi9pZEjpxSK7lLvDYGyH3ubny41qaSkCozTz5FZxte/D4AFm9k5ER7YD/LDQ\nuo5xV1LgpygdxK5JiNErw3NW8JuJPzRmtllFrlr/iEzxMy/2GTyH7s0MQ3Kx\nG+IMGy5wW1C9ijIfTfgzXHzAjNxbGomZkyWfQenHs28fGMjJpWnfvqbWfBc4\nvOy9S9XR+ci4gAALHNl3udHCSmCfcgCT22PxKalhV//4V6J9e7cF7kfq36qQ\nZEG9i63EGT6rFWIItW9itGf80p1+3cPAZbyubwihZZ2jWzxH09s7alhzxg61\nVPsHEXkZkxbZOulhPuR1QDi/90ZaMbV4/3wj67J2oup1OI95ZhE8Emw+v+zU\nLaz7\r\n=Zyaz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7a483e312a7355fc0408a578bfc16d4e476b0938","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.35","@storybook/addons":"6.5.0-alpha.35","@storybook/router":"6.5.0-alpha.35","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.35","@storybook/channels":"6.5.0-alpha.35","@storybook/components":"6.5.0-alpha.35","@storybook/core-events":"6.5.0-alpha.35","@storybook/client-logger":"6.5.0-alpha.35"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.35_1643982755486_0.4926184949792114","host":"s3://npm-registry-packages"}},"6.5.0-alpha.36":{"name":"@storybook/ui","version":"6.5.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.36","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee0d577ab2de3a707ef396d403f0a6c0f0c0f683","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.36.tgz","fileCount":10,"integrity":"sha512-1GxtELhChbPqw16cgGIkx0ibHVnjXfifN8HIs7O1S9JYgM7qEYjNasvcUpj975z2Qy0Zv5nHMDna3BOPKMY5Eg==","signatures":[{"sig":"MEYCIQDCfYNbqFOQ3aR/Fu4Du8aHn3nFFHfQABSmt74RZBt47gIhAN0yAmW4Kp5/2QoyJ+sJk8WN0sJRiS9pZTR6ZjUb1Ise","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/UGJCRA9TVsSAnZWagAAXegP/A9Lpv8yAJoJPde9khu3\nxSxozd7iwiH4+1egdldEeiX5m0LF0RYH3wZz/3LDlGXeR533Gn7zI2U1xfE0\noKmeu4WNKo38f7Xn5yFAOT3lUSOuBUkKbn7tD3guFmWR/Aa39orG4sN+Shiw\nYfiIH3t3LUdBgxUAD2fA2jXYu3XVxGLLEC1+IjYrVbstCtkMqZfcnUv9+yds\ndO0oxbohof1eRLQCjmymi+Q+oBEdmgRQ5YBXVq76o0YD6zU75Wt6znjyAmeX\n8rSpAkJHdZVUfqnlJXA6IK22xBrxqBSzHGRxriEKDzP/OH5wClI6tFWaSEdd\nZVR45BM2r++JK2s2uZfJaUM+MYfHzJZ8PmeZeVfDhEXa3KF3VT9haP+qUb2H\nxQ4gOSprZPZ8Os9N6bW7s3JBEaDo4OATkuScWRlsbyz3oCh6J2yuvewPHT1u\nkp+cJwMFRdpQl9QKtSQbgq64qCW1/+zX6IVGYhgiHnr9xTMnAjowqzTBVY97\nWMC479oMetCMwi/JmHn6C1Co6I4dRxwZ7RvZFBSDhEEkayh/gfBRKHKZN30a\n58WIvztQb43ho9LkJ8CmHA0c6N5M6JaO4gNld5zUmTGg64RSijfPQ3MYBMHl\n5OcSx9IUdjzrUR0TDqpJ87dUO3h4Rwoz65fbiZXvAUxqj9341Imv29/BRqs0\nAwnj\r\n=gXoi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7332caf9f83fe7ab1bb1e80fb52747fb4cf4cdf1","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.36","@storybook/addons":"6.5.0-alpha.36","@storybook/router":"6.5.0-alpha.36","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.36","@storybook/channels":"6.5.0-alpha.36","@storybook/components":"6.5.0-alpha.36","@storybook/core-events":"6.5.0-alpha.36","@storybook/client-logger":"6.5.0-alpha.36"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.36_1643987337666_0.15809702462003927","host":"s3://npm-registry-packages"}},"6.5.0-alpha.38":{"name":"@storybook/ui","version":"6.5.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.38","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84c0ce04220f0763ae13ec2b2b4664cb17d508b3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.38.tgz","fileCount":10,"integrity":"sha512-phUSEqKr9U2/r9GIf1Qc6SpYC/wT+wUGvXEUs+j8Z0WIhpcH6ctHF6t9t9bNRY6BBu0LvSr/UliNIfsN1nmrfQ==","signatures":[{"sig":"MEQCIGIm/Clnqkqkc5WcfxrCItUSilS9VTvKvm9GmXl5uzzlAiA686lphgE7oLJi69Q1K+SoHxtPaft7eQgE6JJl8U7iGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAjBsCRA9TVsSAnZWagAAWLoP/Rds3wOqIah6TBMwGvzT\nQJtC903CcPVo9mXbBTgGB5Kje1Zcr35tcbs42m4C5nYujvVhQSvRJ1yP/2mu\nYVFz2+Ps9H7yFpmDlL46U++LWnL70hhZ8Q2JvDvCdJDJpAeEs+oR3a2ndNZx\nOpaWhaVW6u62HnQhv7V5TN89IJ4LPNF2+1F7B3CHfG4zKELm8ErDSIbfP2hx\nncrtvNZm5tJQ0GgvrbE9i3iTaYuKSGAlF5jXTowtVbPOxhS8+s+hvDYHQc52\n8nmfSlVJQ/XIy0TUt5qTrk18TtM4Hqp0LZ3TuZpzP/mpTlM3wByfaFibP353\nR8GsCdIwME4B0DqbvHDABNEAHXg6DY1m9s3AhIBZsyKvkIY2fylC/KMBWAAl\nmaCjVoI4WbRD9tXyVXRR4Bb7cEWrgYztTgtdFKQDW2x9rxw/rkf78v77tXfd\npq37UWNmESsymmqPvbOe8QlfJgCX0kO237sMs6Gz3xpj1u1C/UCSwxDGTNm3\nHe6i1b/UkAc+80kn2n2GG051AdHLAWjct9QaKNeAYGHljJGNlZ+Zs+GDZzPd\n+l2eAGCaUKWp/Ue2Bn6S2eqSo3WI4cTm2Tu83nl1Dt1rvrItYjPajXCCyFyE\nhedCpPZ7m8A3YpfYriVbYWriIWXSyqEwSXgPUdjdPWvYtUPxQHt6WOj2UHeh\n4Sa4\r\n=G6X0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b0dd637a70b6b24fbd3b8d9f9df7299511f6ba62","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.38","@storybook/addons":"6.5.0-alpha.38","@storybook/router":"6.5.0-alpha.38","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.38","@storybook/channels":"6.5.0-alpha.38","@storybook/components":"6.5.0-alpha.38","@storybook/core-events":"6.5.0-alpha.38","@storybook/client-logger":"6.5.0-alpha.38"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.38_1644310636011_0.17952306512567384","host":"s3://npm-registry-packages"}},"6.5.0-alpha.39":{"name":"@storybook/ui","version":"6.5.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.39","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bacbe8808b1ea3643c3b6eeb49e9fbbfa9e3681c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.39.tgz","fileCount":10,"integrity":"sha512-mEJIpRE74AXlLowSNnyGdmRK0VvNb0mE0bCfPauVdVD+Qz9V1DWeOe0yzmZ7xf2MpqP4PdoEB1AKeE67zba1KA==","signatures":[{"sig":"MEUCIExapPaZywfhThioNV4jBT8w4B7e2Mo5JmNjHK0t/HajAiEAgvl1befJ53NgQ0oqWk2WBSaTeqS/R/9FHp0wwTqmul4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBe6SCRA9TVsSAnZWagAAspAP/2XePaMmRWpQIxGZ84O3\nyNdmZ0AvtQySamG1NEDmqcaPAtFEzlHZ7DLuuWgnhSUKBaAPazMmSK+fFAcB\ni5qT8rdvtxWvS5I+2CFBift3EfD32ZrJYLD9tmYU7EUAn5P2nPSgqLioRkOk\nrc3iMxWSEf1H1YFr9jQoGBQ4awL0VQfjyJAmRBrK/jj60AgTofqi4AnB4U6Q\nogCfULY73TkCkBaRCUr3jeu9Ziq1McK810ILjhhTHP7u7KB+zFiYnyhBO6uC\niJs/cIIBfmWQtShbN+evZrfGqq64oauDHCCd91IJvfvhY6hgWQsYafeqaKD9\npwuvElOU6NZb4m5gwVtWLnEdFrJCuWmzIS+YpoJkEbzUsQqt1rZeK3MrITYD\nU2dUvkdPAFB69LHS2KHhkFkvzTA6de/c22sq77Chl96nLj6LFXAdXMKoev8y\nZqzGdFIBW87MMWWYlL58Tm1ktmTaz+bG+9INd5J6XZZoDXuukdix2DSveKxI\nAzRcVGhHKmCqlELbd6UX9LMY19e1Mv9msULJZc3GQxiOISNeYWjmZMjPLBso\nw9iqe5NOddL8+z/MgRh8yMYfv+fWakEH2XK23YYvl1WAtMDtX6X+vNYNamFV\njeHblFB5X4Hsw/kBHyExEeL110/81O3xQnGKqrGvQfo2hOL9NBmfLSlPWqXS\nEbIv\r\n=c3r+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9b5d9b1f46a31a9881fe71a153a9b810e8203a93","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.39","@storybook/addons":"6.5.0-alpha.39","@storybook/router":"6.5.0-alpha.39","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.39","@storybook/channels":"6.5.0-alpha.39","@storybook/components":"6.5.0-alpha.39","@storybook/core-events":"6.5.0-alpha.39","@storybook/client-logger":"6.5.0-alpha.39"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","regenerator-runtime":"^0.13.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.39_1644555922721_0.8763671095506382","host":"s3://npm-registry-packages"}},"6.4.19":{"name":"@storybook/ui","version":"6.4.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.19","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1fb9f6cd875ee4937cf9d81ca45d5156800176d1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.19.tgz","fileCount":387,"integrity":"sha512-gFwdn5LA2U6oQ4bfUFLyHZnNasGQ01YVdwjbi+l6yjmnckBNtZfJoVTZ1rzGUbxSE9rK48InJRU+latTsr7xAg==","signatures":[{"sig":"MEYCIQCI+jtPqEYXyiLJw6tkoQ/EJ0cxyiZ5oCHofx6fMEJDrwIhAIoNkIVV3AL1nTlxgvDvvbzrDs5ZcvQ3GOr5pM+5IcWL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiB4bTCRA9TVsSAnZWagAAUC8QAI7ywVzh5ZzcUbBoO0UR\nzg45hqFsYe7GTe0KnFRCjC9SNGo0m48IDxhInOYS53kaXaFfjlrnjB0mJ+1m\n6TB5obeTC9p5H2FRjtwVWJrXZ8PsWOalRfSUILSaQ3X9MKFZPVzZBbipUkWm\nZOj81lks0/P90nlavenGfdfW0U6y4XKupszEy4QffYyJM/cYF+cyWbuEkcct\nQdmtWEkPbdd/VaRXK9C79gCWFiILHeRVNdy7aU5Ro1wsZMTprsDX1TRXjUuu\nRhgcpncaOFELwAZPegmUAm/Qq6qr/dXtWthxHzZL+MrN6Pd6wx8jnTyD1WgV\nxOSVblC6P2xfwvvgm/Ulu51T+1iuFBNxzMtbCHIkd0qm5PjBk5m83nBz+suA\nStX8jZiISv+NhJ8T2tdcfUr09PFlTl1DyjpAO+Yy8AZRuaGTVthC1KEl/ShM\nFfE1jJvnAamZ0IvlpAg58LIFqvsjkNANqXEDoGSPqBfCk1cgEPnQOTtXDkAp\nb8DJeYANPuZs/8pNQP721FDUONwv4hAyKPzGflu1sAyProy8NtPm3G3K149c\nnNg1/2mGd3a2VBX+GuAu5QP1t/fyLDJxgPyK77zXtAHEMkEBLOOvrm5RaBpD\nPvN0XYqM7HesZGBLQu6zY2+4OzvLexSTK1Mj8RjSmvIiQBVemeWNGhHPDT+E\nHLGc\r\n=6Ye8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6a0da15e6413e00b31f14b3accd082ca328e45a2","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.19","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.19","@storybook/router":"6.4.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.19","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.19","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.19","@storybook/core-events":"6.4.19","@storybook/client-logger":"6.4.19"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.19_1644660434983_0.36702835614393603","host":"s3://npm-registry-packages"}},"6.5.0-alpha.40":{"name":"@storybook/ui","version":"6.5.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.40","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9ecff3772d4b62d4ba5b3f2822417c3b77108a35","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.40.tgz","fileCount":10,"integrity":"sha512-x6JEFX+IyiaamSfoJd6TYasA46fvBS9dMXv4IFodeRDfFb+036GzevjPOGTfOyPiwHAddA5qbkjuSdauPKI/bQ==","signatures":[{"sig":"MEUCIC1aQtUF1LaN8mNSA79ugU3YvLD3L5vJ694jQU1lJKXqAiEA05F6rgimqeKM8qe84uhFjLwrxNLhfanyL0lYgE8dkcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEEkwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeZBAAhnkBILaU1Vgwdj8LEf07g6hrYs3HbIarYgUzPRDUbzrzqLeV\r\nB1B/4D45+9JmI+yeNLeWzwSXa3pAn3mRdu1L3kFnnvmpeX9lt6E2OopTJI6K\r\nqGqoamEy1vDIqFv8EDCK4W5AQxM0+KKKWnB4q1LD+ghZEa//QGYixCPnwTHF\r\nvzXBOKKsX8jzk5X8h4XYnLIQDs/ejhFDKssy8VdmWUaWdToSFzBTZm0K31F+\r\njeWM1ZdFJ6gXf38KjGcwk00EPiqe+7Ba0len10pW84a772EtakLfePclWUGD\r\nwl2/+Qw30qFqwLZK3DD1XYy0uTh9YM2av8JSfNaIbXQNLQChT+O/OVSSKoQq\r\n5+rGwvZkpn6uqWUx2iq5U6BHl0yBcZJuJ09qrR9+1CnCK16KU30/Pt9rJ52/\r\nzlrTAEr40mmExDKBFj6guJShWoxjxUrvdJxlsU6ZWA5s5nzf9iD3+d3005RY\r\nzY5I94pyGiP+4bE35fz2owHz7LghCk0LxkPiPL3ruE5MCMD/h3I8QcjIZC1k\r\nrkKkwba2zWKUVNak0ibSGILnrumUnILaCKB3pEvOtgGkrDodWnWDiPJSdarj\r\n5wRSGljV7Z6SRO0i5tnlgzm3FhamZ5UOn9mK8s3GO/baLwLIiG5dkp31DKZR\r\nuCEXwo1gUdk997fm5KpwWyi+TO49BpDLSqs=\r\n=g9nE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ffb3402ee40562579d45dbcf7870a1a8372ac0dd","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.40","@storybook/addons":"6.5.0-alpha.40","@storybook/router":"6.5.0-alpha.40","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.40","@storybook/channels":"6.5.0-alpha.40","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.40","@storybook/core-events":"6.5.0-alpha.40","@storybook/client-logger":"6.5.0-alpha.40"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.40_1645234479886_0.13660729645669423","host":"s3://npm-registry-packages"}},"6.5.0-alpha.41":{"name":"@storybook/ui","version":"6.5.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.41","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"84997ecc4682e42a065a3c63520e089cd2f51513","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.41.tgz","fileCount":10,"integrity":"sha512-7KMZTFFo0aVpeS0OUMLHzhxqWgZ+aq8f8S9kRTKArjk2neYx2t0jVD/JguekGAKgLfBkJtbMGSnJMQEtOccPQA==","signatures":[{"sig":"MEUCIDe6Uju4l1JgQAn+N8wLWTD/BH+9f9GGtbTHNmoLA5CGAiEAhCSy6G6HzL19gYxufeJgnab2AgQQYpGXnO2vO1So0aE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFKoOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJiA/+KPPAAWMl/2nVTSBrcosQign6AR47mjlEdbVYT9/oDX5Fe6tA\r\nJLBtB/+4PwFg+efjj7BXAep7G//NNPEuM8iGluEwyMotZzFAxk/1ReXzQQqU\r\nO8qNW4WYKt/M9lpLEXyNRmCC+Rvf9lWoG6O96XQgnEc5VJWxFkx6HHdn22vA\r\nyKAg1Ol3CVMlmEDJgoJy2mKwTP8llY2n071UkY1mv0SHyIdMpquz67XBoWni\r\nrrmIFg7ZLtLljQFJdDj7qaDPIrysCO3Kyg0lupt4k3Qf+V7SuM0y+V1sTX5p\r\nM01L4gHXsN51bHnghxqCZqjVaMoRjI9KwhamJRTb3bfYyUhA+/YONrmeh28j\r\n6RyJ9zZ0FtTkibY6TVVtc8z3hc2FUFUwhAasqiVdOvvb3FeHw6yeonp4lHzu\r\nANAj1YBEnPJ8nvZpOi7gSvUEgrOGFIY2aGFFwj9UqtJfyYc68fD7poaySkvt\r\nT07oj7gGpZmwt+zB9/7uQbc5eU8HxDKuMAnOoSfpMN1I+c3p3vuJdjkm/GUm\r\nkq3qmUBzDmAngoMMaPajnlEizHLlI55vcYfhfDLL7Fy9Jcqe09Snd7fZj5ly\r\nDIv1H7bFudOFlbLTl29+h1NRaeYyafa/+yxmWMPY8CfATlhuX9ajYOxP7ETV\r\nfOoZGq2ChMg7iuaQ7b9+YxrGfkPXZb0bjR8=\r\n=Q21B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"10663a4c9ea6c04a04047b5bb22254d6b64201c2","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.41","@storybook/addons":"6.5.0-alpha.41","@storybook/router":"6.5.0-alpha.41","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.41","@storybook/channels":"6.5.0-alpha.41","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.41","@storybook/core-events":"6.5.0-alpha.41","@storybook/client-logger":"6.5.0-alpha.41"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.41_1645521422735_0.7434705936541086","host":"s3://npm-registry-packages"}},"6.5.0-alpha.42":{"name":"@storybook/ui","version":"6.5.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.42","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e703f6ccf0def870c2c1dbd6d27d74cd10fd79df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.42.tgz","fileCount":10,"integrity":"sha512-xHryJUyAP9hjVPBdEOqy90tTdHA0613AAXCwcT1RBBIJRGGdVjcfb9NjVg3z18zIRbuEC9xS9SvOvYJhIHmy6g==","signatures":[{"sig":"MEYCIQC9L6DX8U3o2TtGM9xdvzhRNEvzTsDhyi0D2aMTy3rWqQIhAOQjFKwf+Z2to2u55rPBjEW/yOLd9ApbYxdex7ZdUfYa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF9CXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Dg//RkQVP94lk/615b2o0id8Onl904c1tSF2ZpfWFzPJ0M54pk+h\r\nEsjNfVerrnfkhlbC4OVzVwhDrGsnuYmebAFG8spTamzDyOZAiQ6oGNJ1TWn1\r\nGnwPEWpeay7+DSCN/XSlByswYp3tHP2F0kCT/KYMBFhpdFm+qAPa7iy05Xrn\r\nslUsNzOFwZ4tpEBrxUed13DC7LFWtwtiIHcej/ClLkuV9Is7HVKnphFVhPhk\r\nf5IYvSYpjUaoK7fbTTbfTKZcw3rAfrYl5aVbHXsl3NwtWGevrIpOewHzj24P\r\nb0k9dEcOT8wxA3xljzL5CmDXiuPU6hqrj4CLi5CySIwfHg+NXNQ9oM6ACwPI\r\nKN+UtW4GtXX6PpkTzgFCT0aJ0+TDADWFIfGsZQKlPEJd4egiW5QX68N3elrP\r\nZytXACjYm9Hl69HvZVN/et3F7LfnRy3sf2s+ZZzra58kGVdkorWSdEAyObPe\r\nPoB+QuRD2ZV1Qr1ckhUIg6044uanVU2wfUwffYSHktW4VyE+RE69wGEwO0i8\r\nmgc/okZuV1kbSA76ahK/Navd30Qpq67ND+zu5LIjla+WEnhtG3FhNi5pROLT\r\nWvHCx0s0A13X++NophIW3EaNlXz+Ei9t/Wek5Jm1YIHRK8UF5XHLqTerAHym\r\n+bbJ0doCzIEO6VmndsQiboz+Wh+vhRYGIpw=\r\n=fCap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1477954e18494e721ae8d3c99bc710381eab1351","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.42","@storybook/addons":"6.5.0-alpha.42","@storybook/router":"6.5.0-alpha.42","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.42","@storybook/channels":"6.5.0-alpha.42","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.42","@storybook/core-events":"6.5.0-alpha.42","@storybook/client-logger":"6.5.0-alpha.42"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.42_1645727895734_0.23634169085520584","host":"s3://npm-registry-packages"}},"6.5.0-alpha.43":{"name":"@storybook/ui","version":"6.5.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.43","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"81c5fe3ba9f6c6600df906172650f2287c44b050","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.43.tgz","fileCount":10,"integrity":"sha512-5ZMDfcZEgzGeqDG1OSqJFiFEbeG3zxhclP+kiFDOFBEBmQ0zgbCIsdnl/SuMkb5Ceqvf9D2JOa8RDfCkpstQxg==","signatures":[{"sig":"MEQCIBfOP6fuEE8lZdclOmSi67gkCUBMamsh8kuaLxlkp+05AiAMyYa9JhOyWfPFUQ2gIQb4Ru1I0WPGgRhPDt4zgMoHjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHJarACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSChAAhUojvLn77t+sJAW3PSJcO1Xw5XNsvudJ/MzRlfM/ZPs0KWV1\r\nnZxhnvQfCz7gJrzQ+oTLZeKY8Bxm/HFGCyY6fPeZchBWl3G/pFql7JFgM/zx\r\nJnouaF54FuFK/0LZgn7hI0hTv7E4Wvpqpfz5V3fAspHk/dIKrJRNuHvVIhgO\r\n/TH1/n4Pz+Tlbf0dNtO/GIbQsn8yqTxSCi9+UgndZXb0sJYhFI9IekZu3czs\r\nbzy1rEFZCKTy6D7lvTS/Eg6SvayTHftr7y+ZbTmoZEDRn026o/g8CV0fX8Fv\r\nRjl7XLVuu6Avh+iSq/v5w+tLbHDNIRXvAl/Z2++QVPbW5T97VsaN2blxArtj\r\ntmRez4/h7K6/upeACibLWULfjafnxqiW5Rvg3YV6bmIr33tGFsmSCOU9R+2W\r\nK7kLT5sYk0zOoBUzIcWNpVALQ3WaXHOlTVdi0EMOcmea6OdKJoIOUStp6aah\r\nkBUJldodxOdDFyVIFA42BCHyjggbRhi8KmVkD9Q0N4qX/+BzlYM3I6ttlELB\r\n2pypHzC9WN3UcIlk3Igvcvuf7CoexXu1RenzrWT8NgJ5j4Wd/xMT00UtugYT\r\nUuCrXgKCf0sEEL142etDLxzXuAHACrL592njVPT/hazKlQ9ufvXk5dHc8q08\r\nsySBUVjZCsXJv2u840p9mKGHlnBjdXly/Zc=\r\n=Wz50\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"62e538940658869e62dc852f5754d55a5e0fb52b","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.43","@storybook/addons":"6.5.0-alpha.43","@storybook/router":"6.5.0-alpha.43","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.43","@storybook/channels":"6.5.0-alpha.43","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.43","@storybook/core-events":"6.5.0-alpha.43","@storybook/client-logger":"6.5.0-alpha.43"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.43_1646040747398_0.7744840969930813","host":"s3://npm-registry-packages"}},"6.5.0-alpha.44":{"name":"@storybook/ui","version":"6.5.0-alpha.44","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.44","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d2d67d387e7539f6f48964b867308a414afaa3c8","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.44.tgz","fileCount":10,"integrity":"sha512-6KjgMErtXSLbN++o2sumuzFh0dRTdPteEsoGRgirt7X9mLenBySUHkwmBeWeadmJl4yVx5kJU10Uz9RT/d0nWw==","signatures":[{"sig":"MEQCIAGOEIKJmF/Yb8UP78rjtyAThh1zaOODPyTKjFY6KLGHAiB732i66NOdJGxS8947z5B/t0RbZMMtQ2A1Q5UK3qpkNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHMBxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsJA//X9tJqBNQ+OktsLFQN3+8AyCaeeqp0D09JFf6NernXnN1mgLT\r\ngQdPMN23KOc7Lr63GJ4BA/hrLkio+ucsxQInw8Je2HpaS5DO9VarzbMwL+Uk\r\nq8dsFjQvTxU2u2uBvQ3rozkpU/Qo+PLmb9GOuMgheiBQS7sHkdGnKFIA2kn9\r\nhipuZp1uHUaGM8DHx8eBz078Jo9i/eL+T93pfl0V8JYsgU8QIdk3g2MVu9lQ\r\nqLlMcFcN5IP+mFzlFZhXSdwaFC5lyw7Jc0Xt+lneTzk3t68exgA9cChyqu7+\r\nALiywH8SHLByy+WBL712o7jHBTEgHnsV7FKRchSi/jDJVtU7N0Xo2eUuVnz1\r\n4iE9t2XNlpM63YE/04VUxtcmLF46gKnd0eQLB/ldGixpxxTEVin+G0iQTSNM\r\nlugGVhWLS+1gTlxj73j/21KH12oPAd9/INdlpF8jgp7632IFqW9u7kKa8Fu9\r\nRk+zaYPPQFygm8zKNzZ2K+xKCXQCSyYdH43Uz7pggpYm7Gskznia54nIS6De\r\nXZ+PoywlxuiZNr8Oaf+jVHfyA2sJloVBPdVmoN5Ghz9BJm3tdBVPWcxRikW1\r\n7uQq5o9SoSrKd+pAzhdXRRWRM+OVbXo2MtqNHqoQrYk0nVh5R5dp0zHyNO3G\r\nd0CQRWl6lDDnGOMxWc3rP/V1HBakvNiv9uM=\r\n=fkUA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0125cb2b688dc1acca71a7fbf2795466fd55c0e3","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.44","@storybook/addons":"6.5.0-alpha.44","@storybook/router":"6.5.0-alpha.44","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.44","@storybook/channels":"6.5.0-alpha.44","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.44","@storybook/core-events":"6.5.0-alpha.44","@storybook/client-logger":"6.5.0-alpha.44"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.44_1646051441188_0.8866675304109999","host":"s3://npm-registry-packages"}},"6.5.0-alpha.45":{"name":"@storybook/ui","version":"6.5.0-alpha.45","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.45","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8f51d85e3e62ce8ab9fc53f4a3af4df7546ff27a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.45.tgz","fileCount":10,"integrity":"sha512-Ptsokmwrqn8UQbLHrQ0PV7JW3Bdz1K0YeNva+z2Iz5Vi0KZCCtUTvfGEDii6B7GsnoESsJS9ZR3lskFsx/9cdA==","signatures":[{"sig":"MEYCIQCqhW4luZZCEX/ypSSV1cxu0pj3hXMGSQPtGGJrwSH/cwIhAOpcrvBuMNqzlFbIQWLE9JSJnG+XEISLrE0TbmInjNtY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHl8IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRrBAAml7F6gd14boiBt8BetKY2/dD2CVQHuqhEOj2mjBYULWxplUI\r\nE8hPFn2om7ac41S7HIvWf8SRYUw1hQwHMLwVyC78FLOw5mqEKkv+UE1nl0ZV\r\n137ExXCherDKEgr+69ekv8U4VTmr7BFn+I9dWG5YN+XnmKWzpn6JYKuPZJHQ\r\neww3HPH9cGK9XhtEw0LCGz4T/NCajuhGlbM1MAl65JJtBqsdfibs2To/Ol3w\r\nWBgtml3WnrxFz2pJ89m6NyximZkHjKSFMv/xVkIgL06k13Qk/iuMcIXKw2fl\r\nAbO3ffQd+lqq3wCKvz+hgH6QXdhLkpeugoK5/yXTcUAc4KcBqqqaW4L6Wtz0\r\nPaNdIdPxsgfqMqw4M09GY0jRhciFt6+j4ytEP1qml3FUc5IDx5P//LQtNHUe\r\nxFDeYNej6Jrr0CIwUn4LjQgQDsE/jTseYN/QshRad9rvTWd5VnJzMvVhBoq0\r\nMEtMmdV7LCh9EXEhWT+jgcID1J+c0015FlhJmtnO0PL78x4C0VOf8G8oQC8e\r\nFYI7oleOoxmC6esI3VhWFIEFrqDkCo21UBr86mb1EJBlOuLdckznDJ8CwuFH\r\n80MosLToS+AwXR6m8tW7INZ/mvXBZb3mg0ZtXzJta/v4yu3QWuY8TbvdDpX7\r\n+xqBh6j/n1ljDzgu6j+zjyg8FHfSIhPPDFw=\r\n=IcQj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"af457c20c773f57bea0504bf525a2f74852fe94a","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.45","@storybook/addons":"6.5.0-alpha.45","@storybook/router":"6.5.0-alpha.45","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.45","@storybook/channels":"6.5.0-alpha.45","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.45","@storybook/core-events":"6.5.0-alpha.45","@storybook/client-logger":"6.5.0-alpha.45"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.45_1646157576779_0.6239253927792483","host":"s3://npm-registry-packages"}},"6.5.0-alpha.46":{"name":"@storybook/ui","version":"6.5.0-alpha.46","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.46","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a8cce04d13b2454224b9357ae93260e8a47cd65e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.46.tgz","fileCount":10,"integrity":"sha512-4tfIc3XswkNbtjCh3Ri1dgy6UhI5m5k9HqQtbUtaWrX8jsIZahaw4gQ8LXQqSw+l77qRXDYU6WWMB2nLvR4Q0g==","signatures":[{"sig":"MEUCIH/t+WMz+ZD/wC0fGzZj28lIK+3a2xZy1/DAz8FOXulHAiEA75wURd6YQrqx+IRB3LTB8L++KxboyWulqxdjG3hEs3s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI4u6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHbQ//e0cd80y33+PZsV3ZApiIopar0cW5FuQ0X/JgJYHW6PR6tQtC\r\nfADElXP/QL8ApGr1bpbfj/cNEwbCPlcia0SgNINNZoYf0Ll1iy8KX+O2J/zw\r\n/+7EQsyH2/IUc32ifvl5XykLLYkpvFkVJ8m9IrQpUktrTGFSt7vs5TQYoL09\r\nmnZw/1wMdei5ngBA3iMI7WepO5CnEGtMtMpkYqBn46JgiQB1b/XNtBTtUzSQ\r\nEuo592tpF6U4GA4f1TJ+2NFNgECBiaaAEp0lrMDsPqms9Yl7fqU6sNcww+E7\r\n9oComwbSoD/xKypdV2B3wqczAwEa4w5Q/jV0MYvUjmoMmt9UQ7oSUUYkfrnw\r\nDmQBSr7QkCj7VWyyTdbxn2oLyhyL19mTDf1wjDMZZBeCop/phG/293ZhqjEQ\r\nSqE6JHilxi8bgugg5de2OyF+h7s+ASJfT5ZWeIgUUTJRJ9T+jWVng9QZh4Dt\r\n1eqeNgb4Xpa3M50Do1TUDHrCxA2RcQ3PSqps3HUUUmSfJ82v72ZdPa5HLkb6\r\nkNc9Gob4TJhruvyxV2zOphSP7pQlb9Vx6PEp6kYjCwD2RqC0IhBMMtkdClEU\r\n69vSXtmvA8t0vlNlhE2sj2iIAAIO8yREBGl9c4FveCxls30eOuorLBxyxC2B\r\nZUvrV91NhtV7842oSW/fsd+YBpsY0R5vAR4=\r\n=OmV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a64dc8426d21a70970728878c3bba0ac0a377a48","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.46","@storybook/addons":"6.5.0-alpha.46","@storybook/router":"6.5.0-alpha.46","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.46","@storybook/channels":"6.5.0-alpha.46","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.46","@storybook/core-events":"6.5.0-alpha.46","@storybook/client-logger":"6.5.0-alpha.46"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.46_1646496698158_0.2748942788269344","host":"s3://npm-registry-packages"}},"6.5.0-alpha.47":{"name":"@storybook/ui","version":"6.5.0-alpha.47","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.47","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"45bf6c54d518bd3217932d9d264f4e59ba44ff13","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.47.tgz","fileCount":10,"integrity":"sha512-qt6GpGTvFY3lAYXPBgDRFEpFW46A0lFoCeK/4Pu/83WZZIsDv/7VxiunGcP022rRT7VU+pdkPZ32gAaHb5DweA==","signatures":[{"sig":"MEUCIF+iZpR7Rbw91XRfNs1MLhmB4BI0gPTsGkdaDHG3myQjAiEAnhuH9UfU6tBaaJGF0yYzzDVtMNI27Wt+hvxFwRlzPZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKNdtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrnfg/9FLeKNyABxaPaTcXw2e1Mrb4uJGevrStBO6SnOlThTvs5Y/TI\r\n0znbUssn8TLhKUkcMu9VzT+EJb6DceEm7afac1CQVVi2Bfg7pfUQeO/scDY1\r\nc/8QNiUjgsb6De9ikZ/INNejfVfiQ1fvqwFMUUp5i+txuuYakfAOUBUufA2P\r\nql/hAxfHSTpanxoEw/sL/xoRT5+ZrZW/Mtx4OZIrjrr0wHtbTxrp+/JWBiH4\r\nluh8kgEVmE+c73QoNNqs9Oh7bVkLEmKaskJvNJG80Ui///Snpv7mFlFr1cCY\r\n4Ng2RSyAbEHZJ8pFp4BtnxjASWaEPQsTmI14mvGPmPDCBeGvm1kCW/UL2RA3\r\ngQU+kwIBw1t7T2e6JTMJ7HjPbv/qOAgWNnH9+H5J4L+B9ZIuOAeBdCwbupF5\r\n0GCku+KPZQqYd6pvZokscC3x/OfvV0mS8TYP74EPrZ7fDa1II7czdYL4yHsL\r\nODUwRs6VB56a4hfhMwgLFmCW4wf+28dEBJ/vR5fF9lFsqyHBbRrPKENTtgsC\r\n8l+tlXfhhj2KcTsYtr2m1CECKH9zrw2guYJ8CbMuhKJKv7VSTb32lVXCBrvd\r\nYgnqUKvWyfic9hb6DxxDT47dtgeJgsMnEXQt1qUqHhHsfcwFDYX10KF+c+Sk\r\nfjF+KaosDu/qXNqS65Tj71A3hlAtpwIP7EM=\r\n=Mf5g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e848de5c5d389fcb452d85f7ebdfc27f1e3c10c4","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.47","@storybook/addons":"6.5.0-alpha.47","@storybook/router":"6.5.0-alpha.47","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.47","@storybook/channels":"6.5.0-alpha.47","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.47","@storybook/core-events":"6.5.0-alpha.47","@storybook/client-logger":"6.5.0-alpha.47"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.47_1646843757025_0.5389800297083671","host":"s3://npm-registry-packages"}},"6.5.0-alpha.48":{"name":"@storybook/ui","version":"6.5.0-alpha.48","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.48","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8e946812ab54eb351106547823d6a93778da3f3e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.48.tgz","fileCount":10,"integrity":"sha512-AAJcFdJzcEkze4CeMP56RZr3Dd7XBl3vaZengUfpeQ1euKyGtr6diczHKKtVCtpbFpBH4H4/CgOvi1cAQriBjA==","signatures":[{"sig":"MEQCICirXcyt5MB+SzOk6zrzssmA3ZIcD4twivrypp9hdF84AiBm/F6ehtLScDon3GU4YGBQlOExjTMjro2DoqX1Vg4pRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLri5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfDA/8CLBnDSZxREuLOnCW4fIKFi1Vwxlf5qWZIchO+lSQCsECWZ2h\r\nMLf7VLlETXSn1Ibjm9HHHOb79FwoEGXk+uOYmDkmU7tWj52hiirPJqMb1KQc\r\nF4+41FbDRQA/dVIMAGAsl5WgTzYkCfgPDgVahNC8mDNlh8dG1kNyPRm+upJG\r\n1oO4bpPqLYjXEf1NdIxGon/qmjc2VQGTY7qM7vRPcCDXAMQJpeCsVuQPC7zN\r\nJOXHRi2UP97zrxzLD7QvkKLbckyKs1wBNIfZ5Mw1vA1gvbGX0jvrwlFXDp5P\r\nrfBBdUAz6tbfaKAaq2mFfpKsXMcaYlQiRz2YKFp328OkkkkAf9KlHO9m9v6i\r\nqCNk9UTPclqWyWV3YyyrUQRPNfD7FvcY6qMcFiXGShWEC7l7NcAOMvIAhI9C\r\nZwDPXvUZcczsACJ90GODVEJNFkxnuSIp9/2edkoZez7UaVoObtfzsepiKC+G\r\nnU3f2NDCgKdVPKW4p/6blvJ5IPnOtxBSl743hctyuEDOwLYeubix9RxwlsS0\r\nK+hb7k1O0pYWDsOnmNEthG5qEPUV9iNoXuLma8cad4MOyiTEve949/d5S+hW\r\n5Wa0cNHJaH3FJrl9PMQLyu4iKnQcIQDby2TzMZoEJTg7jSnnPS0ERbpLUgej\r\nElLsLhH6QjCD3s4OX8QUlpigcjQ3kNhWjmg=\r\n=GBrC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5f3afb8cf4389c16be11a6e5099e902d16a82762","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.48","@storybook/addons":"6.5.0-alpha.48","@storybook/router":"6.5.0-alpha.48","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.48","@storybook/channels":"6.5.0-alpha.48","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.48","@storybook/core-events":"6.5.0-alpha.48","@storybook/client-logger":"6.5.0-alpha.48"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.48_1647229112762_0.31033059686157594","host":"s3://npm-registry-packages"}},"6.5.0-alpha.49":{"name":"@storybook/ui","version":"6.5.0-alpha.49","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.49","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bb860f536880585cd46209ac4ee1296cb944fffa","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.49.tgz","fileCount":10,"integrity":"sha512-MIaEVLxaX0O/GuyxnAwaV5J02KLY7JDX+uURE3vFjIXb7CusxWPxO18XC0n0VlJNkXphbxzLHqRhSlz66z7dEA==","signatures":[{"sig":"MEYCIQD7Y9ic5sthElIISjsRcEat0nQaWRspzw5ZxCiEeXxU2AIhANC9ba2RRS1BkvMykX+6koA6je/BO/yZ1AV3wisaHSRw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1795494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMvDXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTvhAAh01ZME+kvgcso77phPbretPauwUhuXwfqZ/Lwq1abosO6szu\r\nUPjfKHbLVWtE5woz6wou00+yoxGNRuDMp4boF6lVYjNBuF0VcAVu1kxuU0TV\r\ngJ7ExdENbOt8lKlanEuqRYg8PnGK5L4/7JK6AZKyH2rK4jaFeKZzXzsIkO+R\r\n5YZQ7oqjlQt06ZmcCkWSyks3eTgqPco1Rq/xZPOGg6HJ6q76YlbRG8Ta8Xnu\r\nDuDop/WcW9699KDCxKvUDNb+9mBJI4wWA3ES+JDVR1ABLaHu1wLqGqVN8oLX\r\nPXGlAaWLfMBHPCfPdMU81r1vUGa7joo4c9IglbE9fayUuWj2QFY57c5Aj28p\r\nZOlPq0k8POFPe4/Qk6wI6IK7Pf5HzkDpxOqOxJw3iTB5AAm/0Pbjs2eEoi5D\r\njEUngibBlr+G3gpE98AjaFivrNAnZErIelcxpu8bFqyF3whh8Q//s0zBWH6h\r\nR9LkaTOgQ5fV703yBGrLeog60rtWRMX6HYxDlPQmP4QvXBILYdw2JqIEgZcQ\r\nRGqLGV01fVOwyE+qz3fxOQ5/xA509mNlEOaZ6c2zzKWwi5GdRN7Fq0rmh5RC\r\nNn+MjovMRRzgIH29xHPSpK2WfwTpzVahGj6AKDOMZBteiPRh5dWPfw/dCtmH\r\n5sPiLK5OQVHX3p4L66JmiorjkaA1OSAlUlc=\r\n=lVnn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5cd3cd92ff4ab3dce81726f0d3913d7077926bee","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.49","@storybook/addons":"6.5.0-alpha.49","@storybook/router":"6.5.0-alpha.49","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.49","@storybook/channels":"6.5.0-alpha.49","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.49","@storybook/core-events":"6.5.0-alpha.49","@storybook/client-logger":"6.5.0-alpha.49"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.49_1647505623307_0.14933935218740868","host":"s3://npm-registry-packages"}},"6.5.0-alpha.50":{"name":"@storybook/ui","version":"6.5.0-alpha.50","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.50","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3c78d92388565ac2ec99fbdd126cdcb1d43bf90c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.50.tgz","fileCount":10,"integrity":"sha512-NNLlf7AlSun50FrU+oWQPD0Q9vTRW93+VWP3upPPQwfMgho4YCxRPRN8/eYkLVMT9gOVb21vCo4KOSmPBiAZrQ==","signatures":[{"sig":"MEUCIArTi/dlKeuJA1cHpNYBSlORZrbU1Kwmg1TSbIGHhdnlAiEAt4brsjvEKiixLteoGcC1ej+Yar/BJAA2gwkwJKT+/JA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOs4sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPdA//TpxbiUlTmFJRCuFjaG2hP1F8SCckL4NX/PZ+ZYxeLWlcuNAi\r\nqhEZuJSzDJEK67xMJq51S/ADhkhhqQXhL3JQKmN+DKtjAcIMknVDMqJ3Uxg3\r\nLyR28ukRtvZUT1vcg/t4/++q/dizb0LQXHPstHxDMHqN2bLHi5xOx0T0azSA\r\nV3GGTpMXhi9d6TZQ094CsSMDqEQRvgjYOE0jVS1OR+s5nLfG0ZRW1+Niuq2E\r\nmdUTRGrkoJoGtgZ570sJ/Y7E0yx6z4V46gfIV6mjrq6RRTxXP+ir4r4G+gDU\r\n2wl8SIHAdo2fL9wnr3pd4+Vpc7A5rwcjahBzq3OB9dZ/cLgOW++5uUNgp0o+\r\ngxC05U+Pa6Ih/vzQf0c5PLTFoNn0QLPVqNiDvtBmcXSfDJjVLC15/8EwDsNo\r\nuVR+Hr1jCADygKOMD8/l3fW4aTSY8CQtcsCjXe5omalSH7zEgM+x8DCdmvC3\r\nU8PPRhrQR4OoA027m4xNVL1DeBULFEFdpXW5nt+Ze3nip2x5eDeNC6kjKsK2\r\nmedlq8PpZVHHn0ZJBcCUMk46lFkOud8XnRlXM7fDTyJlJw9ALo6Sks1593dx\r\nClNZ1jdXmmWmEg3+go3gi2+sZRHsRBel3N4gw5UYGcYaNe9B4uRMvqunMZe7\r\nXORLUERP4kAaCSUxkgdc0TA/Y7LB09OgCiM=\r\n=zvCx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"6cf4571e5a1200613de94aa066fe93f75aec6ad1","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.50","@storybook/addons":"6.5.0-alpha.50","@storybook/router":"6.5.0-alpha.50","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.50","@storybook/channels":"6.5.0-alpha.50","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.50","@storybook/core-events":"6.5.0-alpha.50","@storybook/client-logger":"6.5.0-alpha.50"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.50_1648021036435_0.9885531472616","host":"s3://npm-registry-packages"}},"6.5.0-alpha.51":{"name":"@storybook/ui","version":"6.5.0-alpha.51","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.51","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"54836842e7233a80c1db2409b73718f475393eab","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.51.tgz","fileCount":10,"integrity":"sha512-9Hs3/yvHf3qnIWpaB6jYTWu5VdaIXZZxzYATqE5LcHlmp2I9sYjOP/rKUCegc0ZliXmTO3MxjJaFS1UlCxQeOg==","signatures":[{"sig":"MEUCIF8rNXQ+/cY0IwSpvv20Ya3Hy4hVj79INCgiWgracypwAiEAudXzO2eJ/dH4ckJ2wgIoNXwiLgFPwlPrRYszusZUJmQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPenOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqS+A/6A1LT+XBgckFloz6Y3P9qrqiBbqK44+Nd1LYr6jZ7JtLe1AWr\r\nQCKWM1JIdRhdsfiLA5dWCI4I32VZE4rQjWecj5bzVeH7JduKaKXFpb3rplN0\r\nWbJXyLWkpiRm4mGdsT0slmobuQHNpKcmGoJAy+9lnYXunutdIxCU/Fr2QAfZ\r\n7PdMWGtXGQck+hhVrbWLx/RBTvaF870JGPQLPD77sQpNTyuThCT1ynIij1U+\r\nlMREkHJljjMIT+nt+ZiysDQUJq8eLvHMsD9km8J7b5iqNRdAWH1RwYkCBcjM\r\nFZipiRwS/uDTu+gSddg6qyH1K2OKqeMY0WvL+QdP5/18XKe9+6URR2m+9DrO\r\n7t5mKrt7fvuleshrGrx/TFmmpWuoX+EnrKTOfODfpCqsDMVxpIPA7czPel2s\r\ndA6Ip2cxmanOpTdnuPsClKIWGMVDgtmhaT/C5ogim+NqexKpb048DKTLM/Z5\r\ngke9TXZsW3zafLJTiXYbk5mPu3i9FBG0SdQGAOAZFQSre87SueZcQuzbvzFb\r\ngC6NEk/U6QsWN44HPD1oWPnXQaggkI+Jmcen8NL8EJReUwFSlMVgeYr9FaX2\r\nW96Ffb2CAsd5BKOJ99c3Sjx7paVwicTS+J6T7e80rQV8XZy17wb09eD8xGsu\r\neQ4++iERYeVYz2dmanCA78poGxQBh+Vfijg=\r\n=qZwT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"cfcdc7fb74d3cf60eae8dd0b5a626d67ed180d42","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.51","@storybook/addons":"6.5.0-alpha.51","@storybook/router":"6.5.0-alpha.51","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.51","@storybook/channels":"6.5.0-alpha.51","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.51","@storybook/core-events":"6.5.0-alpha.51","@storybook/client-logger":"6.5.0-alpha.51"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.51_1648224718330_0.20888872467007857","host":"s3://npm-registry-packages"}},"6.5.0-alpha.52":{"name":"@storybook/ui","version":"6.5.0-alpha.52","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.52","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8260695e1639e41f27c9b437191d4e429641a2ce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.52.tgz","fileCount":10,"integrity":"sha512-wiV9bxwEbq1rbeKyarKTuZtj1WYQz3Q2VzDvxzRSMO+XtLjS4GfykHygndLPIj15dicRsU+zeXdSx10+8eJ4lA==","signatures":[{"sig":"MEUCIQDqK5dNm9z1TZP6vwDnk3bWJcnejJTvggNaSKnK+s7B2gIgTs6r3Jubncgw8Hh7UYItfN9SogoV8k0+g5hqaHKIqeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT3DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjDg/7BnikXv+clBI/hyddDU6kBGIBJm8ghlSS8zxOKriJou4pQvod\r\ndvAlCOfvXm4JKdavFf4mkvtkFZqEsBXqVqxNRtr4f89nrEKinu4jR0EroxPS\r\n0TmCGGIXNDzmHs0AQ4t789rUxy6MYW3NA9IQvolHiXwaZ5DMFrKJVoMNr6GF\r\nIhLNL/XKkUi1XIlyY17co0nt1bupoe6RvZ7/0mBOnjHpwtcGigHaPdBRc0DY\r\ny9YH1bEMJ7MDsdMBW98EM6O7xyGTk41Suyf4cfIp1hYsWYsYpbk+q0QYaLJO\r\ndCtRjn9zO/b72d1sqsZiur5kDgS9qI/hYfTvNltGU/ahrsgNgAKgRd6tEzk4\r\nlFdsPd45sCA4tEpYgHj2Po/8PGMabUSYtxwQxHNf8W7MS61mRoeuT8rqWewc\r\nsZxoa38ax0+4yjUb47Dpg2kKSix/UziZWVCvVVmXDCIDSCimhMmyixg124pk\r\n25wfah74E36mTAG9cB4ifXHJSBvXauCQxgFpgBIJ1uMsx7dsKI8bzxRLjx0O\r\nksbDJYPBNfl88SrVbGI+qHP+Q5SjzZr+UmU5ECD7I9uMEQC2n3drrpVkJiDL\r\nKqVL9SGox8cg+atltn/PFeRI46cWNVQtDcLyZZzURLAecFIZ716+vWR9qcDq\r\n3nNxu4TBwxgBIG9ky/Q0dFYL/gwaThDn8yM=\r\n=kh6i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"863b3811b24a4703645a09286059bc6d95bd2e65","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.52","@storybook/addons":"6.5.0-alpha.52","@storybook/router":"6.5.0-alpha.52","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.52","@storybook/channels":"6.5.0-alpha.52","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.52","@storybook/core-events":"6.5.0-alpha.52","@storybook/client-logger":"6.5.0-alpha.52"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.52_1648704963267_0.9117041888216648","host":"s3://npm-registry-packages"}},"6.5.0-alpha.53":{"name":"@storybook/ui","version":"6.5.0-alpha.53","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.53","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c6fc26aafe77391d3dc71edd1669577d34ea9ffb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.53.tgz","fileCount":10,"integrity":"sha512-G5+uZwmXgGItL2emFDYQS8QdxA2vjlXzqBiDFvlrSmQWsI2dp39x8VjMg7HUJhTcNSvM3AD+EnzpeCk+fojMbg==","signatures":[{"sig":"MEQCIEu62vpGzd7dBBGkkKGsFmhe0WdG4LN5IKiVv5sHqIkeAiAsm/wfm6Ov+rhD2EoEQziBkxpp12ge5pd7aC00R/v+Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRnFvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfBg/6Anj+qsE43nR/nIQeo/KKJwHsckhtToupkHp+dwesKYTouZPP\r\no0Omqm2BvBpbYIGBv4Jn8Tqs3jXpa+C4FXDmAlDx1Rj7KLy7PeGiI4L3drOm\r\nhZywIB3/VHmq/o/HNXJVHkc4/tAaZXLvaHSw5wS/OEqpEi4lCPcoMcx1XX5V\r\nVF9BYP99yI56qEi0YaKMfrd8unbRm91vSo2jakxuKMhmcy1sXMQ5dW5vSr5b\r\nHw8A+rA9CSP72kY9tUc57lkyl7grAuoYL+ph1lKQ1sBvpEivUle0tusJRjpX\r\n0Xp5TrquFy0U+S5JxXVLckw73+1LzZPx/3EHFP30dEa+y1JVPMotEoNKmmzn\r\nmKCMT7mr3fhe6mD6oPA+ZPzumIcVF3BTMC18XrTrpWgdqiVW1LxXg4AFXcpQ\r\nmMSR5eTHnM1m0PYE4MlZZCYaPxiP3O/pPfk41CFwAalCT4mRIlbtAxsIfRqr\r\n0gQyDu0U9dky99en+hC1v0ycnItGC70qI/EpoGvdH3uqneIcB9M4zYY+ZMQw\r\nWQE4Q5R034rcC9w3KoN/JPqge8teon4ELNq9tBv5tStkC9Vt9Coq81pHgdgA\r\nhaMLhQDhjHzkH9VED/ZHQ+6jZuzdZRGW/AKs5pcKbjUlcJyL/seZLx3WKt88\r\nI/VeNc3CFkxBGwJIRCvQ4xRuoQIVc+5AVIo=\r\n=1VXi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"652768b3ff83a355651d5636ccc4d78bee2cdbf9","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.53","@storybook/addons":"6.5.0-alpha.53","@storybook/router":"6.5.0-alpha.53","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.53","@storybook/channels":"6.5.0-alpha.53","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.53","@storybook/core-events":"6.5.0-alpha.53","@storybook/client-logger":"6.5.0-alpha.53"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.53_1648783727149_0.4267645484269331","host":"s3://npm-registry-packages"}},"6.4.20":{"name":"@storybook/ui","version":"6.4.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.20","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"30e8fba0877b66000841046133d3dc098a807d13","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.20.tgz","fileCount":387,"integrity":"sha512-QY077l+S79RtdIdBahF2zu1lKqGlBqHeyB3k4W2nCUKJpqmFyzEV6SihkOZyKKe6dX0xDLQvOHIgsSK9+rACfg==","signatures":[{"sig":"MEQCIAEE8EYo9ssGIBSmIAKf7pZdpY5gYsrFX50X5JEZGB+lAiAHjC3ktm01v64c0hmhxDWCyfMigY71RScEc/jK5IdoWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRp9WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr03A//U86EQuJOakLTYtqORPP5eNnxtBqM/2FROpngXjxqj9EEEyTA\r\n1amMZTqkkcRKCgjCvjdhed3CFEqPyNjpjj31IH8JseJaTXGP2fUXZcHB4zgi\r\nxtsH5jFCJPS6RX+MKi4Uk4IAPE9LJNqGqipEPJv8zT/aC5Y0mFqj8FVHfCqW\r\nKcJoiQAko9jME9MRex0PTd/IZexGn7bQkl3xbgpdQhEia/+AFkYivTCjnwhf\r\nNWj05bMZ02bW2wiG1awqWpbXNidwMfNNd9Mnp8YPgaA5Af54ebX1F5YRP4sz\r\ndupwLRUEibjb0atIoHhekQ7bR3iCCbpRXsrXqi410gkHECvmcv9JlmkIS7m/\r\nwNen09rwOmSmLMbzptG5GHYK5U/XLlBjvIxOEwhY+kFolIZVnzqXIWhEpHye\r\nP1wYRUcPw3mgHqornI/Q+X1MVTlfkqgJ9fVP+bMNmbFkRXc/brfyZVgSSmF0\r\nZ0IRQHkCCRN7vrCFsxMvpx3GPTwFAJVLBLnUsz36DGuV7Xsn4VI8tRwt/Teq\r\nFPPT8vPDxsRVxyJUomWJiz56U9TVr1Acz7MdohqZCGdWXXlRtyd8w++OIkUD\r\nkRt3sKBOppapcaabUxfmwVG0gG5uKiL1H8WhoDlqHQg74+tGDBtdfE37EMxL\r\nRnGC6sZARDJA0TbfkDvRYBk4DhDHkDE3wwE=\r\n=waMA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c91a26aff48ee9c5ee555c4788513c6cef16e0a9","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.20","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.20","@storybook/router":"6.4.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.20","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.20","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.20","@storybook/core-events":"6.4.20","@storybook/client-logger":"6.4.20"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.20_1648795477825_0.7493497994252984","host":"s3://npm-registry-packages"}},"6.5.0-alpha.54":{"name":"@storybook/ui","version":"6.5.0-alpha.54","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.54","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2a79702937ffd7d7ee002d4b33859584cf137e6d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.54.tgz","fileCount":10,"integrity":"sha512-+NIg1kRk9fRTlgC6bRtpAQ2J5v6l5zmnM9057CEd8V+PDprY6VTtv5gj0rOVjg64xnrbEEJ3N2TaaL0wY/SgRQ==","signatures":[{"sig":"MEQCICQ/nqyCuWBLichEVuj0wt0l24eg0Xrl+ZnfxBwC/QZvAiB9mQp+ns7XmFJybpQMC8JfwrEfEpBk5DfyLq1zqZnUGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRve4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQBw/8CTplKN9TG6B3YF8f80iSlkXIPNZ8PXbJav9GqJUkl5a9lxJx\r\ndIBUSSWLZd8UrmpRPlLCNkekJ5KYg2ujavxBAEJZbJleKTY3DIsQ/GYp//Vn\r\nI3f/khHz3ZxBoW+PuLP7I65+Nqk7tF1toV/rwt6rwoskto8XAMeIotwOzxsj\r\n/TYOZTrHjHfpBnzen36lVE35SsskxE9AISxhqQEpSFVXmauRSR65BvyVvVKS\r\n6vNaUZXSkbcFl5QLDAlfG7haGsPMfVbRG/evIo9IG2Yb3/JRwLjntmbU4Cvu\r\nExkhGzaiQd941Ew7WXPVvfgJFmuiO8EZLf3E9c8daZvoMorJYqoF5NaYe0LE\r\nMIUXo2/c+3hS4kETGXkZZevp+5QtHUF4npzORkX6/POx1Z1gL68zvsDgyI+z\r\nTM8dl9yInn8/Xgnep3iE7V3O0aNo8bGwlhmKfna+xdko7SVC7uIwr+A0ke3c\r\nTROUiuckk3qcOhThw8AjlkzXGUgyKVY2GqBiZGgJx4ZPNMQsvywW5PI9ewqD\r\nDHR79wnGT0+EVSGRjIJamH/B8rwDoz5BpRnY7zUQepwAc1QlZWr2CHdhSkmR\r\n6tdJ7ppbNItJ1goQpi7xf2egd3hpocT/Bv3HjAg13W3zQ+YJbvLaCadolAya\r\n6dFhmK7/73qNpWjHJgAVQpM8hlQ7cMqBDi8=\r\n=0Vvo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2048f366e90e668c3f462d81f5b372a19902b67f","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.54","@storybook/addons":"6.5.0-alpha.54","@storybook/router":"6.5.0-alpha.54","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.54","@storybook/channels":"6.5.0-alpha.54","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.54","@storybook/core-events":"6.5.0-alpha.54","@storybook/client-logger":"6.5.0-alpha.54"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.54_1648818103589_0.714400084096771","host":"s3://npm-registry-packages"}},"6.5.0-alpha.55":{"name":"@storybook/ui","version":"6.5.0-alpha.55","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.55","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6be0ee665a3f2a6235c101b4c49534baa1723307","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.55.tgz","fileCount":10,"integrity":"sha512-EbH0/fa8/NjzTiGSik69w2jr4UsGK1slQYUer9nU+8Gb6kcsBB5hIfqgc7X/u8u1XqOiOdKzfhjQnYuFsp+IGw==","signatures":[{"sig":"MEQCIGYxMkV16MlUIbbWIRBKXPYB5YFk9Jcpb0vPxGKG3XegAiAX+61eqi89GpFT5ab2QfjwXyLsbsgBf0XgUmUPJLLrMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiSR4bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXTA/9Hc7234gRf0GpLn8/E8mGvblRGFGsCbP7I0ZlocKthStBCGia\r\nFuxKEZP9GrTcSoTph3CTeZcUAmV87tuu7BgtW+T6V6grFpmVnIH944Mo/6vL\r\n7vpZy5vV+WdPh/K+RD+lpBQmyWkPbYRFOawLMEfRtVBgPtVTZzlY7O7SS+zA\r\n1irrlT8Jz7B64zjEfzICSjd+7oWXVuj8CjEFY6+lXORTjDvb9obF9Wz00j9v\r\nypcoDVcEc9SgQeKMu04+zmhThTRMqJHH2jeZv1Mm56s1J4ecFK3mRsgZTrSX\r\nPqTta4nqXCZgv8VMkf3EEMHkcvGSDtcgvE2OvRvJGuC6IleV0LBFXEe5IWBg\r\nPJzXNUQDzHMKvvKGt1I1SwaCGZAA7tGN0pzv1HjO7HZjV0tVRoI0UW74IK7U\r\nHCUV5nMXBLa6XibZwxR3Bojls4BC7MtQQSHGXGFNEmfjWN9J8/kwc+GdT5w4\r\nQ68CfT+s+8mt4rpiSQU0Wya6Ibee/ZB92ExlRqOE9TjpZX9zAw8MK2cnwRrK\r\nrHCuXM/1yb2obTLPFt5R2J9gxgQtcwoxtyqbWyXzlGHL4J0VuNdb2hrL/jq6\r\nkjpJ5RkczeFMqUUjnBglD4zZDZ92BejyiHdTmVkJO9HCWWHF82g3xjT7r2k/\r\nKBvIffaA1wV6wDRcWs83ZBxHjBp7eYiOF4M=\r\n=lS45\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0d051c3d8efb90e15d8734e6e6914b2439420953","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.55","@storybook/addons":"6.5.0-alpha.55","@storybook/router":"6.5.0-alpha.55","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.55","@storybook/channels":"6.5.0-alpha.55","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.55","@storybook/core-events":"6.5.0-alpha.55","@storybook/client-logger":"6.5.0-alpha.55"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.55_1648959003042_0.21003306555934986","host":"s3://npm-registry-packages"}},"6.5.0-alpha.56":{"name":"@storybook/ui","version":"6.5.0-alpha.56","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.56","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f4377a019d31689d68a04af098858ca144129507","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.56.tgz","fileCount":10,"integrity":"sha512-GyCgKx2dv1Q3JKDrpVuk2XlB3v2xFFCsMsIgwqv/hjnIPaPOP++SS6yXD3HVq1cfr3Od8UgczG75ZxpTqfKMrQ==","signatures":[{"sig":"MEUCIQCQ8x4qILkkwOwBBpvx15KWE9bZsSRtCmVn0N1FgQf7NQIgNJmGkymq65Q1dW4AingvUuQ3We1Sm9TDA1SfmvQ5H6U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTGu5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrF7w/+JBfoGVgvJGZv1C4xqQFkdbfKPMfcGfGgHDZVACw7ynqB/Y/v\r\n5bmcoLs5qpHW8OPlyuwqlPCW7YsfRdHzbGCghybGDtGp4xOQ4wdFF4zJJBLG\r\n1n6gcT0R7Uw9LAVWbPMCXlF2vAx+57fYyl4jU/EpiQkRriHOHtJ3oWXgiYXP\r\nFWAFKoS1yiFmJtPZv3j7YUrTYiQyFA/cdK+NfSO8RcDqh6+AfG6TG/nFijUW\r\nIk7TPINMyWzcoJCriYEbND2Gy4Xp/iL68+HGQBRiP0PDD59NQ2+e3p9RAtCq\r\ntRz7Qx41ls4/T3b0DPQmeFXExi3LrC2ma4X18VlIP0VRStvUAf+HmNI0bYaK\r\n7SfLuIA86jCuTw/7VNZwkLegV5JqScRt7GJK+Fgm0xeXenJlW3bapWmsg/I8\r\nncSTk0E3TIfosFJDc62vOi/2jp9Ho/cIN2yH1FaDlAPwZY+Lq6NmuL4Cpoon\r\nloRQUCKxzO8BkCMQ43mYEdx4pteo4fskGbFzz7QzcDbhxjCW2oM+4fcQTUGR\r\nnAVRBg4qaqGA7/BrhdmFUo1d8QddfkLdJ/4JIkJ6BQIrG39y5wT7jShlfFtW\r\nhJrUrnXn074EW37/3WWI1EOtzEQFlFCk9sFvw888r4o8g/yJ7HJHOnFRZ2IA\r\nJnBmJyLA0dzJCEJsUtrR4lySIAA5nHcdSYE=\r\n=twQg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"61e4093b46a23f03dfb67e46601e1297d5d55190","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.56","@storybook/addons":"6.5.0-alpha.56","@storybook/router":"6.5.0-alpha.56","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.56","@storybook/channels":"6.5.0-alpha.56","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.56","@storybook/core-events":"6.5.0-alpha.56","@storybook/client-logger":"6.5.0-alpha.56"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.56_1649175481764_0.16068839120857903","host":"s3://npm-registry-packages"}},"6.5.0-alpha.57":{"name":"@storybook/ui","version":"6.5.0-alpha.57","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.57","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4354f451ff17ccf3c02878ac0c2a48e7f4f88d2b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.57.tgz","fileCount":10,"integrity":"sha512-ANPFK/zy2u5sbXiC1RMp4SAz41Xk2otq2JsBnu7r06ViIhuC0T3ySWgu/0MgyaEHUQlWrR8dEBGb+awAn032pw==","signatures":[{"sig":"MEUCIG00PhiBag8jZTASjaxTXjYI4N18WP7SuMqetNhVal2HAiEAhXvLrpIEXQAbY+oHLcCOZT6Y5KDoU7Zh2OELl8kfV/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1797927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTPr6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSxA//UfLwH+CZii6W1aaP2ukLIVajQItRQttyW98OjacUQqAuwew0\r\nIa4lMFS1FfNaQPDzEElHzaIkhb67Tc1ny7ZT65MjE0gOf6mnCJ+IikLDIlHU\r\n8k0r8Sy04cqzWr33tSbqSrQFL/HLMzlDYidBHbkzv4fqEMQOXpBK6GjlloMK\r\n7qC6YDuBinz6dn4IUk8+qKIxbj8mwtQPBstZBatORQQ+gw7ShoZ/w6YmbNhx\r\nfCS9E+gFqRza9YqXZNi+A36SnJpvZLvUB4Paz9hczXu6aArUt9c2/CbNbEc2\r\nICiwExy4Myd1qNEfFZApC4KXSpwxifNDwUCsWMYyomO830xLRVqqURzxPzw+\r\nQw78tlKSgU3dRWklyXVsWnbkXW0ZZz5YtDCJA2IUEKf6wKgQ/OvoooGWcRZ4\r\nzcIBNQlMKzdMi0hqSyrsiOkyA59fUp8zUNT9Jjg0+i4I86DtVJOuzAmTYbUQ\r\nCxsUISkrFsQoURQFl6UzhBYVFnpzto/jfeagPDi1C4Ib++wvOMOaCb0T7Bjq\r\n7tZ1ljxE/ObldT2n6oVCGnk61a5b8vuzjoJz8MlgkjE9hY1F2Mcleoy4idCu\r\nxi3qAO/aEVfj/6bTm24U3JEW+UfGf7PUzU3tODEA2m41Aw+CcajPIsppibm7\r\np9792+AZIwdzzwTKBURCxfE6ZV5rqr0RPlo=\r\n=veW3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"896ac6a6110669efbb754ed62ed211274c0d3547","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.57","@storybook/addons":"6.5.0-alpha.57","@storybook/router":"6.5.0-alpha.57","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.57","@storybook/channels":"6.5.0-alpha.57","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.57","@storybook/core-events":"6.5.0-alpha.57","@storybook/client-logger":"6.5.0-alpha.57"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.57_1649212154355_0.729320396288927","host":"s3://npm-registry-packages"}},"6.5.0-alpha.58":{"name":"@storybook/ui","version":"6.5.0-alpha.58","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.58","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d6ceadc4b07b893f3b14df2f597b28bf4399c964","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.58.tgz","fileCount":10,"integrity":"sha512-iF9L8tuUrYqnDs7VTmTZkWreMst5/7HHPe8RcHcBqct4/ZasVhcFEmATkyfFkS/FG1krVFBw+E5ArDBK7Xw/Yw==","signatures":[{"sig":"MEQCIBlrc0uCXxWz1Y5tcXt/Xq2VM6kDu9jghjgeulpaAZ0JAiBcwdwdcwjN5oOjvXdyMa2lin52kfDWWOzAVoaCOVzy4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1798291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTlv9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAUw//bQSDqnm3EERJIMTvgUbGBXqvyzQ5UwxR2gqeBfTYZ9s9/mqQ\r\nDfJ6y7cBrGkAWwD6EfDWGCTdCwHHCEsJBWXFOMIYlsTm+5puDqcwiZsVmHc4\r\nGPztgffQVILZbsvjGHJIlPVamF4tNhq83kX0QwwH1bZ44YFXxNpnLvhFtL/5\r\nB7AmwGq43PfXk9I8/MNpOZRiQqO6hmSR8cWKuoBsJbiF/BvE+olk8u1WUaSc\r\nItfCq9a37tDTKGBKx41RUGsE9Ay5Sd5pklOEp7kKMtEixdXJPNoSUmEZ6NpU\r\nqhif8HDCYpq8c1Yld8iwT5ffaxWiZCWB059HD4fAjRdfDHKhRVMys5EizdH/\r\nPfSOZ3E4Kya0YXWqF+Jocr7AE5XP6PzRtZp6Z1kI5BDfbww/JKsuXCZMj9Rl\r\nlwJNeoHYrWBOYrDLItXFz8IVjF/5/Q/T2P/ggVG88pUHwZyHEdRjwpMvFScb\r\nikVZOhPj7eu9Wfp5qLlLoCia2L4BL7cicIbtQu5+8P+VlSd+Vu5xXA25ACsI\r\ndrsCBRoMjZJiJkHXSQhhztsX0lMfB71GaTP3k4bqCSg9GiAvB8LFJ6tYvjS+\r\ntlze0s9xzD76VOg97rsuAcvXNQcbR2/vT3sp1dPTQJGSFjcwQIWdIQSh9+p/\r\n2LFLWJkIHI4+Uhq2sd66WH5LPH6FtDCNPTs=\r\n=dVBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"bf25496b2d3d2daa91ab211a9b73b1f4d5b0b52d","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.58","@storybook/addons":"6.5.0-alpha.58","@storybook/router":"6.5.0-alpha.58","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.58","@storybook/channels":"6.5.0-alpha.58","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.58","@storybook/core-events":"6.5.0-alpha.58","@storybook/client-logger":"6.5.0-alpha.58"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.58_1649302525703_0.4800995878787062","host":"s3://npm-registry-packages"}},"6.5.0-alpha.59":{"name":"@storybook/ui","version":"6.5.0-alpha.59","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.59","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5f011b45c9fe2d134cba1e77771c69e84aaab6a5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.59.tgz","fileCount":10,"integrity":"sha512-yEQo7Iu09COE+kvb6Lv24KYGxIzgI+aCSodWmQzsRs1jpcrZzbQzEX2qO3y2WFpDhLyq7kXU22XUyaeMBLojsw==","signatures":[{"sig":"MEUCIQCVDqlILzHYUa1Amg8qtvg3YCjHaHzBV3UtOyAQ3igWegIgF9YFsleIe1D45gg9Hak6ftFFo0bXq0/ihBAtWAEESxE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1798291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTqn5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEVBAAn+JVXj2KPlNKfrRnFKS4OyhF3RkiEH7K3gtPFom3TsnMhdsb\r\nwIg2b2+S7nX4l4SaBDORtF+ZLt0NTVW9xzzVCDWMBDHFrcBIL47gHVeZglBa\r\ntxl+79lDCs+22U8XIr00BdOjAhYucp9BfELKpItyjx234utHTT/fkslgI9oO\r\nutVWVc1cemxOQZ87lDbxb+Z3Tf6wVbnn/5owiOKSP+OcEJx1QgZQkV4IDqpC\r\nj1RoFoA41A5oJpuczhd0ieBcxwN/VwZ37kaVhZgPzl37WjY/sJBsLj821sB1\r\nq/dL++s9QDq84MyLiL411lm1C4HbTBh2kSi1JKO9NagBBCZ6a6dt0a9hCNeT\r\ngrFWOUKwan5xmF847wiuM6GrdL0KxF7vR++SXQ/cFJ66BRdkYIeuNcGnvWhg\r\n1DgwLcSX15S8dtA8Pap5KfkMRe+QIU5ViXGfq8yfOrGvuMEomnwHZbGoFE+k\r\nSb02rrebytSazGr0HyBNLdWwhEJ2f02e0WzmnTNIeEI2M/PxnrIkF4D0E9sS\r\n1TSkzg1A+PhgHtzqnJZq5rAjfTq+vZEVoTXAEB5tfEa+Jub/xzj5UmG50fFR\r\nkNxYXLW81iGpXrBVsKlEsHyyPvmGnmIe41Roy9+1yNRTFaaiAmIiGBNCJ20X\r\ni5uCciMXMSgtTanoDW9sR2pwSdd4dY1DnaI=\r\n=XbpT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5c572a448ca6dee4e486944b7e1e3cb17b09d9a0","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.59","@storybook/addons":"6.5.0-alpha.59","@storybook/router":"6.5.0-alpha.59","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.59","@storybook/channels":"6.5.0-alpha.59","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.59","@storybook/core-events":"6.5.0-alpha.59","@storybook/client-logger":"6.5.0-alpha.59"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.0.5","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.59_1649322489534_0.8699915852048963","host":"s3://npm-registry-packages"}},"6.5.0-alpha.60":{"name":"@storybook/ui","version":"6.5.0-alpha.60","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.60","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"45daf90df303d0852560a9ea9c9dccfee8e1df6a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.60.tgz","fileCount":10,"integrity":"sha512-KlfKiziXKF5luWhlKAdf6vkPcaLwaiiaDx9EzmvZnOdATvzsTK72xpfVa477Mf1WKURmooDBqDbnJARc/7pBsA==","signatures":[{"sig":"MEUCIAOybuZGWUOBkYv9dT7fwyqGxCJkN2+2fpVVaPj93S//AiEA1HxaQrlsdHgrN93E6FhXTgh1RgVP6VXsAaQRfQOCDng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1801297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUH+xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBnA//X3OSDG5apRnpcc/6dNakUTVtX2b39+J6hwHUZYdIPuT7rlh0\r\naQTVeGxhBjpvSNVftvsSGC87KfK7nH2/ALCCxO4ZvW927XOF7H8if7SlMEFX\r\nc6JpHpRtp5ZRc70srAIQ88hvMsK/KlAlFfSy0wWTon45N1eUO2dnocQ2FSQ8\r\nT7fXUKQZOXcti17hdnKEUNyGgzGaEOkPSIEKUx892nLkmf3M/MNMwdPW0Plh\r\no0OXvKQPE/jfTVM4caVfWx5Ea0SEZo7D00OvVI+LNeCjkKw3OG6xX6eDJ6YP\r\nJQHdpmZ25aPNDJNiwPmSdVYe/b89hwfw6rpcw9RhNZcgQYAJfBCIP/XtV5bq\r\narSdHt6yKphUIsUJe++h4RLom5MhBS0u5uV/PMwJrWmM9fkQ6ctdZmXzMCmI\r\ngGzBjClKk8SxYTYYc1b+6Sxu3NJXJ3rQIIUHSbg18jOn+HPdIXsO/aN/tE9Y\r\nitAalJHSdYtG4FxfM6x+LpJbO1M/FwC6h5j+fLc6LA+uAlkmSOQ/JAxA8Qrf\r\nfeNXOBVzSKP41+/A1laJl8RXplHDzaGr04EgIytiJBHZUYBJobVocRVXT+2Y\r\n0N2IAfFKMx+bpPPrB28ZhS3+emcxxrEoY3aeB7P/1DK2P14vX1ogLg9VEfx4\r\nmj6yVNzNzo5X53eZfHdYc5DJz13dHnxWHL0=\r\n=Qt8r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b45a2371f8c63aeef298b94a5b5237575007e401","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.60","@storybook/addons":"6.5.0-alpha.60","@storybook/router":"6.5.0-alpha.60","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.60","@storybook/channels":"6.5.0-alpha.60","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.60","@storybook/core-events":"6.5.0-alpha.60","@storybook/client-logger":"6.5.0-alpha.60"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.60_1649442736924_0.9960417024963908","host":"s3://npm-registry-packages"}},"6.4.21":{"name":"@storybook/ui","version":"6.4.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.21","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"03b0ba66663f70b706ca29481bedf08a468dad3d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.21.tgz","fileCount":387,"integrity":"sha512-jjEEFDm8PAzscn5dN+3YJap9033ce98YYC9FCQVF5sB41CIwI0PD5LUafxWbaxQdL+t/ZlRYXNz3FLNFHMwzcQ==","signatures":[{"sig":"MEYCIQCagrlKUreyi1oM+NE40PV7gspVz0ejwQVevw6bqwflZQIhAKckGFx7jRgkB4YCbdcEj1CTal3Up+DBzgtA85xwXjic","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUOsMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRiRAAhpWd/oitRMsbQ/ZFioO1pe+Uu0dlOJYEOboNCmVW3/7rzKNn\r\nEHzf0fn+UUBFYy4yV1ACwRJBMH/XYBn20ccwJg4ikhAx+7/OeLieFZZqg94G\r\nLdinlDcfnt10bhUqKvdLOVrPP51tjGJh3pyrAWq7/P2WcxHQae7mgIk6qYrr\r\nDkfoYNl3x7Um3czFvIjnkS//uV1GC1J4vl6hR4xyCg736nxGvAapVMkCWo1Z\r\n17VNGDdcpMN6wjm9eMBQhxjLO+bGh+gyZWP72w0PK1o99FAEi+xL5X0L4h04\r\non5+vy/k+/8r/LmepikX6MzN/2KyL4bSifSwi/yMNmms9jkEOz1Z8dphNvYb\r\nU+F18WCvtw/dxiyyp0FJME6Lx33v06o6rVGP4L6Ju3mq5tfNpvfKOTiXauCT\r\nxtVgYF+H8PwS/mQinXHk8Z75AneLIentv8F//H2qAEQALH1D1pdZZCkMcNhe\r\nsovu1wRqKXgMh8kIVus4dkAZlrMQvJBmepOHdTh7oO3XEGsc6KdjivDLe78V\r\naiAlbItCljFohuVe9TZ32c2GAO2+IVLHtWpNfKn78JgMN5fkHow9S+aq1YsP\r\njmzdvDOHrVKy1LZ1vgvYhQNrrXpoE0myipy8/4iNZsGXgVHcqPfYwM2pBifA\r\nVS9Tl+dYPupHxb1PUtDRFO5ylTWNeyPMRVw=\r\n=CIE3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c35ea5aa79312b8346f0f3cd15a1545db676b105","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.21","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.21","@storybook/router":"6.4.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.21","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.21","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.21","@storybook/core-events":"6.4.21","@storybook/client-logger":"6.4.21"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.21_1649470220662_0.054245272307438475","host":"s3://npm-registry-packages"}},"6.5.0-alpha.61":{"name":"@storybook/ui","version":"6.5.0-alpha.61","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.61","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8ac782ee7b7175bdac0c45c8eb85b88afa557fb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.61.tgz","fileCount":10,"integrity":"sha512-1FYjgXEFeAVfjco7Ko6E0ne5Gd6H3VZshYOVP/Lg4axnwpQ/+uPkfbfAhd/uf2u4EqnIevkxZKbIJDVRT+AhCg==","signatures":[{"sig":"MEUCIC8I8A3epkcOvFStbCfxPUNbd3KoTP+foal1n0Z50qdlAiEAvwUExOyZEXZecnv3wvffuwuhzkRrYSPhCPRZRP3+i1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVFROACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJhA/8DmY7xxeNBjbvEyJ/YQfJJvdOd09P07IOl2Bzdow5kKKViq2h\r\no44w5dmOms8XgNTNe3XLe5o7Rq4GW0u4UaeRajvD1uITVgSnuwc+eOrmhs/k\r\nAFSIqZ29HXXnWot7Tt2mHDG7U/tSAKwHi7r3dk/fpuIQo8nuTXWQiSpVXyNo\r\n+aj3nqS07rlAkGfh4VRa2HkG52tODia9v4OCqHDDLojwyCCDnPjJ2TP2yL/W\r\nnNqHyJhNIqNLOooyPEe6UHGRddCklyIrmveNtaLdk8c8Nx5x6nDXA1fOt5YD\r\nAn02Y1WgwZr8cuhbrLnqbFrt0o+zfUlbWIAvlv0pAYRNRAKbSGLTjYEnMrcp\r\nzOGc1lYd5jyGt4Tt4h97pRWl2SQ31Gxcmc6MFJI/OoSjiBByIJ2bm3UMgdTu\r\nhl4rz00E52lToghhnvJ+Zz5X/gssMIyYkyFp8IZsC85HpjYTPZB355lZOiJK\r\nssf2SLr6TCWtmV5fZm9E3xlPfqFZ6moXEQsaZdeaDuzrsG3i3enrAlPsSuv6\r\n2M1cI2QOKGjpLKCzgnB4zzpxdB8XuTBHEluNUonX9AwBgHHOAeMDkjfKDxtz\r\nR9s/oL4vS/YwEgaXWiKVEhMasVH2AVt4rEALUQRZOc+nLunD68s880iJK4po\r\nStFqbW8THW2Ui7+h66imjtnuoc2+i/lNkKw=\r\n=dmgQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ed6c89be975f7cd6ea28605efbb5597685b68d40","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.61","@storybook/addons":"6.5.0-alpha.61","@storybook/router":"6.5.0-alpha.61","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.61","@storybook/channels":"6.5.0-alpha.61","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.61","@storybook/core-events":"6.5.0-alpha.61","@storybook/client-logger":"6.5.0-alpha.61"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.61_1649693774533_0.4904656644424572","host":"s3://npm-registry-packages"}},"6.5.0-alpha.62":{"name":"@storybook/ui","version":"6.5.0-alpha.62","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.62","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"04f3614ad0422743d931ac8b0caa385ea7de8814","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.62.tgz","fileCount":10,"integrity":"sha512-1CLpZGb1OLRPtAS9Ld5TKi7W91sux3MNxpojzrzrsDf2bAyRCZLiDk3eGiAiz5l7cmsDkHC02xAZsY1/yyE9Hg==","signatures":[{"sig":"MEUCIGLMDjn/JkHLhBNpTigHIlTuanVFC9iv1+ETXiEWN5YPAiEAheVvo/N36Y6zgSp49iHtn5lftSD3XsXTJdtRYWqmUb8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiViaTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr86g/+M4Tgj2Sm8hyo5BHqeZ32brZMiYUULZ8Z9u2jbIvL93n3nTXd\r\nWjk65NddWvCsOi46rbwnAcGnQopY3ebDakRDSOcISfhgtKQ/H4On/LFsZ/en\r\nADE7wVTcIbF2bdZyynCUH4KSLVT22p1iDc/czoCZK091xa1t6NitHV1Bk2kq\r\neaadesX/GxOKTxVJlfARYkbHUTt6tAf/t2cGAXFPqaDvr9d3m5TGgSRpujuD\r\nyqfzX18MVAU8RmDH3+TD3XeO5HP7Z/oLOceJn+9A06wNX+bFYls68GpDGR5i\r\n+IRuQaD7IanKhYyaYbUONIIHTXmbkk7MybzjFCy+ibWlcAR43sjlqmk2/wxW\r\nKLqCPyBsdtSIH0sw7Q+KDMRKzmOzZIHGRYEqJr6rsDtDbRA8k3fpqbhu/5Hj\r\n3UlGLZC2nI160o4q2RIXNpEq0smHI/7nl0RAJwPRuUNJa7rdE1/bYWuglYJW\r\nxee+Ky3k4edrOTHt1XLU4SU+I6LPidzl+OnpF3bQYG80EZQd5dsjQCoAshSA\r\nOoGAsIRLo/2UcgIXpwFjUBDkFwPg413QWfaE//45uJ4fPIbe6/fnG6D78c7n\r\nqMM8+AZ166a1iBDSgCpGYfk0xcc+vOmV6AXe7aAPWK+vCJxDxfdS5OX7H1x5\r\nfAUtecQmukt2fI6zrLKJEmrBwyTX0pYVpMA=\r\n=LjVA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e6025078374acd23cb15d3480c882229742a7ac1","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.62","@storybook/addons":"6.5.0-alpha.62","@storybook/router":"6.5.0-alpha.62","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.62","@storybook/channels":"6.5.0-alpha.62","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.62","@storybook/core-events":"6.5.0-alpha.62","@storybook/client-logger":"6.5.0-alpha.62"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.62_1649813139544_0.4177707798864567","host":"s3://npm-registry-packages"}},"6.4.22":{"name":"@storybook/ui","version":"6.4.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.4.22","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"49badd7994465d78d984ca4c42533c1c22201c46","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.4.22.tgz","fileCount":387,"integrity":"sha512-UVjMoyVsqPr+mkS1L7m30O/xrdIEgZ5SCWsvqhmyMUok3F3tRB+6M+OA5Yy+cIVfvObpA7MhxirUT1elCGXsWQ==","signatures":[{"sig":"MEYCIQD+ERTf6I7Xkz7bOQLl0yChXCXynxNON2g9AVOr43YfiAIhANxYjlN9/XwtSzm5spV/EaWctbakW3CAYVJvLlEX4LDX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3637283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiV6djACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1Ug//UcX3F9wF5R5j0S30mUeBqiUGnSfrRnEPnn+JvcwXsWt9ypbJ\r\nn/7DSM6hfR7yP/FXK8Nm1qbT4f9G2C+kKQCE3lxWIaL049/Dd6C7Mrw036zD\r\nKakQMhfboSma+Q/uCbNBgBkqcRSPQw9MvQRLAR3/LdK64QRTSGCW0LNPKX6A\r\njMerRbomsizrJnVi+fS8oTNxM7SoY/xxARu360yw4Fl3pCuXhyUBo8YgS3dc\r\njrs5taOLcj2kmKFHecNsFrBQ2myoFZTT+0Qr03zQ2bOuoX3Gxjlv8K/8QmSm\r\n8bJ/xmWTmgXM2D8QO38DCXydlikQyltLXmWvdwUCyu26TkD7JatMV1rXWvVC\r\nCtwWaXFhzfwa+jPIMZzCKwgbDt0gxwSANwX3umL80sibHYvPaVcOaxkDNYkN\r\nBtds2+vlVh1bWiiQXnoiUW9vjZQ5BkH3ABbtrjZ77Eekw68UA9+8mqmI2xCw\r\nwrvC5V8izvnR3uLnP6f7Ul8eBW3wyNUltpbS6DtdF4UnwzsnjDyz9eKNqo0e\r\nf+zybbS00e8z3mQ4E9bVAMkuj5eew2ZCRy1Xt6JEamCv8WyRt0sOmhE3u8Cs\r\nygOmFQOh8t5LFpo4uz/qTpr6UyvQirTkGEblzx3+1XZTgLxC0YdVBO52NHxf\r\nG4Z6zDHXPyK1sn0lNxjdytqSETfuHyILGfc=\r\n=zb/s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8dd4fa6ef42f803ec276be18fb78644a827d5b74","scripts":{"prepare":"node ../../scripts/prepare.js"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","polished":"^4.0.5","downshift":"^6.0.15","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@emotion/core":"^10.1.1","@storybook/api":"6.4.22","emotion-theming":"^10.0.27","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"6.4.22","@storybook/router":"6.4.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"6.4.22","react-helmet-async":"^1.0.7","@storybook/channels":"6.4.22","regenerator-runtime":"^0.13.7","@storybook/components":"6.4.22","@storybook/core-events":"6.4.22","@storybook/client-logger":"6.4.22"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","webpack":"4","chromatic":"^6.0.2","@babel/core":"^7.12.10","babel-loader":"^8.0.0","flush-promises":"^1.0.2","terser-webpack-plugin":"^5.0.3","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0","react-dom":"^16.8.0 || ^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_6.4.22_1649911651634_0.716129144490572","host":"s3://npm-registry-packages"}},"6.5.0-alpha.63":{"name":"@storybook/ui","version":"6.5.0-alpha.63","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.63","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f46f6eaae18639774c706f938418f923cfd89086","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.63.tgz","fileCount":10,"integrity":"sha512-Wx9ykoO8Lhi9V0vC7U3SiRUWC45C/Ofq6jWHtFJ1ksMYpfUe3DUA/6AUH5LLQyq84xu4tpn9kK/rh9YNQJO0Tw==","signatures":[{"sig":"MEUCIQDyWBvcKHyl8UOYdHmCDI+DTvQJ7KaeVt+lQa9NPxrmFwIgDyGRazmVNHr/1oGtv2LKj27GpS/COyidMz8Z5lJzZxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1800026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiV+EeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoisQ//bDmGpijSqwzg8G5rlZEfJKUIBzFyFvA2ksLU8CNyUt86xbWU\r\nV2EEJhzmFpfuSwR/hDkvRW98j6G4TfOgPXiP4eqnG/wK5D8MbHddwNkXlo3m\r\nr5c2rwtMqVtJS5/IC3rJkSZXcM6lFy8GjmOKNristjxiIF0cyF9VZwLQmq5r\r\nvtwlQjwTWOF/wj7r6vqURoLtj/5ICqyx3171fv/GXYJgOk/d4/vyMIIAlHGM\r\nIG2cM0Zqd093HQLFgMfP8Fgm4WKsG0Rih3Jp32YUw1FJ6zLqhBANmCeeEAjp\r\nYOe7AOwi2+2gs10WyP44/I2i8EREwD8kDQTOmQ1ApUdzUGKN9v2kM9NcoKtE\r\n0fB8uADwRcBTuQW4q1EICx9C5+xMqvsBkg1EcFnjVUC/gUehUhF7MWtJP/i/\r\n9JQpgA0NpNhdDImCOU9SIHD/zidwMKdHucTp65VPCYFy3xDjTlGZ/ITZSyKO\r\nRC3FY5k2YTqG8JyjNlrlgBfEJ+3YIEACuvv2Zn++sKwhkZrIDsGAHnJ3LEFB\r\nkx0O0lE8CSUOqBSuUUPbZBMKxslXl1sx7PdOfzedE0eWy3IXAaCfqVour/Uu\r\nmLOMKDqVz0mXm4ih1mRieJX2ekmZGGLB/YPeEY7i6MzJJu8rUKDAm9yLrwcZ\r\njnyg0wfqsAwvHmPQ0Cwcxrgs7My4tOZ1aC4=\r\n=fIYQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"416f87dc715cae299c7b4f37f1c9db7f686d4d21","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.63","@storybook/addons":"6.5.0-alpha.63","@storybook/router":"6.5.0-alpha.63","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.63","@storybook/channels":"6.5.0-alpha.63","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.63","@storybook/core-events":"6.5.0-alpha.63","@storybook/client-logger":"6.5.0-alpha.63"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.63_1649926430530_0.7595300029060761","host":"s3://npm-registry-packages"}},"6.5.0-alpha.64":{"name":"@storybook/ui","version":"6.5.0-alpha.64","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-alpha.64","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2dc31c0a55af9906b8cfd64130d80c44b4c36742","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-alpha.64.tgz","fileCount":10,"integrity":"sha512-FQ0t8kwCdLulyg85SN7SspscXVlmNwg4+225UIKG3Dwm57U2MGm54/zNHlpDmD2THWjlPnZDCVIlJBYU1ek6tw==","signatures":[{"sig":"MEYCIQCZAdohEAhE5agbGdFLP7S0xvPTFnRckOerNguwTNqclQIhALo6SCP47Tgl0qEBQ2rpDI1qp4zTLRfIagbE+Z3RFr/n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1800026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXMx7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2iQ//alK7R0ZuYl9M5R7y2pxcuUph8yLNg68Jde8Xz0BaNn593OK4\r\naX25r9QSg/OEuUFgAsWNNC876hsZq9pDrYFGPiUXT/6AqmcelUU4ChxAjmHd\r\nmDtLARcawDMIhqGMvReLK4PVyzqH/Zvcn4gWFdHeCvkOEqfU5Kn0G/hlBdIS\r\nRj2gtbLMNnjBDoZcspJF2td8c3amS1F1OHEmMmV5JQnQiSm9RhwU77bjb6sE\r\nQOin3AKUCBIGmEFYTUbv1r/v5ueek2/DUTpjZwQUZVENZjkJiZlmgYn1rjkU\r\nyj91E6JR3iByReznT/iwLaXpQ6i+SpK8EdgGkbBIv0eHrSetaH8jHZEkSj66\r\n352Wy1yG/dBA9Qorc/0M8hH/MB0nn/irOpNXXIzqsKXi7z2t/eNFL8jEeDJy\r\nIfBQLQDhKmSMomcZEqo8jiS2APtbdp1XJLSMke0LGArac8+N4kYw9qo5ZTsS\r\nke8lXjCarMVg/GbIpnqYOj36uD01hwtHIbYOrcEwItBZ0j+OKtUeYSItezlJ\r\nOXCDm0Tg/XoiZxbUz1wG3sVYsUNCqXUcu0Eot3qYIbr07c1tsn15ErSlwoMY\r\nXstAzjYKlgAO94f/M9hnX99MG3ANce7Okqb5ME+FeAwR6i2zE+5t8yCbFLHU\r\n0hJMD6H+AlbLgiyRsGF3RI4cqWlmn95pRHU=\r\n=ahAV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, you can need to start the [example](./example) app to see your changes.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7417a230d67b54d65caedcfb584f924b879ac9f5","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-alpha.64","@storybook/addons":"6.5.0-alpha.64","@storybook/router":"6.5.0-alpha.64","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-alpha.64","@storybook/channels":"6.5.0-alpha.64","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-alpha.64","@storybook/core-events":"6.5.0-alpha.64","@storybook/client-logger":"6.5.0-alpha.64"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-alpha.64_1650248826955_0.49347594165907904","host":"s3://npm-registry-packages"}},"6.5.0-beta.0":{"name":"@storybook/ui","version":"6.5.0-beta.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a6b233278d602fb3015b86ac9afea2a43d295a9a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.0.tgz","fileCount":10,"integrity":"sha512-67uJQkBk8sHvhc1fBZaNwq0Ruc6sJPhLbfMNd6ukEsu6h3nNLxjsFqSkiXIndc63DcECd3hAz8TNzAXIO0/ycQ==","signatures":[{"sig":"MEUCIQClpr+uWY7mzdm8G6p8G7Cu4mZvGWmMhdqAyCpxIPH3MwIgWVL8zA1Z4pYFSip/GaxZi9APtRpism4mzOuig4AQ/6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1803233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZOujACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5mg//VXC3CLllyF5FnMccyxswHzYH8dePxacyx13t9Tk50F+UALUk\r\na3g2AQf0OCy3VsRyKsKQEPgKXcHjE4uVAHGtXWxhPXbiW2pDJ1Z7aBBf2ptd\r\nMkGFtZk++Lgv8es0JsJK2//XgzTr6Gl+17emZNMSJgVSf1JMe91syKzeK9+9\r\nUoOnv0SOp6WzAE5meCLZLC4Ou0f1PnD07YMxByfh/wQioSPjpH5w5wliW5l5\r\nRKMtMSpc13DtXeGePQc0sgL297PGejGPMADL6Dhfg6uCo9I0mOFJx/zae7pD\r\nnVYnYmpJ96LbWX39T9IirjKdcbWVNPiPXPfcMJTxqrxJzyrCfmI2MpcpfFKa\r\nbedp7NJ7E8LLDfVyCjm59SPEi40jloTDJKHDmSPA5ofdhRoEAqytcKeesZ+e\r\nsdBjaK0IPZtMk/V4QrBkg2e5QsX8VEBuh8TYIMkHa7ThFHO3ErRkrddjs70s\r\nxBOXh6Qzdj+VC4oKBDAsHyvpVG8d07hLj626wrhX4hQCkCK+xW+s1ZJV8OD8\r\nuwVzjIu8cROGNgvQJtVMYtOo0dIu5RH9z6E8PKJvb1hfZrtdcJDauYHAHMmc\r\nFBv3j/7bCnR4yFGqBXBGEQ6ddtkOw+nt7NC9dg1oCwAKj0OnQNvSpPh8dUha\r\nQIh23SrAyN3eMI2rsva694ddnQdFn6/CVQI=\r\n=eSXm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b2e85f3599c043815b18bbfc5ca563bf1c6e4add","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.0","@storybook/addons":"6.5.0-beta.0","@storybook/router":"6.5.0-beta.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.0","@storybook/channels":"6.5.0-beta.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.0","@storybook/core-events":"6.5.0-beta.0","@storybook/client-logger":"6.5.0-beta.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.0_1650781091204_0.235111026905368","host":"s3://npm-registry-packages"}},"6.5.0-beta.1":{"name":"@storybook/ui","version":"6.5.0-beta.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ba4309895aed1531f8d703ffadd63048c9a3eca0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.1.tgz","fileCount":10,"integrity":"sha512-KzNHF33qmDBDUFQc+AhiP4+0eeLg0OfS7zRDVgRcNAINyiCl6BF3L/Fgnr+JqoN3p3Hyk9EHTq9aC3042vGBLA==","signatures":[{"sig":"MEYCIQCjv2mq+GYdygj8/Cv3GBj7QlXzlSB8MnazwEIgDiYXdAIhAI3753/Coljvk4mnukaNwJxddOnwEFz/FxMGKWgJEbwJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1804036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiagKSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGJg/9Fc5Sbr8gY6pzEpWpVcB96ZiP9oj6bdxcQZoA0qw6bU+YhXc3\r\nK/m1ukvNK6hQD3sAHb4HRnzFmsIIKdfDjywKRIZ4JNAkB0utIV78ZUv3I/Ot\r\nBTRJIDF+OyrGNVcvNL+rITakrMmHNZoOqJLUiAyawsWuM5QIXLU6pHvltLiM\r\ngNHwox0eUfngW8vI5nVKH31vu4nosE4Ndgd9fcsciUcxPLnJQb/cEf8G5pPj\r\nd7av6w/FSc/lh/f0N1o4NGmZt7nuD29dFQhAj74GSu/b/rpIz874UoRDT/5x\r\nnFPUUSI/3OQZ1CQPVpSG7AQ5DuqbLQ3jQOPdfyEnTcIz/H61VdyMGcoRysLY\r\nHjDcx8x8P7Yo47zIBwUkW5Pbgr3toQWIm0TfTMJ6jJEvGfLF9X555rneIkIN\r\nsSf4AXlNT4q0Ld0pYGRXgEvE1nu5XDV7lLGKvwCZecOGGs6anVtG+Nz/S8sg\r\nPvbzSDbJj4QNH2+Hzt95mDrc/1t4ldkz3CpdGVrd3qhSdwEQZyzYxlPMmsM5\r\n3rnezf+CvR+41a72LURSpkVDzgQKzRKigad7G6gp9QOQxX+fzQVaNNPSM4oJ\r\nz3unVYnuCB5SV4OJiS0q6N5J21zdKwU1WQYrzRF7Ey/zZBUEpKPFqr9peaDR\r\ngUj2NV/mM1soJdbhRtgIY/CR8qtr1aeQ/9Y=\r\n=9IuR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"85bcae3041a0664d7c0ee4756241e29ad1063a9a","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.1","@storybook/addons":"6.5.0-beta.1","@storybook/router":"6.5.0-beta.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.1","@storybook/channels":"6.5.0-beta.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.1","@storybook/core-events":"6.5.0-beta.1","@storybook/client-logger":"6.5.0-beta.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.1_1651114642138_0.2666472838315024","host":"s3://npm-registry-packages"}},"6.5.0-beta.2":{"name":"@storybook/ui","version":"6.5.0-beta.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"742578f25ba48a86913ead9f8dc53c2bad5cab6a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.2.tgz","fileCount":10,"integrity":"sha512-ZqmAfqDc6dcoc9HxFARmdSYMhQo1LrLqJh+lWBRqvx8g0ouvB2IEdGKC3MyiVnNPdMqETS9JyrLXcsROpKPL+A==","signatures":[{"sig":"MEQCIBjpGE6PIu0ni0RKmHXJV0sG/dM6UmpF+uTi1pHxDV+YAiBcJLtnwZ/XQbSNnB5JS0weqcIFO8PF3cZYB7Z9WegWiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1804036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicQ9sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqzzw/9FFuyPZ1wfJE7jqV5OQMuj462fWFPzAMz3HVdhA9LrrpSOdLW\r\n/OSCppODjeXd+yt1y1DjlXpRrt/VVyMsleX0vGYmg0ckz3ls49XN0oOV+8pU\r\n2FnyxH+kC1sMHXBXsxHGc9qkjE1CLsnqVGkZZ56kde2slO+k1Bl0bnVKQADN\r\n2aK6OlKEc67D2PGMlG0zEk8B3vowzUaRFNllJXd3yJThE8JnDdGFnpiozQ83\r\n5/pUd2V8D/ORqtuGZR3uDBBHIBSIZjnaetpKb9SVrf6Nh9iKdOwgKQXPwScx\r\nijrJfMpu325kQMQ9nL+YeWVYel6BNW2AkmXGFqo6T9O7KcP7xRLreWj6d9S5\r\nB/x/bThTPMsEizlYpU8fiefFNEph3NoLwDA4DrGPjGqVCTOtLxqcUWBqqyyD\r\nsjYxMA6p14ojDAOaiAp5UmEnGjM0w2dC906tGGpJ3VH9Rn2gFx/he+cpbOx7\r\ns7QcOWBZTivWCU5vzYbFR2vzGQM3zgeSNmv8sqoUoe+7AtTYiQId0Qarospl\r\nXtLRYv4rEdHgNBWpWS1Yx4NWb87F+ualNcU+UPUHBc5K2apto6maSkbTVNjC\r\nAcef4x/0gbQR9y0dVaSTQmRPa6Nqx1uJuRdPkWRk1RbKGHFlhZ5LZxez2i7u\r\n4SdNPgFETqgdprbKm5E1D5iql6g68+l5pl8=\r\n=65RJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b42ccab2b3f9d4f1f8f862242a5e4af0d3306061","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.2","@storybook/addons":"6.5.0-beta.2","@storybook/router":"6.5.0-beta.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.2","@storybook/channels":"6.5.0-beta.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.2","@storybook/core-events":"6.5.0-beta.2","@storybook/client-logger":"6.5.0-beta.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.2_1651576684559_0.40482531692176127","host":"s3://npm-registry-packages"}},"6.5.0-beta.3":{"name":"@storybook/ui","version":"6.5.0-beta.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"59f18ec96c2919a62ae9de9b53af1de117e75b67","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.3.tgz","fileCount":10,"integrity":"sha512-Rh6zp85hoT26ObxIlwioMGBLKizSxNsuFPghBvCUZzlrm2tD3dPEzpw//4oNAvlaNC6hYhJZzmIyWlKRHCZyuQ==","signatures":[{"sig":"MEQCIEutN8ZhQKH5cBGwSSr05TA+VFdnnUPyeG7II+idRzMyAiBpGQwBpQ3pulux5Rbb+wEPRexzs+8SIQG/CqSv6/3frA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1804036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicWtJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoA2g/+IUm1hUa5iJkYZ9GbN3pMQGyNOcw7RQBKvLUQ5jNCrwG1qjWX\r\nzC9sxVVqONHExBzYceR8DMBfKtzwq0/rSn+CrMDE4Q2uJE7rluqPDciRUnqM\r\n4ZFM70g4BvRakvrpxmxZLg32TMatDDuM3nyF3Oc+elmiuH44Y99ArBDEtwVw\r\nTlMZPyCZTiLKHJdZJl4b2TOAShZmQoa9FgG1ra5HX4MA734ngI0Nq4IrFKoO\r\nbcFra5E8XUnh2hKP9nR7CjGEF+MrkH3YqtFUKDXFxfaMQLiFl6JCyfc2o6NK\r\n+Hi8HC5W/nS9N7Btj1ixiorUrivHvcQcYD9hNU+/lCIgwF3jCyvpgRdiAAkE\r\nEQARO26n+FAo/ZncOvYg+b4z8ESaRUsroRQqvAQZX/e9ccMOOjpQOXUNv+dJ\r\naSFOXJkb7BJHMety+aZON9PfdyiEqODXtlorEqdxMztKQtxEtsDsfUxPzOVb\r\n+n/4w+YiG6BwjWdDX9HFwZ1hueO+uF3t/CUM/92zzCelqH4VUrJdh8s/5acC\r\nT/ohjANlo+t5k6Y7+0tNMDWviNyv504v67SK8LjLsodroN/PLTg5EzjIWXK9\r\nrzuoQtCBX592uM87LIXBVBXQCkZhhE6lz9PcSoa7qzttIGOvYcRLG8ZFPDRo\r\n9a2hPoK0yWwuw05Fy0UftVTwJ0eRu8craJ4=\r\n=Qjor\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"04007f4e887328c7337e2798a36358da85765197","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.3","@storybook/addons":"6.5.0-beta.3","@storybook/router":"6.5.0-beta.3","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.3","@storybook/channels":"6.5.0-beta.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.3","@storybook/core-events":"6.5.0-beta.3","@storybook/client-logger":"6.5.0-beta.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.3_1651600201340_0.8629254718319455","host":"s3://npm-registry-packages"}},"6.5.0-beta.4":{"name":"@storybook/ui","version":"6.5.0-beta.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"bf24b95ea5f81907b6204e4522f5a7f9e0336d6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.4.tgz","fileCount":10,"integrity":"sha512-iOo/5rbIFxFoNOAKLZdSMCMd/o0nKrJcf95vDjLeSN2OysPWRfu6dfScIIu0wdP1eGPhN+/F7d4ukQIRL7Or0A==","signatures":[{"sig":"MEUCIQDT4c1oSCcVTJ3WudpL2LJ8PjObP8hVhRU7F9GIGOzXRAIgP9ZhfyUNn0EetQSV5VrKIPGm+295M8NP4y3J68/AhPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiceIZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcwA/9Gnku2sf4xdWUXQihZnSqQjHYtRaZFHJjaFGabGICCOkxC9N8\r\nCNAyYDDLeFRGUGtKtKf2zvcoBXvky2Q5G2t5o4qbwe2pIJ4KxmifD9Mo2ggE\r\nmNaYUlYuI/IO41BPCnBgQqy0qHXwCzqp4p+l90OPYoldVlwYQF5KVXs16qL3\r\nkBEKsztebrPEyWs4qPeQhnq+a6qnEpIAZl+Os9YZqqh+XkCK+6p9fXt8K5Jd\r\nCXXAum/aM27Xi2Vj8pQ28DxTu4zV6ZgkB9fS+exr9fxpF9YiICGM23LYZAp/\r\nAI9xFiHd8/OepGTnvQ7nlrcjYgm1UuMVBkOIxcJwxrDLWE9Gq95VVQqcuFSz\r\niEqe5gTxmwm+MrkSI84/Ra0ydURUSAUNTwTzGOF2c2aR2hdY78j35A3XqX2U\r\nM9rMgN3ywfZW4URisvsMpZH5XpjSyYI+gTLkPMGQ16Tt6bP8n9qwuzKakqN6\r\n+KX+8Y2z2wBR5j3Mt+CUQOszBIVjy+NlYFg0WHHsnBFNhlVUIYK90fA9Zr4h\r\nDllasDBg5iY4zFaWrbJGhNq0YePaUmvhKo6EkgR9/Zx0a3/jk2m6v7WNnKRp\r\nn49ZmxqKqkH+KFAZv86yr16M5kuoTrx/PMnizEkfyQdbV4Tdwrw/fiSMo3gr\r\n47QYd2tRYCwzGhrqWGYNSsyNjQHT85OB+G0=\r\n=/GFU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"55247a8e36da7061bfced80c588a539d3fda3f04","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.4","@storybook/addons":"6.5.0-beta.4","@storybook/router":"6.5.0-beta.4","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.4","@storybook/channels":"6.5.0-beta.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.4","@storybook/core-events":"6.5.0-beta.4","@storybook/client-logger":"6.5.0-beta.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.4_1651630617500_0.5803071475896415","host":"s3://npm-registry-packages"}},"6.5.0-beta.5":{"name":"@storybook/ui","version":"6.5.0-beta.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d9e574a672667ab14bd681512f5e796407e0dbf4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.5.tgz","fileCount":10,"integrity":"sha512-gzIJprKU5A3AdKKShBhqF6TGlJzSxa3iYWnhc0UJZAfQXzT4RtEq6CNhFwW9uIF6ljqN3RURfF8EoABMznFmNg==","signatures":[{"sig":"MEUCIB1N6KLOsjG/Y6C9Uk7MAMO9kRvNp3ja3Roo/o1oA0rLAiEAmcZsgzYSD91ierClsGkxwMESYX7cdYsAAKNwdU2hOhg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicm18ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSMg/8CRjW8gRcCjjuOjpeHYz+aN5hWpxKfUTVJveeSw0QHaZs7QTm\r\nRN7j8o/YD6ca5tXT1lhMm0EnbCCYl2BrQc4TZx+CsU9VXzL0tVmIk6tlI0hk\r\nFYZG/AFvZtESV86iw+w4TH5Bc+AKC2PaovsEGRa8YFs1QrGdPx6UqWZOQEs8\r\nCG2w2GKqkG/U7pkvQ7GPTqRz9v1fjPkXlsmSGbjAC/tlHUlvI9Auhwg3Rv1R\r\nv2I7BluDpw1E/5rg8yYwIIHdfnhvBLuezahNzmu6qN7cknw5gFogWy+gTi/R\r\ngcj96UD6Jbt7Zb9QOExYk+cHV9N4tx8ZvZ4he+EJHsLxAU13y2Uhj7CF9p61\r\nMqlrnrXndlt/vZ15EJCw4xfRL3deYcmi9Yki7JWtvgJjqRT/dhqVsnj/JThl\r\nVQ1HQoTtXJ3u+X2e8XySu/j+XJ1bzaXnn27xW//fw/4oCz7TH6VyvWQrlKWf\r\nZe1wv18Q93httDP7xDC3lZFtRxgtgys944d7h7q8QtXGx9g9VbPijHgDq7Lw\r\n4vOfmhcxnlDli43oGbb+eAQ0ymRcWN1azGaLHRPLv5fO5YUmHU19sBbSWME4\r\nSQDGm2ZeoYuR/AFJGEz3pE90CgvVSgsRI9n3Iy3OA2mU3sZUGhb0tZcH9+BN\r\nETurteUG4Q6T8Emkv07XHn65R9+BdBqF548=\r\n=DS9m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"77cd38edc2aa4728c360467c5418bb2ef2d8817a","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.5","@storybook/addons":"6.5.0-beta.5","@storybook/router":"6.5.0-beta.5","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.5","@storybook/channels":"6.5.0-beta.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.5","@storybook/core-events":"6.5.0-beta.5","@storybook/client-logger":"6.5.0-beta.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.5_1651666300493_0.862219975646713","host":"s3://npm-registry-packages"}},"6.5.0-beta.6":{"name":"@storybook/ui","version":"6.5.0-beta.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7758319de2783f4df954fb10562bb381f8fc55bf","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.6.tgz","fileCount":10,"integrity":"sha512-S8b72CCZA2C2/hoB97+wA7HkDRKyE4koErsayFwhPG32O+vg6D0vJCD/g0uYeNq01U/r6E+Yn35vAmWSqcOEXw==","signatures":[{"sig":"MEYCIQCqoG75n6E3Cvd0YEs/MVrVV+btzgnMSHknx9nDL6eG6AIhAIMy+R/gczw/3rmW8s0T21eQZkFOh1b1zCOgSeYLxxja","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidAmFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+qxAAgdERXFTGFA7XHPJhQcptDmNKUPr4WvJSP1yya0bosriPrv+C\r\njQCvf5FeTDXJUrcc3kL8Po3U/qjLI1v0z5vgO+Yuh8/CKt8Y7Mplpg5HhAP9\r\nEXSpxZywa/3Xo0mo+JZRSjZc3zhdZUeTbjHG8mpGpOoBpWOZv5LIXF5jhWe4\r\nZb6IitjdHnPLRHXsmuitLRFLqF3M/KKpiHuDQwf8P0kDAsDVes0JkUJl2pyd\r\nGwRnLTQ5pdYr15ERGa7BoG15tM0cgY/tOk9SjglyWI05xk/kgG4uyWJcpXl3\r\n2zQWeu5zPrZiI/qp0iKsGBsrW1moGSgKVXBZc4MVlgfvcG0tHUHvqFFNUdaX\r\nhQg/VUzbsRhWSgE6lH6ZuahknuohAbPE+eEOvQpAy4vKE/YqCh9buMsA7jES\r\nDyJB0lsWBbeECMPoDJzZhHZnBMxRHvViqf7TzpxbukKanwsRNZ/4CSRa2alK\r\nzYsfuHbg4Px6PVdFMlAiof+sq3g+PgkRyoz6LfcFF6PYzOuN3Vyc9vnQYoWd\r\nR+dObPDFRbMgeKuC7zN+oD9hP0K9O4Dv7IMNJlLmXZCHvVx0LIjsmV6fh1hz\r\nJsHwji8VMpfv6P3Wiz2DOYe+4jaf82zY7JzK+pyj52OxWvRDgvtAY/pzAa2R\r\nXLDuzSoFRAtIHkRo8ZVakU2mJXU7nMu6OPc=\r\n=Bwrs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e86538e2acb3fbbf207d9113f58c1d1bb56138fd","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.6","@storybook/addons":"6.5.0-beta.6","@storybook/router":"6.5.0-beta.6","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.6","@storybook/channels":"6.5.0-beta.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.6","@storybook/core-events":"6.5.0-beta.6","@storybook/client-logger":"6.5.0-beta.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.6_1651771780862_0.16298676943512969","host":"s3://npm-registry-packages"}},"6.5.0-beta.7":{"name":"@storybook/ui","version":"6.5.0-beta.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3852733a3e5ba1660c3d15cb9b5f97795b408325","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.7.tgz","fileCount":10,"integrity":"sha512-OfsuZYyEO9Gi1L1tdTYayIuf1J8y1hs71sxkuq/0uv1ihuZMq2i96mswAvlOiZ83oPNAXynvu3ldBrjAMw76Lg==","signatures":[{"sig":"MEUCIQDtn2t7CLcnjaVHr9WfclFaiouRwWhcgkc1VrnTMyVLMwIgUY+ZL0cFfUBr4dtREaTHxSyUyVteHcSmnoefH5IYV7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieIICACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpa5w//RI43JGXACrCQNNkqKlxFeopFk4jeZgFLGcYutOxcWteVufDp\r\nhwpxauw2TmFNkOgkrcQkbOrOhw/UxAQoABhFNQaoSv/bmPMCSdjlgtpetT5s\r\nu2X8m528OH5wNwyCEo7bFu78Nn5JwivdLLEuLXBDYczLTLSS/SCzPSKQRx3l\r\nRg6ma1poGihoAHtfyPME5XDYllGHu4JW6wvWIZs0cMhFhCZzh4QwyvqfNvV6\r\nqyfvPmHw+PlmZu80PgxjTofYucSfaERsrx7HTpC1lvPodz9SoDN1COwIkM2u\r\nB10FvqvFdOPU91LNzSEp2FYCBBPjkGDmuku0eO4UlqGd2neTOdDbMeXJt8ym\r\nLnCPvz33q1myGwIMdl9nf50bYTJ/WpCSQ3eL5TdwTH1REwVvtYqkMStf2shn\r\nsfw4Us3s362mM7jcSjtApHf1KbidqOQfKH/lGxR+qL9LftOiPBwhsljeUQRT\r\nYNWDchdzH5vi4v0JOWy8i+8lzpoXcuVx9aYvWIj9sN1Q8e+k1AgDUv5e8FUa\r\n9czw137txUR1AWy0FJHZC3MCo+YnCAISHy5avpdE1a0OEpaVbLIl8vAKTb0U\r\nS4UJYDDiC4tzbv319mK4SCi3pU15+ycKWvkcobi6xmNwowdEG53Ju3fHqMm4\r\nLFed4eBY4OFOibkphHD6WbZSQrbiluordyk=\r\n=MP8T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"14bb6d241c888cc3be6adba94c3e3a1ceddadf74","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.7","@storybook/addons":"6.5.0-beta.7","@storybook/router":"6.5.0-beta.7","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.7","@storybook/channels":"6.5.0-beta.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.7","@storybook/core-events":"6.5.0-beta.7","@storybook/client-logger":"6.5.0-beta.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.7_1652064770283_0.7439238085398632","host":"s3://npm-registry-packages"}},"6.5.0-beta.8":{"name":"@storybook/ui","version":"6.5.0-beta.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-beta.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4b3173f4efbc043bc1ecc61a4d8a18a04bd1ebb7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-beta.8.tgz","fileCount":10,"integrity":"sha512-SLOTggGBtXkERAUfPCSam7b7vUAgA2OgiIVyylYPl7SXSbDSVms+qF+QDiYCISwDbDCf6qsMklnMDAcmHAqhbA==","signatures":[{"sig":"MEUCIQC1GOEvWNqaLcWsksFNF2oxfoNisQxjnRzXBpGqJRXvKwIgGrxmrOn4BtwQr6DsOHxT64BtGlf6+irR75VzK2qT7KU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1802824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJierTYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYHA/9HBtgRP3g22CKA9NUX0tEZP0EtTx2pFiF9YUDqqxp6voXy78t\r\ney5F1KyDiELl6SBRbMhVUSP//pTBUd29jOIkm4BPBIxcGAgkChpd2l7+I/nN\r\nwV4I+43vSaf4VXn+u+3FdmYlyHndvQvs7EPL3QsUpjSZOyFnbuMa1hyu7ECI\r\nmJldG91AtQzCkl6N+laVvep5LVwBJzd1vO2xhwjkeuDN/CNf417UYmIDZwBg\r\nL9l8nkAIrg5VPcvphGZcNuL2HkoUNGf9fV4+cnMxw1yeq7HpfgUWpRX2n6vl\r\n8RRjUGnTjPQq4UtvlWXFuqi1a55tbrgQCuLiUNrsDRo+vAkuw3Gw1Ki8e7nM\r\n8uWPKaveXuZD/CdfJBUL1TK1RM6EVc8cC+NxOr+Svg8GgBcGt00uhZOYYImM\r\nbM5IYZw30jfP+5T0uzwaCt5rNbwzWuNZ4ICWOobQWw2H2yUsPRK+zRmUH/9f\r\n+htmrOggMs78H4hrvRfjWCqQ195ZRkX8MVS+ehkvSA9VPKK4en26JF4hUHEQ\r\ncRiCQx2qyTqorSxOesXhJaWmdimAeTquNVYSpvvm0fpirf2pcpLbqXcGulbm\r\nOe6zpMWMPFVn9Kq4MEUh6kA6steGXhujvOpyGUM1ZxmmyfUtMZyVrSrUPanN\r\nejrpcUTz5cCF1Tnu9BnlvojkYhtTIZbsqXg=\r\n=P63M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9b9d570d753341bfd69ae649df3c7fb3cadf11b2","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-beta.8","@storybook/addons":"6.5.0-beta.8","@storybook/router":"6.5.0-beta.8","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-beta.8","@storybook/channels":"6.5.0-beta.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-beta.8","@storybook/core-events":"6.5.0-beta.8","@storybook/client-logger":"6.5.0-beta.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-beta.8_1652208855771_0.5413106252699091","host":"s3://npm-registry-packages"}},"6.5.0-rc.0":{"name":"@storybook/ui","version":"6.5.0-rc.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-rc.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"828fe5ed225eb142782fdbd946fe47c92f0f3575","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-rc.0.tgz","fileCount":10,"integrity":"sha512-JKgAG0DST11O3N7WdDZIF1CeMaL+bcCvBy0pGvBTfPuvlUOgocl85pJEj7pb5dTXytsLKS4rYFmmY+wpu9kt4Q==","signatures":[{"sig":"MEQCIAtzQ6krwIcfcB3mnY4azHmiSfWy1K/qj9XUDqQ777n1AiAdYvPArQENxmUGxYFoCsNUPI+1Ed3GkyWNn3EUIIgjbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig3E+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxMQ/+IpUPRE7LGXvEP6x2DO1/Ex6IEIqswrCXhm7C1oPeN/uYLuOe\r\nByGvV5KlzpVtxOEXQCWyHGBlI4hKDPgRW2fV1vEYMFKOxvjerV2c27kPgw5x\r\n1Y6zAcPLNFN0i667okRRNZAcPqh7qak72+cEicEgaaWtRjGHzX3WMgDGuCOu\r\nAZ4KWE4+L3yhKiO4ewzY83/hFws/JsLtckrNGFoZORwmmc9jv8RsvvktyYVY\r\nfQlc7FlY2UpM+zxPUKwVEpBCOBxY4HtZZYMT27pFBz9vv9rSW0YTdOg1kyqn\r\nzswsv9BS+9r2gkSMP81C+Ex9bd0ZkXfPk88BQS92C/sSVnRvVIz2i+6VlEcc\r\nDLI49N4EOB2BnMuAjAtpsAG3TKD5J5SNt7Gy6iu/Rg2ws7YEtO80a9Z/s9/i\r\n7xBlVkw1KDIXN+ST7uG1E8D4J74IXT9AhYr63r85Capg3c6BiNuRfpvCYR9B\r\nebQ4sEpqiOzoULwT3AIvZCMAdaLWI2R8130iYGOsymcGmjFT0TGw5JJ4nezX\r\nbULnCXrBrCuvIYzFo4WL9Oo4uK1jgS3jsDEzwsGkImYNDqcLW+NSi7AzRNoP\r\nhWqsBYCvK3ryVCbZnAfn2TPGDuRsCm3H4dZGIyiPlac+ma+NAYlxlVoyn5B+\r\n6PBoSd5UYueOZWSwraBzXx42nlIwaeWdWfw=\r\n=GVSz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c27fd9eebc4c6db5c50f28c36b204d76c2f9e123","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-rc.0","@storybook/addons":"6.5.0-rc.0","@storybook/router":"6.5.0-rc.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-rc.0","@storybook/channels":"6.5.0-rc.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-rc.0","@storybook/core-events":"6.5.0-rc.0","@storybook/client-logger":"6.5.0-rc.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-rc.0_1652781374682_0.8339377434341337","host":"s3://npm-registry-packages"}},"6.5.0-rc.1":{"name":"@storybook/ui","version":"6.5.0-rc.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0-rc.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"69bd0cc7adb0096646a29bf6d69c25a4aaccff6b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0-rc.1.tgz","fileCount":10,"integrity":"sha512-28fNkLljCsflHYYYxUKKTGsbrMeaRlGLgV0jPBhovr2AywbB5utU2Y5r+9P0yitKrFc7iMFZMmtrCgcxLOlM0w==","signatures":[{"sig":"MEUCICoTubARufkFOqE9/1k728do0mpbUySwv7vGYKvV7C6YAiEA/LJvz3REWolx/97iBmlwZXjiMp7N2JwFpBAbyfYrSA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihQhwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqw5A//XDRf/oIeBsCKOtLJEm15FPKh0k8NVjzantVYRuqJi4n7pyw1\r\nuxUdzlERcXcO4e5YLOvsfUATF4DB6A6dnsWy6qeGLOTI8ucgBwF/abP0OJ1V\r\ntnD5fyYiOiL5OMg3P4jPgj7skeM/MbOpef2Dl4ppm6ZYkmU/VUiQRmJtW6Eo\r\ndMmVFJqPDMtQ2r1ZgheFrDkT6ngbC6OPM1wLe4geR38KkfpqHJBwpaBUmzDj\r\nfkwmbVijjX7vtK1VKalIHpKiX21XkDvXISOBF/1OaebcER6jtdFCSHhswTzJ\r\n9pYcEIcPKn0PbXo6WX9RBIN5qXuquMbCdKLhyfUNxbZLjiF2Zlon+EnyHSqK\r\nRRxz2++cHDDbmnNFtOOuqNY/XFMW9Jos+XNAvwhvCPWfJ9hpl9Rsrq72uN5X\r\nR+sVjiSStY8/8jnhM8SIvUXiRuWBd5G3diCNwC6KM6xKOL8pR7058VogD3/7\r\nDgMjnc/ODr88lg/16Ydjwrl8WnNVWb9BaJYmxA6xT42Sr/o0/ljLZ155O7pC\r\nlW5u2OGn8qzwmGpzgW3/6ffQp/PBcHUYIzZ2omqnMloNDkS3kazhGVyVDZi0\r\nzWmdkUTimtdoBnAVRSQk43hu2b/Hk45IYht11p3BV1FuDfueBbPJgYHfPhQv\r\nlyRRW1hxKKs3cfaNC0k8fl8W6L3QZyTG6aM=\r\n=6evU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3f09d4e6b0c655a092dc812488ef2c7ed3808401","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0-rc.1","@storybook/addons":"6.5.0-rc.1","@storybook/router":"6.5.0-rc.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0-rc.1","@storybook/channels":"6.5.0-rc.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0-rc.1","@storybook/core-events":"6.5.0-rc.1","@storybook/client-logger":"6.5.0-rc.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0-rc.1_1652885616111_0.7139562251112097","host":"s3://npm-registry-packages"}},"6.5.0":{"name":"@storybook/ui","version":"6.5.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"50775066134de6b7a27f9f947921c0411fe8a27b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.0.tgz","fileCount":10,"integrity":"sha512-4SeY2AjVZXqw0XS30iWWKnBfYvy/x0UVJ3FavN8G+j3HhXw+8Q3R+yL7SuXDPg1JsO2OuWL5NJroPw4z7y78/Q==","signatures":[{"sig":"MEYCIQDi8eBDrlPaxqDPtNjgii8zZ5TIftfeG7fsAOrKqL/soAIhAO0dhe9T1hAVUtCsU4aQ/wknTs2oN7KIk/6c4KM0ysjV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihR66ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp54A/+Ow55DPmAvArNpGPv6yDd7PdShyGMG+gzsmHO5rd4/AmaQRAL\r\n6OHPAGRuhAtgatUbbYhJwhAiJi1urV8Xj8i2JTqPbKqn4fN9X0Y3AqPAXFrs\r\nlF1E7okCfY8O0wSPawdEPLuBgmIq8xXemh7ePatq46EWufzgrgof7Fzarv8X\r\nGLmSrx0ob/+HjZ86P3+jnVFq5e8ZQdtUSdYruBGQIn2r7lE6Q4tGtlVlMp3v\r\n5JC4Se1o+aDRj8NRXQZx0l9MRbRQJidoOimvCHbpuX/XObNt6HCK4gxG32UD\r\n0txoQzFLX8ds12/ZohzCJaA8mUqUHuzglpIiWBGaAA940VR9ZNe5dr5KeZ6G\r\noCF7qcrRNUeo4M9SFIwvz8MB+YbKNJFTg/NiEP4fVq83fLv3LS7lSDll2/dH\r\n0CTiTc0un+ERN17DZTrGZZplmzeHmygLulWhT0bzjJ0py1MVJ64sDsr/GfeQ\r\nDico/TE2sxhRvkXB+UWxp6XIPvkQkXsJys/qD+kX4A/tOi0h6kYwm+Bm5sRK\r\nG11GWQhSiaglbGbbtn4FsMt597OGQhxbVGAMwzcv9gGZSOuyTNKV4enB8sCk\r\nfVZFIyUnCYPVl/RmDepL7iEIsrXEt0F8/5faHKvOfW8fZ3K3LHIfEx1eToXf\r\nukC7EU5I0FRWcOUv72+3EqimBnIiTY2vH5g=\r\n=q4Ur\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"05070ca621fcebd46cd6c58fcb0eb24a35bbe651","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.0","@storybook/addons":"6.5.0","@storybook/router":"6.5.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.0","@storybook/channels":"6.5.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.0","@storybook/core-events":"6.5.0","@storybook/client-logger":"6.5.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.0_1652891322715_0.9845558335706932","host":"s3://npm-registry-packages"}},"6.5.2":{"name":"@storybook/ui","version":"6.5.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"034a180604df28d0d1b1d38324bab93de5da8db4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.2.tgz","fileCount":10,"integrity":"sha512-CxFYdqFoxHl20l/D5P1eU9exG9xPvFF3ulKe0C5Rdk2/ZL4p77Q2AYL8btvgBloYMBsT5gdSBBNnMsDOFvpbew==","signatures":[{"sig":"MEUCIQCEnYxuqv2V9Y6S85gOfJ9ZPJ9Xdpb6lNkQvKGlxPPKXAIgaDjCnEbS/7IEnekCCCKJsBj8vys30u25Kpl93ODFQBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihkKLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJgQ/+NY8fz56V59hUaWC1e1YFG+je8yb5mcFVyOT1abjPwAWYEvQu\r\nrFxjdkJzIL0VtVWf4hjUtFuHg5C8hkwzWsWNHnuUfyDca0vk8shtMvWHAziC\r\nfido5FNpteQGaYBOnin4vaqgpJAHVfTo4CkqmurigURKcA72CMtEi11MDalh\r\nkMJfXmCmbr1aVmFLhz+41nTmW4ti3YhVEdV1bxdDP5AhT3ES12IRx6ew7hh8\r\nhXPDhzqXpMNt3Hq3gizO8xgCoLBgbv+39f2P3I4442og/hfwM9l4Gu56IU6G\r\nTmZs0Gcsdao0bQ/l18IKQToudn4sTNks3WIThqr0inVKA0JpA2qxUOi0+Vha\r\n7nFM6Dr6Ad5Fg8NaiDChIgf5tg3EjapGfghpOGaSkHyXccf7TlZ/csTQl5qI\r\nBpl9EcV2ZOuhgr4782aESEK8X4QCSzY4wPppDH4w2I+aM91WZhiYST7vsdGk\r\nRuf5wVZeKsytqIquEgtUupRDlQlSL2rB+yrvUBpLD133axJ3J8FoUct9cqJs\r\n7xAVy410XxKmIzvNmcQCHiT9DCaRaeiYME8djPd3gWcyxHglLByVCuFwGeQJ\r\ne8bxwRbE0tJgG9G8Tkwd6sA/GHGDIepGHbcMOWPXVeM8AVWySBYLaI5tT9xD\r\nXWnn4gg+4mhnU0uVqy6vj5qdAMT4Cq1GxFY=\r\n=JCku\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"08d672feb1bae54cd61a9a9d7170da45fb5c19ce","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.2","@storybook/addons":"6.5.2","@storybook/router":"6.5.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.2","@storybook/channels":"6.5.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.2","@storybook/core-events":"6.5.2","@storybook/client-logger":"6.5.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.2_1652966027054_0.7644219027220767","host":"s3://npm-registry-packages"}},"6.5.3":{"name":"@storybook/ui","version":"6.5.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"afa7a327c71350e9f92628b86c7f14d58427ec3c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.3.tgz","fileCount":10,"integrity":"sha512-TLJBfXHFM0ilMuUjer4AjhnNGvQ7lI4GYIKzuCjCrw/ukfUb1AABXd9fdHq7tEzVm8z7T3pyrRVsb1VVdbxL0A==","signatures":[{"sig":"MEQCIANVfMMQ3PROzFKvezI7lNoBPkyL1jzqgPf7aS82OxGGAiBfjwPLfNNaJ6AjmAidXe+HoXcjAXbYax51vl69bCh1Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihmEwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5dg/+IPyQpG6qNRtm/LDIJp5+e8jdl7Q+j9TWTgSDJqiK107BKIjC\r\nnppaM/mTw5KjxvBkQJkk9yxU0LYssXruYe2+7qb6J0fqSNGvB8aL7fuJD7g9\r\nj22FJH2tImxWuSfNQ93UxMxFkltM8ferw2XbeNa7vOufdcPXQOecPeTtnxvb\r\nr9wpWY0iH1XPJ1JTQJ4kVcgnWT7rPEtuGXVEFbtmU2xfmL72CsfoBQ/lhtsa\r\nTdnmIOPcUIs67gl+2VtL3IFVFvHr3a/b8rBDPhuZ4QHUHkaVJNPKlzJwG0+b\r\n1XwUYTAOl4krlWmV46njOKOaHWOYrLP5njF1/oqNhVYE5EagCBkKQKLRnwsE\r\n0aHYbxltjLT/02AS+ah7KSr6z0fELN/uwfpes/lhAV6bNoWf4pHKudK2qche\r\nhyu56G1OgGRNSYOrdJMF20X6NlQtyuun18Iw0aOn1ojk/X+3J/LQkyXF6LdB\r\nzgurzCZDwhSFMFAPoOvOZ41M7LFsXcB2+Fxp3SAzyhbtbsbc4V0+pbZ5nTIw\r\n1ca7tMz76AO+xSScjuLLgMbxRJXSPZM1GumRV2AKkumotw3+N3uJ97zHjA2g\r\n/ucdzxBNRB3QjArvWaqWtwt3tzI/oAuvuHGwr79pwMbUayDuSUkvOCsIB5EY\r\nKtxxSCxHWHTfQy3AF5GV3n3Iph4dJPTsyoY=\r\n=4wkI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5056f9cffdeea636f0c852477fe79e443226fb64","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.3","@storybook/addons":"6.5.3","@storybook/router":"6.5.3","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.3","@storybook/channels":"6.5.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.3","@storybook/core-events":"6.5.3","@storybook/client-logger":"6.5.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.3_1652973871876_0.4798794919306377","host":"s3://npm-registry-packages"}},"6.5.4-alpha.0":{"name":"@storybook/ui","version":"6.5.4-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.4-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c74178affcc3988eb87dd79805ebff24a10dda4e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.4-alpha.0.tgz","fileCount":10,"integrity":"sha512-BE64WP/lgUmEPGFUUiNmRWLq+RQLk0dmNOGUe955B5nkXYmlMMYWBLEBbjT6KTWvabJIYI/ORtipAFuxzjIqqw==","signatures":[{"sig":"MEYCIQDLP06ZeCPr0QzH6DSZ82fDSk90j6gvBwWm0EjPNRPY4gIhAPmGmIvtQo5NSeXFP3P5h0j7xWRj1JeMgbIBTDth5Emn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih3QnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrasQ/+PxlH0l/DrsnCSHfCZMdZEGjbuQtliVXHc6D417W0wpqFROyq\r\nHce3suKn4/KX/IR8QKcP5gB8+aTkJSkMj3QZ6aCXj6bEN7c84IbxD3bi27tc\r\nr49iroLSoTgNUrOnuX6r8HoXpLcBHa7roMkbpH1bRWlBbNDsdqnY+XzHRs2r\r\nRZRK6s3KzpJT6bI3/Y1IwfOOLSZRMzZQDGb/V/1yU/Pesx+JzdGH4SasxGwf\r\nar7GC1v1b8CxDw/hMGnffKAEebbpRF73W1DjgPKiYb+MoDXeO62jZmBFbj6n\r\nQNlarHgkkvcn+v9iAUoDw2tm3I4egKb40BBRvL8vBsQnc2Nz6EDd7nUf1T+C\r\nwiBe6+hfpUyuqg7+1TgI6OBShT1K6YCc4/tj+vyqUbcHhksMPiaZCxaDc7EC\r\nnsAbrEV8ryZ7iGTDQJS1SKUHbNxQOxFrHa7SbTjY5337UHqTr6FNA6Q/q3aG\r\nsn3QW0UsC0Av50a07lbTur8SOwcwxiV5hi/IucfjIEgtJx54KF6GAo2maCSm\r\nNuT6nldeSKknN+V79GPVvI3gmyytee+WlfflY7l/LOiy3xKf+SDoqR27hD3r\r\nLJv0Hm6rLdB7aHXEIW2UDAudnpPG+PJr9AjcLnjEYVGPC9aHbo4BgrTAjoWS\r\n1PPG7vmi4m5PzFg3uKD4G00ramOcgYlnAqc=\r\n=40uT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"ca5ef7b7c83977f53fe73fe733c94b4695c6b0ec","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.2.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.2.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.4-alpha.0","@storybook/addons":"6.5.4-alpha.0","@storybook/router":"6.5.4-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.4-alpha.0","@storybook/channels":"6.5.4-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.4-alpha.0","@storybook/core-events":"6.5.4-alpha.0","@storybook/client-logger":"6.5.4-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.4-alpha.0_1653044263245_0.6253794129051191","host":"s3://npm-registry-packages"}},"6.5.4":{"name":"@storybook/ui","version":"6.5.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"eb70602e78b871e6d762b43889b2dc7537a91331","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.4.tgz","fileCount":10,"integrity":"sha512-+kMgNMcW7xma/H/O4LFzdxjX6GPfEEvOkm3HQDz0dJW7z/wtQVTgZKCA8gAVl+eNcNyRGzYRKOrOU0AzFfU7lw==","signatures":[{"sig":"MEYCIQD+TW6rreBDixON3sR3orUp648M/L1wMEHAy12TM4J2TAIhAO7QPs81lMFVgjd5muqio8VPAdzLtH1zIB5FmS3yRf2t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiuVOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB1A/+Ieiw44e72v7bCO4pInoRlWBHR5Vw769Li0eiVvLMpQ2ZpXHT\r\n30sL/bALEuDEy6nrzCnnb+TlBjp5eiyZfmI0s+ZkrPSAhWZsOtm64Yaxge0W\r\np8GSGCnjCMH7Qr7DzJH0iMTtx211OJ6k87LzXo/OVkhbLvnryALTHEZbZJDA\r\nftZknyWgVTwCWW+2XgrEj3E7IVSsQgOhvl/5rUnNECALeJwlUl6xG1cnldnk\r\nHyutHjng6s3VqTjyOVWuTpVqyDaRvqpYo2LAysTk8ECfXYkLofTkC8XCHL05\r\nQNeYJtmCfK6RAX/sVmlK4zH2EEsL3OxeD8wpqrhkkYWv25CuTMTXfycDN7iB\r\nFmO1xZZ8euybAVFvvElEFYXRL3Zq2ktsdA1y/TBK0J4Rgck48AP+JSkkMA9F\r\nvtemumg4t6BF01zvDChXCmp8HHzvX+r9VCtBzm7vi9keBNbIWSG2JrZ8BAJs\r\nVX5ECWsu4SVA58HPU6mlfrVVl+289iYtn8D/0xdf1+vGPkm9e6qCq9YSJYfl\r\nomQKseHcn1CJTJ25YlP53VofNZv2x25HNxKK9ZasX63AfvBd+NTqBkhCb6w0\r\nv3vTysunYCr9XTYnSjvl3AG7w5Ms1ii+Mg2bKq90hlRbxMWvMalSogrFJCrh\r\nG72LFoiUnyX/WykrVIdqa4Ij0bXpH4aVAv4=\r\n=OoAI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"40cdfdd1a95aab2cd1aa5b42937f4b18bf7b6415","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.2.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.2.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.4","@storybook/addons":"6.5.4","@storybook/router":"6.5.4","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.4","@storybook/channels":"6.5.4","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.4","@storybook/core-events":"6.5.4","@storybook/client-logger":"6.5.4"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.4_1653269838717_0.7019964018235505","host":"s3://npm-registry-packages"}},"6.5.5-alpha.0":{"name":"@storybook/ui","version":"6.5.5-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.5-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e1f11acac2df8213fb0e7a6a6cc05adc416f321e","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.5-alpha.0.tgz","fileCount":10,"integrity":"sha512-E8i+fpmo4NAnMOe4aRJ4544ZgXRb5/tgoQ4sD1WCKdnHhpErxIHsUhonLHy8x83ii7QWYS3U1W3lBqXSS8Pb+w==","signatures":[{"sig":"MEUCIEKCMopZpmrbB0IvgFYKes9wmyrgD6BoxEccG7qyDyFPAiEAw+S5pOTvCn2Q+0a4f8RJUgP9Fnr6QoSWaWieRmUPnPc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJii8d3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrozw/+PEWcwjnmBvdPF24mOygVdk9Amzr68E1S86VbEYa/fHAxT1oK\r\naqah8qkzWFIy/01ZMtRnZNT3ceSj/hRq80SHowmyoOPMF/txbATiO25L33CG\r\nSXwUhfh+rIN0pd7BjsRh+xSoH94NPzzOy1ebXbLj5IjN1ibx7glYsomEftmE\r\nwOCrWm299xBQHTHD7bOOmkAlkRz0KQzN8eOtXOIglh+7L6NKxuOwPdV+ZZg0\r\noZolHmDmNHOypZ7kOReVD8wY2iCYKTFVIF/oMkPr0knKngbKQEd3mh0hBvhL\r\nZ+TIVs06/aHcfn7WS6jLCFEqXSEaAce3x45omNuyGeDoINcTjmAPAsOHNIUL\r\nuM6jvJaAAZMbmX8hdROnFnyTnH2QyRd7ZE02IQr47q7s1A0HtcYcD1QFKLyR\r\n+ylBRuVhUHSU84w7DGb6lylPXS+36d9xT7Gj5nPGqy5UA6FHZYiSwuITsyNB\r\n+EXU7lHEJvXMLdS/dT0RbZNL/qj0BYgmkZ/+TNyr2d2t0JiIcvECnY2gJTEA\r\nb0BLJ7phnIFFO5YoeITap7t2q9n/93Urwku+UxUZ4FE+3fubBIkdLnCnCpts\r\nqmZrAH58zLXTipGLsLO+1uCio1U7E7DmCigdcnqbDxWjx/P3kCnBx03JsduW\r\nq+kgpwGzq6nudH/oP9OZBlTKNDJxuA6+1ks=\r\n=pVWE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e6a84268f6ef870b06141bb0637b981f561a781a","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.5-alpha.0","@storybook/addons":"6.5.5-alpha.0","@storybook/router":"6.5.5-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.5-alpha.0","@storybook/channels":"6.5.5-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.5-alpha.0","@storybook/core-events":"6.5.5-alpha.0","@storybook/client-logger":"6.5.5-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.5-alpha.0_1653327734841_0.5845331353258192","host":"s3://npm-registry-packages"}},"6.5.5-alpha.2":{"name":"@storybook/ui","version":"6.5.5-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.5-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d28b97ec17d9e5d70c0ad07d907f004ff15dc569","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.5-alpha.2.tgz","fileCount":10,"integrity":"sha512-oi4y02C10igVkVrvCS5hx8DvHT4HI6qYptrMi3JE+tBB/a2vNJHeDLH4bAioTmtSiKow8SPhwe3u3SZsNllwtg==","signatures":[{"sig":"MEUCIQDOsvMAmVu0pHVRJLhHvOAMd595f9JhnedBFNwa+x+SBwIgNqVMiQkXlhFzYuBOJN0Xi+bRvwf+LrWEqruJeaP+Dz4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJii9JyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoE2g//Sf4afFfCMowiZ0xTS8l+5KPX3Bpeo/5jWXgeiDCo0E7WlK+T\r\n7CH9KGoUylboyoHCCEHKzTSW1ybLym5349VPNob4e7Qwc7m8Drstcgia/QRv\r\nj6mL1sDRxrHa1cG+rzYiHRGXXeFN0uf8MQVz/A0HHWd3/kcst1YjIAanA1/K\r\n0hLMA5K3EEnMzVPEz3LWQk0FEewLGQFn1bDhU36morkEOjg+XlmEw+8i3IZF\r\nfehNVXZSsnFp4gefX7x1WxumQOjUZDsWoctlBMnv8X/dXv6KoeeBS8eBfO9R\r\nLH3wrAQ0ICLJoSO0g3PZZCTFEG/j5ckLLSoNV9UFK97Nom34DDOAWg2lzKjl\r\nLPnGxZUQgK5C68NWOfXRr3uEdYWuy3sMhfT0GmAxyi9x2Gqlp6VzIA9+wiU0\r\nNVNB1vF5c0kehlke4Bt6eXUct99WHqTDdDYUCGCWjmq3L4PI0yphRyRU6W6L\r\nb6B5YzZBXltNBFxOSoCBdu+BqS1TVvW1gJxw/bWWLCsdNmpZP+GXfczbobAb\r\ni8G3W/ayolXGRDw9RmVOByt3Q7o9p0TRAuPZbKDcliLSlEC4PNR1KxhUHMmo\r\nhAxYZAV2WnPHZx4bPaJ6ALGRru7rvbqiFbNoquCf7EpuFsE8ea5qh0y0Y8SN\r\nU/gn0JRBdkRJjc6b2Fr8/k5SXRMt1+28t1U=\r\n=/cSS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b05aa57a62a742ac412c2ee97f86f3228f63bff5","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.5-alpha.2","@storybook/addons":"6.5.5-alpha.2","@storybook/router":"6.5.5-alpha.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.5-alpha.2","@storybook/channels":"6.5.5-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.5-alpha.2","@storybook/core-events":"6.5.5-alpha.2","@storybook/client-logger":"6.5.5-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.5-alpha.2_1653330545216_0.9130340300052964","host":"s3://npm-registry-packages"}},"6.5.5-alpha.3":{"name":"@storybook/ui","version":"6.5.5-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.5-alpha.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ace48776060b03ec41027fe1d8652df77306b5ed","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.5-alpha.3.tgz","fileCount":10,"integrity":"sha512-r0jf0tsUHlm7RHwadXm8peAFAP+38GDhop5dc1Em3u1L+Ao266mR4DyLhg7jUpi/M4kA6Y5S12C9RQhuD5t3sg==","signatures":[{"sig":"MEUCIQCjGJ6ahLEK962zM8vE67srlPC+Y2DwbBv+1Hr0wXleHgIgAg4lNCCBoN/mlxaDxRrsl2LxLFIvPFbw2C+SWyAUk7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijL/gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoq+w/+O2vlD36K/CJVZfCmw0E8AZCcyElb+FAK7QVP5AmRstFPcY5F\r\nAhGDx30CfPmuB/nA/ZuuxnGSHjOlb/1HHudNZLPtgNpCnV8d/S3wugyrv/Gw\r\nXVSDLKncX/LK7SbVahNWD1klMe3L+wDBOsb5UJ3mUzC3SWvBrdjToJFba9Rf\r\nfRjbUGXFyvm4sYWYBkzPrShM8tS3VTXXw5JOGobfjQHvATNnzedTRmbLEljP\r\nbeUXBzhthkEVmXJuSYvszD+yV1UDJjCStyWFnkcdhswyOOtL5bXFh9jC7qsh\r\nB/7/tKOv1qUaf+0ekEyg2rGdcwILWX0MU6Y/eDhqaSz86km387QUJYwN6VNc\r\nmf/s4fEZ93rh3wHm6+f0jy/c+6OrDpVvlxJpxA1x3ytZS+cSTfSUtxpjDZns\r\no1Bo1NSJamtaOX5Oc//wcGU8sdow+CyYBO0JLG7gnarAQnK7TvBk8m9KNYSv\r\ngBF4GsewbcRDZoWampCYyaoGSoLZXoc2MVBmhH7a+/FeS6nNx61FcBqgev5F\r\nXnQ215fYdM+HJFcoyqOUpUEPBsuHpFJhS06TF8rTCE3OMo0Rg5WhaiZ64q96\r\nu/CrCAQ+KV6jNr5Q3L9L/CReaa9xfr5sh0jKhQ/I97lDLHv3xe8LUe6YMhr5\r\nh7icG+n+/JAoRso8fFyyeBCGth9y55xF5pw=\r\n=SXBC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"24d23c8d634d2ef3e4aca503ad995dc92669a33c","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.5-alpha.3","@storybook/addons":"6.5.5-alpha.3","@storybook/router":"6.5.5-alpha.3","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.5-alpha.3","@storybook/channels":"6.5.5-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.5-alpha.3","@storybook/core-events":"6.5.5-alpha.3","@storybook/client-logger":"6.5.5-alpha.3"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.5-alpha.3_1653391328233_0.633700037431882","host":"s3://npm-registry-packages"}},"6.5.5":{"name":"@storybook/ui","version":"6.5.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4d244825f4c33654cbe12b7be2081b062388f96b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.5.tgz","fileCount":10,"integrity":"sha512-sAt3M0QrS3NGGPBcNI8vXEkx4eIHHXIvL9CTfOCicXd7ESsSyaEy3ErTJ+hQDARx3UNKL1wWBHu+jJC6Cry0ng==","signatures":[{"sig":"MEUCIQD4isxLeDCKEC77NYtKlqRvnCfZ+Oktgj72EsvEr4eczwIge2f0EfYW9ouIEC8No2qnkPGBKlPYnO4t5rCsjo/lQ/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijO6fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoO6A//U+Fm0zd9WKvEAMWwOkxIDHGYQkyxA0suWnC6rdGcRV4RZ98k\r\nZlPpNom92CGRhE28vHQLLgYqcB4g9rL2Mzr3b5KhJs84J2JSiXSL5kMJErWX\r\nQ22GX+JXr9ba612s7ovfJd0VqjeNVXRsMKPZl9xbNhZXJOoh57xY2V8mtSS6\r\nx3Itm5bqT12HJrkBVHCWRf81jPDH1367YXtY6wxkQv5FzLF1leamnixk+jN6\r\nsRb3rK+ts0WjN4C6IYSwT7JLM9V5beho3+fmYVA75Xj2Ym2ovy0LdrSMP38C\r\n0rDW/QE5wMI09pwCgbMml8d+N4UCb3W8VdF1oKUGOJB2oK2Q+kxB1pBTsOBc\r\nMSP9bgMDGqrz2ZbwetOJKu6ET75A4ugdGtQTkuqyXCIwGZXn2nd4t/W4Fwaq\r\nQm9M/freL7XleBp32DhWLxmDMyyfTU+HHMEbMnp1MKVK/Cd8LzXHe0pyuOa3\r\nVCBPehRKx7qQDsIPbyuosMXG/J9PuUpv2UQkUA6UEopFk5wot96sgvyOizSx\r\n3KOOQUlhiASSuTOkP9mmO257rp0bw4JzFR+sWYx4RaKEzoZnmSUSMdxdyXVE\r\nnCRjUWZ2wF4XzeXZNUrfYuNNwa0VYWlkU0A2+zZ7OMe8Gfuv0PMzWG7vev5Y\r\nWtP8o/0+oo9L/JSwvAtwTDeeuedvBzAbDNA=\r\n=yWdx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"90d4c4ab5f7be66a8646d0dca97fd0fc47ccfea6","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.5","@storybook/addons":"6.5.5","@storybook/router":"6.5.5","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.5","@storybook/channels":"6.5.5","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.5","@storybook/core-events":"6.5.5","@storybook/client-logger":"6.5.5"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.5_1653403294880_0.03259195343274435","host":"s3://npm-registry-packages"}},"6.5.6-alpha.0":{"name":"@storybook/ui","version":"6.5.6-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.6-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ac33665eb3f0777d8ca59da2cb520909746692ce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.6-alpha.0.tgz","fileCount":10,"integrity":"sha512-3IXF/mOfBI6GSA9HyHgOLC4EUz8OwLKD90gV7a44WRRP3k+y0+3uS1V3RiiZDta7Oe+vGImqtof3CqjSIRW9zQ==","signatures":[{"sig":"MEUCIDEHhpmGyMNMVX935GKXXOQmHaHSwYVVZjyNr14lgkJBAiEAll/BuUCTNz1uIA9/Btr3vvZFXpQEBIUTk0ZBmZH2qZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikRebACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreTw//SUJFbQXc3iv+ZQwlB2vYrfFDQdowaffnG4YpZlV6CA0fx3xG\r\nKKoPmBgydPOoQexE05ZfU91Q6h0vANxrMiZbmUzWna/thGiSVZ7UvgOoFGZB\r\nWe4lFnB/QvvU9RlxF1dt8XwtBajCrk1zta2vDz2coDGMB6er3bsEoqDRrlXo\r\nCZEiPBGz7RO0jsewKPV7Tb/EgIJpp6lt38kBfxXV9ouRH8rGV3HBheDclNSe\r\ne9kx/0XtCM8h8VSGX2oqIrZ/UwjF47/QU4or3GVpEWmtTti7Hgi68DEwdoSo\r\n09rBMvh10Dyi+rb9MML07AdktS+LdzRZVvsjU3hOTwECr+wvKvAGWkyYus1Y\r\nPrnp/XkCoQLbLXRtdmmoEUOrCoN7wAZFIK5zg7FZRokp596ZtlPP+0rZPElB\r\nljxURZ9nMEubf/p63FW6qRw5rc08RZKXWwbiiHSz/Lo28+u++IjOQTMpBITD\r\n3yNdPu72brUS9YxijOSgnXiUMmrKbOEQDxAlz10XgxKKVPe4PVQVTG30O4sk\r\nNgLo32lSXCKC3udyoP6MQGZ035+/VcjMBRdFarua/rWKX54Ze8tjVqtuDpKh\r\nJ2x9cRKe2RVxG4p7pAMcCl5FYTO0Wep1eCH7fNoSAz5WZJsFVyVJLAu8ekbK\r\njKbF/8Y91lFu+JdyCUJbsgVnwsjp/9gDgHs=\r\n=/rMh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4d5210134db3da9c9c7c8b1c58fe9b8624787b4f","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.6-alpha.0","@storybook/addons":"6.5.6-alpha.0","@storybook/router":"6.5.6-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.6-alpha.0","@storybook/channels":"6.5.6-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.6-alpha.0","@storybook/core-events":"6.5.6-alpha.0","@storybook/client-logger":"6.5.6-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.6-alpha.0_1653675931541_0.7310442772137","host":"s3://npm-registry-packages"}},"6.5.6":{"name":"@storybook/ui","version":"6.5.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"3b312728c11d1bdba9cac41d18d91b6806496028","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.6.tgz","fileCount":10,"integrity":"sha512-EU/YGczcA/v7jHlXIJ7CytK+FH2X9tlsjQbcQW8niPkwtk/gvG7vTfNhanbDlWMKnDLuFWhyHJ33nrW2mIyqkw==","signatures":[{"sig":"MEYCIQCbZqFH8EyUv1YnxwYo/yF3+u7rNiTiC0etVUkpvLX2wwIhAM+xxSjU85Z+ACY05NAHD+UqwVptmK2Y5e7JdGrOTz85","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilArxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxFg/+OMZhmzSWgcXk4VThTgEnBTF3IrBX1k+7bNn542FEknagD9A2\r\nZ3/p3ZUYGNm0wKYwhyfzlaAgckI+s5OzZ284uugjv4Oyo18zOkS/New++Zet\r\nv7v8IckmyTNvkGhqhtmCnXkphtUDAlJuWVgG46ji+hmbRJnD8QIOoy5tmWDB\r\nncObCZNnfg7XthtHmhKMpey8I3/FPLE0JYmuUnHEHXDFyc3kx3mV0NXlnZAb\r\n7UJ4zL7Qxx//A3AYbqcd5J/DouVhVIOj6Io0JyjbUoXQJAZubGrr83pAZHg7\r\nSCk/+jyg6RCakz4L6aYI0lj+j+xX4KztLud8/Q20/AoL+a8uIszTkLfdn6qO\r\n4lijAyM/cqS6sPJhVIX1UgHm7YfwbEzM1xzGHiM5ikSffq7f7UpilYhQ19XG\r\n+ED8KqRLToq4rP9SINN6PuRRp1W0jbs0xF5sDPXbRnD3M6HqG4GWeeqj2M6t\r\neR27PB7B2i1/+9xeQZqyfny82zqZeHyiY1cyJG7AHA4TuFP/2C9duxFH+NHG\r\nKRAXoT9IC+zA2xdyNfeTxbLKNFlBOXOnfqDvzy2woG4XYDbTi95xIaGy6Brr\r\nYyyWZuBABYU7pa9IOwwAphXRhhKIdqoEQc8yjHy/z+8pYIFi+neVIS7vNJkR\r\nxPIWEUsBLV6yTYWUqNha2K7pPt/AsfB//yU=\r\n=HJ8e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"65d10a3c52180f606d635d82a9ca41686a9aa81f","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.6","@storybook/addons":"6.5.6","@storybook/router":"6.5.6","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.6","@storybook/channels":"6.5.6","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.6","@storybook/core-events":"6.5.6","@storybook/client-logger":"6.5.6"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.6_1653869297624_0.2771402838026502","host":"s3://npm-registry-packages"}},"6.5.7-alpha.0":{"name":"@storybook/ui","version":"6.5.7-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.7-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"75830301a94cfb4e40b32697c03bc3a23cc34e11","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.7-alpha.0.tgz","fileCount":10,"integrity":"sha512-8ZIotl8SLXSt9tenECA3LzCFCwmpqTsG0ZQvbVBNZXHNMVC6aZ9LHPec6voHOxqozIHyLduefX5Fh415WRnjHA==","signatures":[{"sig":"MEQCIAyLN5vaSoGQ7rgdE7YwNYWEXiyx7wfT7ozpOppHuUsVAiBOw1ESGN0yYk/HfNUuexXViCX+vUt26yAhO+WJcqfFMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimk69ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXxQ//T6qWRHxd19pFUnl8nPnxC1rHGvMocKVYlSqvFC4fXVIZ95RP\r\nF23tAs3aXJyGG1MxOvMAwV63b5T9ksbYjnEsSz34uY5t5/5/TGyuMZrdUY9/\r\nc4PlkCJsNXSLMG+w/aZvBSNUCBQicw5zXk3xHp+5F5xPx1ZKdR5wpQTFnODG\r\nDN9nc/dVImWVX2ZHc67z8WNGo9R3hbtheW9iFYIh08ZiiuL/Qqx0kwE3n9j0\r\naPRFcszfQIjfPT45DR+gFrY1yx0WWdy/t8BkxqofLOJN4HnE9+oAS1iMMXfI\r\nk6J3ycxISq8+wm3lluxHTCUiHWbF/z3Q3pr6puPXywEGZXDcmZ6/WhlfR5DZ\r\nHJ2+Jr9NUUDQOzXZ/pAWD1jigQBuXXk1WX4i3IIEcA5Y0A9+ATRWg57OJ9Yz\r\nohvEcJnrv3Lg5uo/JhYTYNe0nlDXwfk5hAZAlAeyg0ALrJz1fnsfd0sXjpi1\r\nYJ/yGYdoj+Xx9x0a8zCAiWHGiCx3Vf1kSm+3o+9VzxDpYIRLw6rTkSOAwz9a\r\nxlCUK/M4B24ap457rJC7j9TwA+fdCUAmxXFIAC9IxoYLUjk7ZsTkdnNhXTlo\r\nmaGnrlM1guS3vkX378ST76AaT19t1XoAMDZkhiiV0kpwiWe4cVQ4DLbAgf1t\r\nCyrwAkcgOrl7WAkr2hKmO8HXWASHuUyI91k=\r\n=tVVn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"46553557a3823a47bd0e927107c4d66ab7b399db","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.7-alpha.0","@storybook/addons":"6.5.7-alpha.0","@storybook/router":"6.5.7-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.7-alpha.0","@storybook/channels":"6.5.7-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.7-alpha.0","@storybook/core-events":"6.5.7-alpha.0","@storybook/client-logger":"6.5.7-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.7-alpha.0_1654279868846_0.8306601489961931","host":"s3://npm-registry-packages"}},"6.5.7":{"name":"@storybook/ui","version":"6.5.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d4814c88bd1ca4781891611c2c1fbb23e221d95a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.7.tgz","fileCount":10,"integrity":"sha512-NOg44bc/w7FweuM2fa99PxsgI9qoG2p5vhTQ4MOI/7QnOUDn+EenlapsRos+/Sk2XTaB2QmM43boUkravMSouA==","signatures":[{"sig":"MEUCIQCPCh535F/pKgy/v2lri/ckUg7LVcnmqYMGmx3L+wL2NQIgPBM4e829f3/0tQSE3a/GLaoVmjJCT3AJFtEjCYcLItc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1640715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinWRxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIaRAAotv5wH2WVGivZ15za3EkCLaG7jEk5wELEp4Zn4yHDN4a/Cf5\r\nev0g70elBpinU4cmMh13llArP3xGuYXUIRJk5ehmiihyolda/jsXkH4UDlq7\r\nKeEdc5hWw0QHf4leWeKlot0S/70pabTiwC60nUychBI0f9zO/hPhfW59yBpo\r\nFQfh6aJnLdPe0XJU3G6xyxa7Lyp84eG03jzque4uCTC89OLkamXB7Stnymlf\r\nIVcOl8jj7WiJqxc4nJxiz2fpwHmiqOPCk30ov68YQM7WctZd75dune3XAzxY\r\nSDmLZOrZSsofhjoPDvhuEiKev5Up1ZyT071WJn99LaUAMJ20PMsBaHCJoXYm\r\nia05bkGco3ZZr0KY3BpdlTUuH2p4Oy3iOke9Vo1wKEIpMK9Gyo3ptaFfgPGu\r\nQLvE+VtoBWCoytYrwz/c1fuB6x9qlbsGz1aaBsuIyryiZSFgz8x9r9/f5Dhn\r\n7RE8bYdR5JJQziP/fqi2ykVHzUqF02rGzxi/4PUtbuQSrIxW3gaDXy1/6OVY\r\nOvA0OrQ8uiiNkfO/qPEckzNEud3u6zZShvAJ0/ytKjq4wdhADBrKDh7K0E/7\r\ntmXvPDN+y3Z8m8paxVSzXebD7PWU16h7IKVJUqOs1fYdPIdTbH5/CgQtEooZ\r\nPZ5IS7NXyvU+jdlTfQMsVgsvOmMTkTlB1oU=\r\n=oKHt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7e19d3e734efa14e7cffba146295ca0d3467a8c6","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.7","@storybook/addons":"6.5.7","@storybook/router":"6.5.7","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.7","@storybook/channels":"6.5.7","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.7","@storybook/core-events":"6.5.7","@storybook/client-logger":"6.5.7"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.7_1654482033162_0.9733147910746633","host":"s3://npm-registry-packages"}},"7.0.0-alpha.0":{"name":"@storybook/ui","version":"7.0.0-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"76a10c3ea2fef3aece9155e9a741c2b45e98d720","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.0.tgz","fileCount":9,"integrity":"sha512-xk3junu4KQSQ3RYq7KNA4M4GSOtyvtgo0KcDxSwBEO36oZh6bR2j4/fGvItZP69SNd8aprKSOUHzhNwGSEhjxg==","signatures":[{"sig":"MEUCIHXNau/8FQPSgJuQ2L9HSIp4uC53MrpBeeppXKlJi88sAiEAuzhL/dtTqmVf0zABDJxrdSss5ZvQ/kjKmyObvz2XBis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1822060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinjLvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSsw/8CB8xk9v3ReC/SC1/tSut1+JEDhfwtMXOT2yIDhjGWgYDvqQU\r\n/fI/XkCRuNLI7tzXS+5NVWlZ7WJIor/Y6PB5k5DM66sRin/5OrXo+h9Rx/Ou\r\noOZjwL7HA8+ZQNvlUvmkSkKg0Tfzxlm7TkydiX9rFCfTddp+0OLqIMb3Jkx/\r\nEW1uokM2Ce0cGnoYb/veEFejV2ffVJBFzGH/aRMup3evWohGcfqe9tRuq6y4\r\nUWdUUxKhnUlMFklDx0p+geRQWU/qYWnswDSGbwX0KUmwgKlZD8CoeCerQQBA\r\n1x6LrkwG2zbTzlBNv5ExOf0Y7JY1i1zPBTMvh+JgT7xIiLFgCz3T/pLSzz05\r\nI9Ef90jcKhNzeM91KlhUZdZtdIwtcfbDdEPGpX9dTy1DOAaFxl63SwYLCSS6\r\nQPskpoI7CEeWR7pAhwvuDTJscV1j2y5OpNoi9j5ITBKBGf/5MfCtICSk4EUY\r\n9UHI/Xk8r71bGRsa8EDpAerNKXcqX/LtD3tCz1R/HzRonxDZbtBkN8CygmBY\r\nEaNGao3pIxMZ9R7H8pocGO5PG5xNCAQNcCUTa09R6EcIH9UuSR8eqeCGphDx\r\nbrgR0KX82baPNDfLXS1YEWsDwIlfBMpQsQEnOp0SHMT1pkTqnNju6EWBZYdi\r\nij1FnqErsP/J09Xed9AbRnyzB89cERgve1s=\r\n=36Q/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c82d897ea765da8cf4fbbcc2af1f28c808a93e23","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"util":"^0.12.4","core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.0","@storybook/addons":"7.0.0-alpha.0","@storybook/router":"7.0.0-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.0","@storybook/channels":"7.0.0-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"7.0.0-alpha.0","@storybook/core-events":"7.0.0-alpha.0","@storybook/client-logger":"7.0.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.0_1654534894900_0.9594806579220103","host":"s3://npm-registry-packages"}},"7.0.0-alpha.1":{"name":"@storybook/ui","version":"7.0.0-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"31986c18cd5dd884d249460e6f9a8304f3832bff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.1.tgz","fileCount":9,"integrity":"sha512-oMBuPAeXs0LDc8+PUapkTCVCHfv6HdXE56WlCwZSKRH0E8pqdAAhdaUt3SuqMBNqQjYu3RIvM2tmkrcALiDEBQ==","signatures":[{"sig":"MEUCIFLg9hDyKbqpgeiMj6Ayo1HEtMbPNiKLrsMQITmAwYr6AiEAznwEr+y/mzJPwnlPtdTGo64r5wTqdeZLvYQvCzluW9M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1822060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinkJlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3cw/+L7QONDBAqmnliNuSNw+/6RT+CfnWfCXEc0NuAVCdXwE9VX7b\r\nrkpDRLYlmLUWL3NBQC/ax84SflKfLq9HcXxG4G3CEFJc02dMQEfMCvl1DUCM\r\n4XW6tLSPASLpRxzioZLQU5qFheufSHytc2l4/3k6wiC+skpmWbpYSb7jOd2L\r\n32XNX/oXRzdQLIVrFb4Jf+sYQm0xzMOI4NqjTo2Gp7friT22N1ieuxTQjL1K\r\nRv5q6k0efEfMs8arUS0y3rxSmCe19+tyQ34MAJRnnanYwi2AZXMfcKDkVBWp\r\n2bzKQzaPLnzln7ZqjdItPp6O8zjMBebPOnjt6ygAbzifDKLraepOqIgbkfBg\r\nrmKrnkJpEX5n2czz7XqReKJFc4peysicgBHhrrgjq1MT45Cri6Q/1HLQYIKU\r\nazZBwu7JNdnbV2nflA2xqRW4AscuPQJc6AHf0pG419Jd/2pDKASDvLerkWij\r\niDRSKaDoen8kjlvpOSzK4q1IZpfuE24lWkBdMmIJdlpbsfRX211ps0LZfCoo\r\na1Aelic0q5fBVJaWxZSwugJZzCDh7p9XquKLoKpJOaGeXF5U6QkGZsyMipqO\r\nw4zsgqwl/eu0ObOK8/av2ZmgkI9pF6qLqKxvEw0UtBqUqc+yDc0T+julu4wg\r\nzy1f5/aDwfyfrilFuPzP/65yxUuPxsD2Ftk=\r\n=fVOq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b90b85210f66da59656c2ef58b0910b156256bea","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"util":"^0.12.4","core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.1","@storybook/addons":"7.0.0-alpha.1","@storybook/router":"7.0.0-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.1","@storybook/channels":"7.0.0-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"7.0.0-alpha.1","@storybook/core-events":"7.0.0-alpha.1","@storybook/client-logger":"7.0.0-alpha.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.1_1654538853697_0.6001083579739144","host":"s3://npm-registry-packages"}},"6.5.8-alpha.0":{"name":"@storybook/ui","version":"6.5.8-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.8-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4a1238d4f5ea92c164ad8e23e92323d3c4117e55","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.8-alpha.0.tgz","fileCount":10,"integrity":"sha512-RCViBqSMnrYrMLkINdrMbFa/Cu9DjtlEYwYTj0B6a5qjpRnYsolUZ7vAEuCzi13pkDvPAImkRMT1DpHRRK5hAw==","signatures":[{"sig":"MEQCICTGfkwaeN5F4wkTPQemXrEwE5VTyeEHrO82Vnvy2Z4CAiBhb3uxISWOxCmIIsOjW1nXwTjUSi2ZdcqaDLwxBlRZuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1641254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinvnTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNfQ/9Gpovitm5fkFNB/FxyipggIwB76N7EWKcKHZ1IVfJxQs2F6kK\r\nPwJ90k8cccosbe5UKw7RyPNDiQN3k2pZLaRR7Hp5yGd+wNYOpHCW6+dNZAP5\r\nDHzRtDu0TQ1rYSmXmTh40bNuQ7K9Vkav+xXcLd3yH1Guuz+pjQ8ki/0SffOy\r\nr/pA7q8lPtqswwvsAcS1r2EztbksQdzsnuiMpq1dfC4RjBVSQnqQfzbcNIhz\r\nL+y2/vbNPyQY8WjpaD00uZeBJ2NY3HZC9qPFv+g8hadbzTZQFjN60eDuOGeU\r\neC6D80CGzGVwl8uS3o9gE0044PY54mi0D5JdmKk1n1IepS97kgbhtAgNh7R8\r\nPCq5bm5uEWmvuvC6Wq5XYMokr+MzfmSio2XEf6bARtCILLf12WFcw0Dyl4yb\r\nd5IYn8Kalo5Xjwu3E8WEezpTARFc9d1FFUywpKdHlNq0xeUc8NYBjNnWapZz\r\n/qLGq+ttLZsNw4ZqCZy7tFa9civMWP7ckUNQKpF6wGan/GUx9YkCGQLx5Zub\r\n6NZ986kDoPE8fj1pxo8C2JrQevLP74rTgnA0HeFiIy9bSYkE+2JGFobs2U1i\r\nTbNaz8xCm+/EvM6DdraLlTQbuwCWZdgbgmw/vv1Ay/izP420t3m3/ertmNWt\r\nR8/1hdknSjCYVboRK3s8dHmaujvnUPJG4Cw=\r\n=qto+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"22683e756917d598c87fbcf73de434e1ae608556","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.8-alpha.0","@storybook/addons":"6.5.8-alpha.0","@storybook/router":"6.5.8-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.8-alpha.0","@storybook/channels":"6.5.8-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.8-alpha.0","@storybook/core-events":"6.5.8-alpha.0","@storybook/client-logger":"6.5.8-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.8-alpha.0_1654585810762_0.2590013734182701","host":"s3://npm-registry-packages"}},"6.5.8":{"name":"@storybook/ui","version":"6.5.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"acd8dadd221c68f65c4963c4ab86b4a757860591","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.8.tgz","fileCount":10,"integrity":"sha512-rL09kxgY9pCVbxr/VUK4b5FL5VbALfciZR+50sNT1EcTDb9k0OPeqx7a4Ptc+KNkgyPdSTxUGvhzVqH5PYrhZQ==","signatures":[{"sig":"MEUCIBZNAA9aMAppVc320n72nyB2P1kosCK4FuyW4bFIfRjFAiEAv5PVqq2uVAqVpLhgz3HOeQjuA6UAcBIfmxt/0Kgx9xU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1641182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioOU7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0Gg/+Juy72U12GtZy0FTH9wOTOYNRqcM9xXo2eSvZ4StmCxMfWzIT\r\nKYxORi7H40SqBbcrRJWRYWBCh0Hmc8bmvQL24AfKUKbtvU2qpWN7jtPZkjgj\r\nHj1CuOFhznZLFoZpmDCzuUZODAHrl6T9lcYqnRM1nBYiVf1jPXmMdgp32wUl\r\nv6zgdZwNGDJ01a66ufIqYsWIxlqtKRqmuEbQ0hTnGEeJvUw+wHmnjDSpBiv1\r\nnA8fOhFh/8rbqcvxgXK/iTt9fyso2l+UCNQWOi9S7ZtyfHG2clcZ8Ugjb0ka\r\n+2TuR6F8WT85IryHABHARQ+QwMn9S/QlA1xwbD0vRrDVPLAgw//SuFlHWYkH\r\nAjO7BuJ1aPdMme4w4Tqbjx0MgTnF/MoWTqkI3LOq0qN2RESg/qd+Esp2IUNN\r\nok6fCI1Rh3Su3G9wEytP/1tr8jc9GWLjm2TrtSYhm8nU4BiYeI+/cpq8kJ3+\r\nPkRt2r6dUb8+KJtejYrROTExrAZGoBCCglCrxRQ6F4GORLULMWnVmWTWmgFy\r\nlXIZknG6hsvtwKUQJe3ezaRQ/H5HdaDBXFBnnJpMxdsP0L2Nf96UNoZa0SHv\r\nujy8STVYMnCBl+iIZpbvnmMsllIdIxxOlj521i/JJxBMeAr9iC5lJg9AszlG\r\naTplmWrCh+C2qPoa6TgAejJTrpMDzsu8+TA=\r\n=90Pp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"62155d6836210000be1981f06690913043b4c35e","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.8","@storybook/addons":"6.5.8","@storybook/router":"6.5.8","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.8","@storybook/channels":"6.5.8","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.8","@storybook/core-events":"6.5.8","@storybook/client-logger":"6.5.8"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"qs":"^6.10.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.8_1654711611125_0.8192970533137143","host":"s3://npm-registry-packages"}},"6.5.9-alpha.0":{"name":"@storybook/ui","version":"6.5.9-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.9-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f5df0f22ecf601ea27edebd65a221d2a4ddddb12","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.9-alpha.0.tgz","fileCount":10,"integrity":"sha512-PT2IREf9wJhv73ODXqIEQMkkg/RPT4iBor0gGB5MmbNVYhmuODByIeX6MSnPlymVQTVGQQo5X6V23rg9pUtUhQ==","signatures":[{"sig":"MEUCIQCIWJWVa9OxlHHJJb+n0BOWiQgDztQD27dtNU31w+4CZwIgEe9qwFhCfQvB6o8bqv5Jrai9yXsUiPdQWvBiP+S3OWw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1483738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipYuHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFfBAAmcO4qPNrclbTGSgkGN4eVzmYHJ8JmK/e+iuyS0ZmVKXRGfwi\r\n9ILRTed7JGBdAnFMJdr//XG6XCcmXtwQY9f7OHFNTFVxJRGmOggjrYRh/5ns\r\nZE5huxXpdlPZlwQZiLWthIceNnXu+gzTCMLOyBD6H1b5wXeTjijMV2pZPicx\r\nSD5rICna5oPvybpHDjZeJnhHL2OSw22pD+T5GGVR/VBZFQ5eh/VARc/X9nFf\r\nEheBq/z7A7xyJgXGJIcJV/ZDLAWNUpWdBp3yt0vJZmp/BEjMOTpn2nWeSMp4\r\nRFqjWkfHdlUr3f0IxRNV7LAjEG39HRLBhFfDlRuwZ7uUWUtq0Q2DnpQNfGX8\r\nuGW9cG3pCnqtg8sOJIEAj69WlHesPiv2ZE+Z8n3Lhb1HXPaMiTnDahdGHa20\r\nwTprO5Nr3x2OYTgeAVNOP2Hdo/3roTko9cZLpAavgSPbKE691OlcguuWRE7K\r\nG8r/xvPT8Dj99spngcR5y1DWtbY2pQ+2jAY1ER0QqIhtQ+8aGKg94LMvZ1JE\r\nKbE8PdhL+Oh5M+Pg9boKgsl+DL/8N9AxTqdK0yCp3L4Yw7H4KesmYk/qNrFE\r\nUn5qagCNe2iM3Gj4F0CRKcK5ZRQ+GDj/z3nnfdAoppV9ozdLun/8GnV9d7B3\r\nPDb0CaX5UhU9Vxi5V1LGw0+AMyQOFIcPqAg=\r\n=WOzk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"561ef6e64c97d1c2457c4ebd807a82eca60a84f5","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","resolve-from":"^5.0.0","@storybook/api":"6.5.9-alpha.0","@storybook/addons":"6.5.9-alpha.0","@storybook/router":"6.5.9-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.9-alpha.0","@storybook/channels":"6.5.9-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.9-alpha.0","@storybook/core-events":"6.5.9-alpha.0","@storybook/client-logger":"6.5.9-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.9-alpha.0_1655016326765_0.08720276435204899","host":"s3://npm-registry-packages"}},"6.5.9-alpha.1":{"name":"@storybook/ui","version":"6.5.9-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.9-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"1fa800bd2757a62bf61dd51d0f48047d814e7cb7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.9-alpha.1.tgz","fileCount":10,"integrity":"sha512-yrPUbN+45RNvLj1GwXAlKYk26rIqfZBf5nEqR8/vvoiCsASJijgfkaHPJxDKz+EdBm6Gfzim+SrUGG6et/Uu4Q==","signatures":[{"sig":"MEYCIQDnGEej6ha5wTy+Bm6fgrJ/iCFB+0Y31RHhPuY7OVeBEwIhAOKKq7jqdBCR12sp3WeZcXviuEqDW7psRjN4jtVaZ+l2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipnK0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrc5Q//ZS17FqLC7ngABh0IKrEO15tHbUN7X7tyJVzJ/nh8N41/V/hd\r\nfrYaiUIAkiQxvuV+J1Sznvh8j3Z9v4Yw73du0SpSQJzUjFG/kEgeH/fCKTp1\r\nz7CVAfkef6uLhSJNER33SwuMnKd3yc/LhjD9jb5kIRtvxH1zPJ3iVFs9H6Qj\r\nVVCyFj6UhngdudXCHd/TwK63NcMsKPxVAbNTyX9IUymbyZBJzojqS5UjAAeP\r\nEUVeH1PxbYgClbZDGiKaD+quZgdlv56WyAl5b3Kyk9jrv9pORlBe36stpqJG\r\nXS7GLK8F+fe9pBtMxUik4olmF8Mzdq+4gWZKOCEG4u2iF8v6GROs68aFBuIL\r\nglQ99Alt9GBHDdQkfiqsFOCasNnBs2wmJQLZPLCovNAwgCYlwG7oehelmu1f\r\n1txvuhFXs0jQHsmUbv1CvmaBH2pGig1FPUyQ2eu4ae2QNM7vuHHGJO9E09KK\r\nTMbK0lUrUwIGUlwa8HbI2wlEWdfHQGbh0CzOPh2xcye8I/xbdxODelH0sClJ\r\n8DrNMA1wiymjhDMmlhxdmhODyeooYn2TpjrXWstjtrvdyXSj4anj+KUG9HGk\r\nINsHi0wpDZNbA8e843/iGTdEqi37XLzmCA0q+8+kLe27m1IjjSNxCzdrY46b\r\nW221iS+jky2Jpq+TXKg+vRMCiMGJ+tzhowU=\r\n=Hs9Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9c2e14f3230290d5ed7f3c60f153cc1a2126f95c","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.13.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.13.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.9-alpha.1","@storybook/addons":"6.5.9-alpha.1","@storybook/router":"6.5.9-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.9-alpha.1","@storybook/channels":"6.5.9-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.9-alpha.1","@storybook/core-events":"6.5.9-alpha.1","@storybook/client-logger":"6.5.9-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.9-alpha.1_1655075507803_0.3080357823171709","host":"s3://npm-registry-packages"}},"6.5.9-alpha.2":{"name":"@storybook/ui","version":"6.5.9-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.9-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b267be1d0ee9e75090460c3c07aa6efecd5ea298","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.9-alpha.2.tgz","fileCount":10,"integrity":"sha512-r9PFRBlm9CRj8i9Mvvo6eb+0oZ+5ANUfedVSR/sQFyGMWbKXs53MUdxlHzhsKCXveknalDbNOsJ01KDHTdr3vQ==","signatures":[{"sig":"MEYCIQCqc6j4ZvylTnNONJwjYABTTbIWVQLcpkqXViNrFvDZLQIhAKbrTH7Gl8SsXr7IQ15ruDxVer5GvL2fCIyL83thmLmt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip3iWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr14g//XByxgdLCbY8XtdXvysMS0ovT5ZcI3b/cx8kTdTciB8NrQ2bx\r\niFykAXhcoyqXXMmWMz3UlG2VMbkDHfL+8je6/yw5YbxBzFgTglcDzODXjdKZ\r\nP+qZg+X9TPDWTPxdeaVhb6o+poibDmXz6Ear2/VARj86/83YR40kAIq26fzz\r\niHZFaBc1879NQhT7N/5mZzBlzTOBsKiCLt2o+lv2ib+GvHnk5wV3bkH1GDOF\r\n6zRo2BNEDAeq8B727ZmlY5ft/40QLkgMhjW8OgUXIVUMuqcCPRK7QQj66NKI\r\nU3fBjN5wJbax5fZwpucHCi4FGWJ3LsrKmsWYuFCmON8MMPYmUEu0Q65WpEm7\r\nhjxBJjG9NnWL/9kjQs+3PWPvJcYuGv2CyCYGcRbHVobPGVGfGpnV1y8eAJPH\r\nF4yQcHsdL5g73PZeegFAQxzgUGRDoQhZvj/XE33m+QFYrMT5hf3W1AmA3ESx\r\nObZHAX85HrI+g9uyOdPui5qaZXm4uK1GM0ZxhItrfRak+jaO4LJ9kSImKPKW\r\nRMio9MTFtWnLaPIRK1Q/NdtU2W3HW+B7krlHdzsrnua/XvpDZHIKapmF75Jh\r\njLhh0ZsGpAcvKCc6dXFpGDgzQ24BNvkvRcsAsEmrcyiG7rG0OeJ/7715P6LD\r\nlaVsVMCnWSchkfAIO3hHcDKs+bJS9inSyhc=\r\n=493h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"2d56b47695fae26cb13e94a65198658b1792c9ad","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.9-alpha.2","@storybook/addons":"6.5.9-alpha.2","@storybook/router":"6.5.9-alpha.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.9-alpha.2","@storybook/channels":"6.5.9-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.9-alpha.2","@storybook/core-events":"6.5.9-alpha.2","@storybook/client-logger":"6.5.9-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.9-alpha.2_1655142550263_0.8588395220237688","host":"s3://npm-registry-packages"}},"6.5.9":{"name":"@storybook/ui","version":"6.5.9","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.9","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"41e59279323cccc0d613974ec9782d797220c8a7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.9.tgz","fileCount":10,"integrity":"sha512-ryuPxJgtbb0gPXKGgGAUC+Z185xGAd1IvQ0jM5fJ0SisHXI8jteG3RaWhntOehi9qCg+64Vv6eH/cj9QYNHt1Q==","signatures":[{"sig":"MEYCIQDwEWpatbSjDv8TbuM0Du3nW9ERwSj82bp21eKd4fJTdwIhAOzYjxB7q7zmoJHKEwPlJVc8rZmMLa2Pl4PJDa62PG5D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip4XwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoeyw//RWWWeBIhHhTGueWIpfiXWX3i7duIiGktEgxq5kE2RroA3SnP\r\nD4nG5KhpG8wOuxjvWS7E20HbklLd0VvrR0c52/dY1Gg7K6HuO+qfhEFOOQOM\r\npnmS8aJL2YapmE9kYReDgcHiv2sy9Qp9/tQNE+no9Ihg9SFu0wNUWQXIw/RU\r\nbXlEHtV5kWpimhCpWSVmU2SciNRiEKuoNJe1jHssjl5yduiAEM4pKwa5b8qx\r\nQEm971GWqSNqTorb34nWWWbuKSvidlI7EIVxeJfS1LNuNvScAJ2d1QhR+rx/\r\nJBys5dwieLh+OPDwqFTtRnOSVLl+FqK3o1ru4GglVD+JGnzeuCuUy9U8cdEL\r\nTDcpkCEBbU2+vnDiHHRxWjUqVHhJtAZ29vT8XFK6cZCVsF54mqjYJohMGw+s\r\nmos04AS3n7+nIGJEbA6MMYQyUDKiuUe9BpvjM3pNuCFpEA/vjfrAQnVzBL/5\r\nLB9ekz72m36lRnyDH4l2cAAX+xiMom1NmAn7v/Zce3V0+jSpiIJQPIY5Zmiy\r\n2cgQNzAwt1aguko2wBWLZvY8GIzEtgCfrd0vWzqgdNCybiyb3LtrdxCEEojX\r\n4k9VrRVMgkijhdzf64hec4hCUITJQjaSv6No19jsUaIv63OYMYvfdWPT2Geu\r\nY7n0V0txJey9pBg5ne0fW2QDleC1BQHawI8=\r\n=0iB+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e2673f765722cbb542ef1b5cf8d533c8e746a127","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.9","@storybook/addons":"6.5.9","@storybook/router":"6.5.9","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.9","@storybook/channels":"6.5.9","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.9","@storybook/core-events":"6.5.9","@storybook/client-logger":"6.5.9"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.9_1655145968588_0.24356384058778602","host":"s3://npm-registry-packages"}},"7.0.0-alpha.2":{"name":"@storybook/ui","version":"7.0.0-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"346e4bf41f9cc8fa7f594684ff23d38df5c90864","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.2.tgz","fileCount":9,"integrity":"sha512-Q93lrMvEwF2Cn0ypU1DEqYzOI2eUU9OPy8z0cCWdlpVAB7NhHaCWFswlM9n/iVNkv7/poPVgznWKdmUu7ATUIg==","signatures":[{"sig":"MEUCIQC5i3kj72uGPpJ+kLFShRks/eZ6OeIcAO54y6aU+18J5gIgHBw4YZuGvweuCq7GB+kLCLXpvy2KoSNeiOH9qNuo0pY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1633782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqTIwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfKxAAgLnOCNhCkFFFgyoQruKc4w5OJfNnrznXAehOi4ApMCx13/Ov\r\n5QFzkEoDy9MhIeeoQKO0uVOShb+lzTpI7hsITAZiqkEilYthU9uy52b5mG6c\r\nduhKY6ba5kQM+E0/wDeIz1a9oBIqcGWZlkv7UU+5n9Z8uOLjgGxsmXcDn8J1\r\n5O0WlS9KXa80ACrfo3bVOYu2zCiNpD9RxZen+WCEMZQPKSJ/Nwpo8THm6itx\r\nwuWDgYepzQ0u5DTQNY9Ky+Cw/sRcCI7fkf1OE/HZg/ZNgrioTZ3JiJ3u4tJQ\r\nEXH98oknO0mLUyH13zaOCZu6cZbS1icd9Zz2RPaDg7gTT3E3XKtWk5Hy8KME\r\ndLZZ65QirOjWbDMVi0L6M7w8ns/tBEdBSDnVJltQzYzEqTus5Sk/3mI79Hp5\r\noP2ER1dvX/M6agzbOIVAS4Fru3g+8yRFJCPxfQTaCpbzRnkVYCkH9rB6hG5k\r\nj37u1Mh9T7oG9LAAT4PFkqNYjIXr2j0qSFSIq3ANH6VE4hoIJEDuZxU0lCPK\r\nPezIii7+UKjDhBS1in6IeEudT3KwZVga+9jhe0e3/b1b1fk00JwEfU1wqX+S\r\nSEL7Y+Qukn47+PuklYj/wAB2w+DmKm70HcppwpBIFfnrhCAKyg/OC3nG2aFC\r\nRNLPIXPmDb3YCVgyRyNsPtbrFQ5bLKadtAE=\r\n=QqQT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"44920e2b6bd51981bac5124743c29fb9f5517e44","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.2","@storybook/addons":"7.0.0-alpha.2","@storybook/router":"7.0.0-alpha.2","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.2","@storybook/channels":"7.0.0-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"7.0.0-alpha.2","@storybook/core-events":"7.0.0-alpha.2","@storybook/client-logger":"7.0.0-alpha.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.2_1655255600164_0.522367983703828","host":"s3://npm-registry-packages"}},"7.0.0-alpha.3":{"name":"@storybook/ui","version":"7.0.0-alpha.3","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.3","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7df79da7358804639f4f9823cabcad439ef4f956","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.3.tgz","fileCount":9,"integrity":"sha512-uvluJ4xQ2USR6fqOn/MJiaR5oxz7dWQECEvZaJoGFBmggMfaobwf6+LFKLP62Y5c2d2RLLk2HwZ/eJK+rvWmKg==","signatures":[{"sig":"MEUCIQDEyeMqZwXNIQoQ1KVsMqU2VC8zumeKE5ySxVPcFFRiCAIgetkfefl1SqJ1ljyNPJZ3LfuXL4e6ZbRGMNVcIICUeEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1633849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiq1y3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxZg/8DpXSTkUupcFaVJgfW3OFxXIpTGuoAvlbZ9blFHd+reCGGirU\r\nKcR70gVpD6jgAvxVHQP/L3g2DT65/oqucKvRluLH1C9e5e2tOo3CTaTh7vJj\r\nETPuxNQ26XFQwlvd4OFwozsd727K98N7/d7kZ1P+LYjqDu4wPAZBgX5kY1tl\r\nbaTr9OjmhZAxNTPlQEgv3E3xt1cb/u/45De/9ZYWiDd75sU/ZC4gL0JqIvCv\r\nKTsY+zyeuAGT4ZTWOTBNUbKXyGq3RI6R1Cg2NZUpqy7WICjvhOAsrDghVkPn\r\n+/o4n/VFDI0v39+7VqWh/Fx2OTZwtcDdUyaE13dlgGzNIN+PRri3iWmqM8ur\r\nY4oW5E2kHvoQIp7naSx1braE+CWOFoQ8qobBtKDm0tQsBHxifwpK8YXH6XjN\r\npckZYErcj1ICtHJue1I5wEfvuCj9WIwIHjlWgNNWyQNVQ3SFA+Mb2X6LaOzx\r\nC7H/YKmDY/BhMx2lwaswjQ7O/3m32msEho/fFLT3BjIisz9Kwck12bhcFUDW\r\nnAUcNNrgy818A01ad1WMbKee5wr3pA/jk19XTxogAi4yBUm8AZwvMDl9KYnj\r\nBaUIauaGCODPSoE+NYxw2lJC07PSPEdJ+JvxSWzocHu0TlwVxTkHW+uWpsVJ\r\n+SS5k45Bor17MdHWGC1+S7rpwB94NOinFwA=\r\n=6RpA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"629b056190993bcee6445471b8cb27208eb401a9","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.3","@storybook/addons":"7.0.0-alpha.3","@storybook/router":"7.0.0-alpha.3","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.3","@storybook/channels":"7.0.0-alpha.3","regenerator-runtime":"^0.13.7","@storybook/components":"7.0.0-alpha.3","@storybook/core-events":"7.0.0-alpha.3","@storybook/client-logger":"7.0.0-alpha.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.3_1655397558898_0.8272707322054766","host":"s3://npm-registry-packages"}},"7.0.0-alpha.4":{"name":"@storybook/ui","version":"7.0.0-alpha.4","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.4","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7f00085d968ad477c4cfab560c55b69755ddd138","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.4.tgz","fileCount":9,"integrity":"sha512-CqmtteRThHz7kQIFJg7SwvfpCz6AptTu/CnH4g2+wx5jrRJOpd1WWoNWxWSnWycyp3i5aJN+KnN8FhjxBISHMg==","signatures":[{"sig":"MEUCIC5ZAYyCa4pzH2F7nfKrBSLguSY7pCXXx+XvH/yusb3PAiEAl+rKgVWRqejqWblEMdKuYiIQrW7KtKEZYs++VNY2kSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1634000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirvTTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLCQ//bDxw+Fth01hghu/4luFZP9T+d2a0dTSuO7Flo3YLd2c2XcMj\r\n5WxCqoNH9ba1I4KDvvBS0DLvh02x8LqppOlwvxIxA5LUiw5NU/RU6shb6u3+\r\nQv+tSxvOgX5fFQJ6e7A1ezl3GXIzE9ZFnGQEJfJrio9t3JWxALWW1u12mpFh\r\nw15O3VZ51DDEqrXZnePXEgp0TpKoa3bqh2JOFhHfcL6dWOq9SngHHGHwIFT0\r\nzJbAILbHaXQsL8yzYjibR+/6bihrYKCTxNA1hh7HXy5v6P1CTzT4KEJ74FVF\r\nnQSRHVlyk3VCoThkw+oAqXztyYK8oQ5OGOOWcpzsJzERZClH6JAT22TaxRyf\r\nEZHnbyKmY2zlQWauMsr9AhdG/B7qibRB9comI62+onkceKfH1EosNHtbPQPY\r\nbWRH6NRjW3q0WUGIByNydxKG5msrdaz3WmgqozWzr7OxNFGySIBxZniSuTbI\r\noTgKkRV4YGonMRSgnhTC60Ew0ODCfW/80V2FhXfwRjEfXbF0Dkg77zkiFN9W\r\ncxKbGXhlFxSTgR2WXyuUC05JXRx0iLbDOYG9XuiKaBhGvLEKR7vKVF9LtITt\r\njSF1Q/2iWOVMy0lhVujBNtUI4SjSvCRkZbEwPaKf6YMaiHPbGfHu9gplUulk\r\nGYkT2LyBNpl3lt2tmKtMh/3FdFjM3+LEB8E=\r\n=NhrT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"006ed54452dd7c37a8cbe91a84f5312182f7ca00","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.4","@storybook/addons":"7.0.0-alpha.4","@storybook/router":"7.0.0-alpha.4","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.4","@storybook/channels":"7.0.0-alpha.4","@storybook/components":"7.0.0-alpha.4","@storybook/core-events":"7.0.0-alpha.4","@storybook/client-logger":"7.0.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.4_1655633107240_0.7432314598091379","host":"s3://npm-registry-packages"}},"7.0.0-alpha.5":{"name":"@storybook/ui","version":"7.0.0-alpha.5","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.5","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af2029bac40dacf1af803712bc8176bc2f37882b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.5.tgz","fileCount":9,"integrity":"sha512-14BHefKfPxWKxWry3j0k3mdUBsdP14fpNyw882btAr1gQcsMgYOR7ukFBEDhZT2qzHCCNWKJgluGNZWSSQbeGQ==","signatures":[{"sig":"MEYCIQCOOKmX1M3HQkSrSeVwmOgzXV07/UYu/9JiDD1joUup/gIhALeLjT17By8cHjclOijBwWMqy2Jpq1mi6FBxIKb/nR2i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1634000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisHopACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjZg/5AZHLvH+NG8toj2+3dd8wyCrgkVz5oBxUVqDbgSLkczWEyeLa\r\nSaAKfOIlkvqBAquVrFSH9ZKxBGocEmOVgB1bQalfOMWDeL4WicCPjNIJNah2\r\n9YoML1pF5hmLBnZYbnskw5lF7D+Pbwu5XJyCihiZAVaZxS5VfIMOe0uZ09db\r\nXqNfgSFg86yRm46oWLWpJYUa7QhLJzKbrxPZ7KhZpTA2KAJK53xBu/BIUllv\r\niGUUiJhsRc5OEXmE7SW7zXY9BNbU3q6rOAAoePj6icqPlLYhvcAq3eUfeOsm\r\nuC2xMSN18zoaIDAYKEO12n/jVMRaqvv1zjKLnWX14us6HFykevbRCjBerfsG\r\nP+W3JE736W+cxFKShvwagVND3v2xOwECGfMc/ScHQmzfxwGVfh6/FVYpacZd\r\nfaxVf/0Zfc3sDmKCC5nNkfvA/AYjr5NgKlWy5Mi9cn+PH99rUFEqbvxQbzGZ\r\nOWk3k9i4kJJptoC8PvpE108tbYDdZQIRjVIermxwyzAlofwCSZjF4MKeCtX9\r\nDBkWkhzVKktzKCMx5eN7LWJ+NNajp/hf7WVHJjG8kiTPUFiLtWE9B/Y6PGZN\r\nHimyPEyERKaa752bsTa9CVzcKsh7DHeMn7Hlc51Z1puTupsfvlFBkG1sXTjC\r\nUDi7oHDGm3kBC78EHkc0fNGwYH+xuQmsWPg=\r\n=cTFO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3dd46982823b34d9f37be917b6247631081feff7","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.5","@storybook/addons":"7.0.0-alpha.5","@storybook/router":"7.0.0-alpha.5","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.5","@storybook/channels":"7.0.0-alpha.5","@storybook/components":"7.0.0-alpha.5","@storybook/core-events":"7.0.0-alpha.5","@storybook/client-logger":"7.0.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.5_1655732777631_0.9397516147204934","host":"s3://npm-registry-packages"}},"7.0.0-alpha.6":{"name":"@storybook/ui","version":"7.0.0-alpha.6","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.6","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"6346b175e6068dcb88bc79e229b871768916788d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.6.tgz","fileCount":9,"integrity":"sha512-Aw7+2EQXSZD4cnXAnWqDswscftSb9GAZQQ7XGzOjaSH60SlWnQBf/DwwoFGr7jtgzy8gHJxtNZnV/KgGl5J7Kw==","signatures":[{"sig":"MEQCICVLoUnVQI0XvHxeVsuf1FXTT4K62hzdf4MCAT8834DZAiAUIvd3V3odbMV8cfgRudvPUY9rlUvZv6+xL8zboBCMng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1635425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiseRzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrjjg/+Ml45O8bDOHLljku9G/tHcxOnZkNH+H8yqyRtHagPvn+/hr7L\r\n7U1OnfS/EmkugusLLxcGS+2v6TJ8u8Z446O2idhFvuCoegSJHYP+UbMqpTye\r\nAOurKGrFRqEDWm31yJH1hpGg0HwXYAabaij7z1N88N+h5S4qdcXtqt16NUtZ\r\nNcR4UnCqE00xRVA7V3R1hBAGSS2DbEwVxhuZJDB9fN36XrlvqfZtE+BkrsNu\r\nCmBpAypPb6ZgA2JXnyJ8RXJPdtBvQx+b1O1JTLxZJ7xJmIkbQnp+O/AlRn0H\r\nHBWXM2U/+2KRpvpma+SO1nJKI7Owly1Z3QCKG0imSI5il6eQwsaTHe+585yB\r\nPUWPDZBq290L8DgbsF+S72hsAFTX3nBwfNr6tlShharYsEOQcZnUBsPDPWHF\r\ndxqyENP1iqvZ74N0gu8yNDeHZOATrIOYMHjCThD9qPfBaBF5uq0HMNRoy+BO\r\nYcogE553IE3lVohlHgnQ27AtMbq4wN/D1vLLo2dn1lzZXGtdFCa6FNnRmNLf\r\nI9LGT8Mlb5H3FgWo3ydbc2MWygdwc/f7s/Dncu5kvT508zvhg/XwDgxfEiA1\r\nB2uePNgyrdzDhD3Yps0pQKWafwQMkvtYT34dCG+GgkhsoxfwJxsEqGkT0y4B\r\nKZMuPDiwrPMPrD8yAPIQmuh5eRm2NfMi36M=\r\n=XW/B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a88dcca40ba169a373bad33dd76e9a4bd4f1f5ec","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.6","@storybook/addons":"7.0.0-alpha.6","@storybook/router":"7.0.0-alpha.6","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.6","@storybook/channels":"7.0.0-alpha.6","@storybook/components":"7.0.0-alpha.6","@storybook/core-events":"7.0.0-alpha.6","@storybook/client-logger":"7.0.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.6_1655825523727_0.831305095729777","host":"s3://npm-registry-packages"}},"7.0.0-alpha.7":{"name":"@storybook/ui","version":"7.0.0-alpha.7","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.7","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"074c8d62c7a47bb5b300939dc177926c1429c247","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.7.tgz","fileCount":9,"integrity":"sha512-65hzJiZH4GaPzxVVAf3vJETGxUWK+xRWPLEHdmY7SpK4UiMTJ3jEvPzNtn44r6udI/XxGN+PSGsZO+/xcCw0GA==","signatures":[{"sig":"MEUCIQCenQKjm5aDmeDkPubIw8e5/8IptcdqX25vGxZba07BugIgCAv4ZiEtCSLLrESDkO5u7+JQMcWXEAdoHIb/RbLU0y0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1635409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivDgPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmombg//Y2RJAfN/8Ya/CUHwq+U+6L8dKmlNObk3DhcDPJsx5A2XAMUl\r\n892Oc6pkEZbfRShVQ4Ln6nqnBChFWN6s9YE14pj31Yav00yLBnj47tsTyc2h\r\nOdoADJKIXCPW9wOJtAA6xRK+9VkZZyEEeEWEU5eYZLxttrGPf2S7vCqRgiZ2\r\nz07Cz4sXuOE1oGjLkGrqxLPbFMEXxvStRAYG+dwDpA1GoAneIjmEhHT34+C6\r\noKD6pqNO5yj5RT6Ba1r2Hk06sULTGi6GFJ1gAhItRrwPHktJimvBvvqVf2Xd\r\n4eASq/kAfQwEutlFo0DiZE3t8xlDyMdyTTvhqWyUeyfcLgLYzaoHD1K/lyI+\r\ncrVZsaCA1IMV72t5yS6STAXCYbtmAwVw+/dS60f7djKgeGhH0Y7dF8JOIKtj\r\nhSgC7N5Jg+EaHt81uIo88c7V5jpprTf8vF1QmIc6+A9Qv1+y8djxeSbTb3MY\r\neZzq1UlIPieNVkYG0zVkJEGF5X25RxCfOWqk4WxiNKLicvxezmpahxEtgflD\r\nxq5/5Hx+GYL9+aVNhq8lSeRPlchUCgj8RW6zoQDw3zzpE1L1+JZ6/xzXnYSX\r\nNkoYUAy+812c1UwxkldOeoGaYXSom5B3gwknePz89KUSJTZO8zyYGak7Cp+M\r\nVWMr8Gsxo/508ZaZl73sO8zpHTgOwg1Z2Cc=\r\n=YTrs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d334cabd251cd0ed8b845a87707dc84f007d4074","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.7","@storybook/addons":"7.0.0-alpha.7","@storybook/router":"7.0.0-alpha.7","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.7","@storybook/channels":"7.0.0-alpha.7","@storybook/components":"7.0.0-alpha.7","@storybook/core-events":"7.0.0-alpha.7","@storybook/client-logger":"7.0.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.7_1656502287669_0.6925370959158896","host":"s3://npm-registry-packages"}},"7.0.0-alpha.8":{"name":"@storybook/ui","version":"7.0.0-alpha.8","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.8","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f7f95e8a56a4523a8aff035cf3ed73009e17f815","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.8.tgz","fileCount":9,"integrity":"sha512-uGwL5cY5tfWLY+IwUGCDCH3B3j6dUtbP5ZN1f3HWKg7EnTjFHmxD1aRCho0/to61grypjsMaqfiI/VdELmEqFg==","signatures":[{"sig":"MEUCIQDyQuJAnWP1ziytYBjBjon9+oyE5S6fX7GiLgnyncUbKAIgWhNMSY1qo0PIcYnqtuxiwQm0aV8kZ7HYcZji0YmWPBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1635409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivHZeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmor0w/9Hn/Q1qn6r+bnc4+naLMkibypKTISDqY5XzBJdWiB4aokjRo9\r\ntT15/hXBS3VQEgLNT822bA0CUIyiYRPvbI2nsvEzrhl8eochfAnFRFrS6dF/\r\n3oOq6dYPJJfeKD3huN1WmjRCLBljRljJSHkEGthPCR9iIVyDJG39ciaMgri3\r\n7bca5pIgSegjUiM0qhxu5CjW/TwNENdLGtdFT8TRiMlhiOaHD7glkWqpOyqe\r\neXse4sU3peUGcuxwLu8kP6h1E2MlZOo2NrvdiQSCO6awMmLZG6CdF8A/AY6f\r\nH8KYM6q47rRJj2j/qnAn0Hnijy8iO9Z4n0jkOUdadICwU5VdOLPGUOVCf3wf\r\ncU2bUmVma+WrIvGAydCj8UvFlBqKnfG9M9nTfCiKkhH9E6qKV597a9eLHi2W\r\nNNsNqjplHBFd1hQpIvRlbpHkpU/faI3blQYQVVkdhMeXzC+7LloIdPwJLBqw\r\ntLBApEKv8koCyiHoD1Lpu0eJSVtCJ2H+S1YJgwMwA2ZZ7OOJ73lqNDhicCTw\r\nOWRR/fwLSBY5yfATSIblWINzOiG+AAoSYVBWjmWB8sYop3tk4QO6FO6yK/U3\r\nZxyTx3V82iKKRFnIuIiq3WEhV0kxCFxbAKLo1QuQhlHZSmhQSigiY/wr/QrY\r\nvOGgV/k6RoFYRts9K6CgB4Dzbh8UgqgxF5M=\r\n=q3/J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"24725501c32a073cebc6bf2674a47357136fbe3a","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.8","@storybook/addons":"7.0.0-alpha.8","@storybook/router":"7.0.0-alpha.8","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.8","@storybook/channels":"7.0.0-alpha.8","@storybook/components":"7.0.0-alpha.8","@storybook/core-events":"7.0.0-alpha.8","@storybook/client-logger":"7.0.0-alpha.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.8_1656518238679_0.11392132876655903","host":"s3://npm-registry-packages"}},"7.0.0-alpha.10":{"name":"@storybook/ui","version":"7.0.0-alpha.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"cfd5142c4f5ad575178133bdb736e8185e4ef581","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.10.tgz","fileCount":9,"integrity":"sha512-94NRbQ7M+xOYtXKZbpeha1LjhnbTGSsXDw4Gw4uePcAVvMKsRDcIqiZN5jR0ZaZtr8W3BYh+PyDlGvo27NWXbA==","signatures":[{"sig":"MEUCIDQ7tj41+8h6Yc3mBNL3WKJqIFXEH/ZebyN3aOObrqLcAiEAuxoyhn6BX7868GuouNvAkoNoPCrs/265l/rnssSDPKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1635610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwIb5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWeA/8DDFceAIBWuoE8jwZS+NMgZ/yTcdLxc22bOkpEJQCCENBLfrn\r\nzYoeFlulOeX5Sp/qbtfAR6w3eO7ys2IVbrDEJwNcaDj5PDotXC1TptasyZxG\r\nS3j5vDiSehlgWoGDDd9Xs9+2fEFNQhvWdncP4GGwwfAr6F+Jf1QNswFrfvyt\r\n8MLWIk0q078Wy8Qu6RGtvVTXsnkWHjAZeC1dCMrEwheiq+frQ93oTlGIyRKD\r\nWkm9qmdyBNF4TZH8ngowVIwd4HE0ByVnhtYIaPOYqbteMK9wIQVaTf1wDHM6\r\neHNQy3ZNbZ+J/EAIMD6ycPo2m638kIcG8n12FfTqVPlRKYuDmxp24vn40Ap6\r\nzxdHhcSCDD0fbzmYGTcTRvco8df3ZKE5UUzSPRH1m6JyWVGIAe1M4wtV4sQ/\r\nZ2MjvQiaAu+aF+Azi0NBY9eTwxVqstiuJfN+aadCecaZMRUC+PSjKVeZrbaZ\r\nhGtPIHOE/7/FpFTzvJkqLP0LFO4qZigoZ+9SXpakXF378QBBjeQLv0kPQf+N\r\nJt8ckk3xA03Zw5wf+8AmCg5nOwV2wyNO1B1VWyWwTqdx3/3T178/FsaMas/J\r\nKAMxhF4uWjyaFQi1KrIMnb0cumxBU2Y9uOIo5x3qx17A+Wgy114vr7Z0O//H\r\nkDl7s6w304i1ISFw8ZG/zzAjSd6lNjYZnNg=\r\n=LUtk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b13dd8fb52819d73d4983148af8ffc5d683e8b75","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.14.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0 || ^17.0.0 || ^18.0.0","core-js":"^3.8.2","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.10","@storybook/addons":"7.0.0-alpha.10","@storybook/router":"7.0.0-alpha.10","@storybook/semver":"^7.3.2","@storybook/theming":"7.0.0-alpha.10","@storybook/channels":"7.0.0-alpha.10","@storybook/components":"7.0.0-alpha.10","@storybook/core-events":"7.0.0-alpha.10","@storybook/client-logger":"7.0.0-alpha.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.10_1656784632811_0.6173208517276487","host":"s3://npm-registry-packages"}},"7.0.0-alpha.11":{"name":"@storybook/ui","version":"7.0.0-alpha.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ebda795e66b9584ce1aae231a2cdf2cd2aaba7de","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.11.tgz","fileCount":28,"integrity":"sha512-CKnMl5+KP7yLTVHqh9GLWszkmyG98zDuZhwZz1Ip4grBB5UlWHz4AhSK5m4WzfYvlB1vCcFlFtNfcqOvVpyStQ==","signatures":[{"sig":"MEYCIQCrSNW62lRUfzfINSaKKQH20Fep7pMz+2CoSz3f2Z8b+QIhAPZ627UDFRsi4qd1TpNz1NQXrqVbUZJ8xwvV2hyh18Um","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6332202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixbLpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrkbw/9Ele0XWHjJFT1REn+69lu32lNkhiz312usb6Ub8NSnDQ/SUIA\r\nMi2NdqxmQIA1ZcnahVQXLeyMoCgXlNSIUHiGWdbq8qfi3btEgp1fKFmxQxtq\r\nTbD1f7UihSu8gxwojpsFERcW4m6c2zl6q+Oj0NGQsRZGkeVbLweUHZxj2Gss\r\nBurbRtkGtam7eG+9328udUeOtRry/dPRzZgKuTYqZUbmGOS7NpZx8L/9qlDS\r\nyG38Miuhr+Er70ny3Z9nSpmlK82nlWlmrN8s2f2WAgPsPs0/K3g9rDr7OYRp\r\nPgUpSxrwwjEv9AoEs1ac7mhbbY8AdpzVJZ2jgZidsgsW8js09CVI9mOmyYZV\r\noCqjtgECPHGyi8PG3cwVTEQ12wRwRXw+Zpgz4E2ggUU5K6W/tg/Tcx9cG6qj\r\nz80nq6JjKi249uShArI4VvGy2INFGUWpoBWFuam+GoGXRurH56fGoPFrPI0t\r\nYD63mJ5irG20iu1tpwa87XP9rEUHjEWdHl28fCml3kZLHMh/cIb5elEkaY6c\r\nMah0UbvMONOjrX8rH5ELKbrOtIeDY5qS8zJojgiAVv0CxvSMD009MFLMCWTj\r\nuVJTM5j8C9ylG4Ky6wyZ98fJKep2vFbp8lloYW2ApO1WYU5dwcJcuhEWs3H4\r\nry83J6uGciXw0F0kQhaOna0ko/K8lQzeimM=\r\n=/E2J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"688d338903e84a7e83cb104472e868e734399f65","scripts":{"check":"tsc --noEmit","prepare":"esrun ../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.17.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@digitak/esrun":"^3.2.2","@storybook/api":"7.0.0-alpha.11","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.11","@storybook/router":"7.0.0-alpha.11","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.11","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.11","@storybook/components":"7.0.0-alpha.11","@storybook/core-events":"7.0.0-alpha.11","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.11","@storybook/channel-websocket":"7.0.0-alpha.11","@storybook/channel-postmessage":"7.0.0-alpha.11","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.11_1657123560770_0.2858202903460909","host":"s3://npm-registry-packages"}},"7.0.0-alpha.12":{"name":"@storybook/ui","version":"7.0.0-alpha.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"21b275be941b8c89486fd731e79564ba13ab01da","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.12.tgz","fileCount":28,"integrity":"sha512-k+CfdsV9RhXu76QUetMqo1+GrvXCtLJWe6Issj3niocdXWPjpk/IjcMCKYb1sFWS64FmzerzQtMLHMYiKRR52A==","signatures":[{"sig":"MEUCIB2l1QRO0Wshbr9C8I/hG0vYWHrhzR8R2HD/RDgtrqoCAiEAtn9lSYaQd4RYb6nHyntkIgqizjPTgfh1e8z1Kv3hnik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6333995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiyFDGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWvQ//cJHuEZqmuzU1sjVs0U7Rwvv7/jlvHlobFqMJqRDs/jsgTc10\r\nJ4HZnguvBBVjuizan8qJk43ESYerxXfgjMqnSD2BHzDmDT8B1aDwpvnwWa9l\r\n9KeBfwr3uzoAC+HAFrBsX5v4Q0wyqX9tmyh/5f1OhXZH2I0X87eHcaE0kf8f\r\nSj/wScJ9ZX2toLvc/HQ9yET8Dziq2fplqIliVpOelugdf9My20dFLTssZF8J\r\nL0lw6V3EyGwUn+21Sd8S2zITJ3iU3jXXr20/CAo+ne5aGDNFvr89AAqeQupI\r\n0v5g8xR+cHf9QWusmSKM7XxvyyOrGT4FSO5o0a0NglUMSn6VJgSnlV2QTlHY\r\n+XZ8TSayuMN5Wxls8U6uody428AcNnCwYGO93lQdJEbE7Vp9qw+ISqxDOGaS\r\nyRrJPFhJoD+zPEAmM09QdiJCnPr3ifLcoa+CR6nvWKKs5M0qdZR3m6BlPdKD\r\nbMscLbeNlXTag5L1ulhyruQGDw+MRWjTN7Qc4zGSQGHJVwzgqfifwXEDO8sW\r\nJQfmXzuqOxgRuYl49CoJAhe59uSbMrHRE4DCX15FAkJ4xQdtzhXgIB9BtCJh\r\nuS5vXglo8CkNiXahOihUPJVqxhzUY1PRwi8chp6xT2pM+xNJyNwt2dPhIL42\r\nMYjuoqgD1Y8EP2vy8H2iRgk4Tspw0GOnmEM=\r\n=f1S+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5070efff271ecb5c26b3eb94c128c4896171cffe","scripts":{"check":"tsc --noEmit","prepare":"esrun ../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.17.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@digitak/esrun":"^3.2.2","@storybook/api":"7.0.0-alpha.12","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.12","@storybook/router":"7.0.0-alpha.12","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.12","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.12","@storybook/components":"7.0.0-alpha.12","@storybook/core-events":"7.0.0-alpha.12","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.12","@storybook/channel-websocket":"7.0.0-alpha.12","@storybook/channel-postmessage":"7.0.0-alpha.12","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.12_1657295046043_0.33091508702717976","host":"s3://npm-registry-packages"}},"7.0.0-alpha.13":{"name":"@storybook/ui","version":"7.0.0-alpha.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"681cfc2e4b0c4d06348b38308f3d0ba5a224d08a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.13.tgz","fileCount":28,"integrity":"sha512-0GYpbmgblGns/f5n4AKq53TFSHRDfQCkHj+CS3OL2PlrCz4bcT0xUsQMLHTRumN37+jL+4tM4ecmT2M5cYUgIQ==","signatures":[{"sig":"MEYCIQCfTro4VXveS8bbO4MANNdqda0cPEW9k614lFYZtuVIgAIhAO+AoBlgkTPAGNFdazJLmCACG8leSSOtKhOA5wVKcBfO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6333095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizRPjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4IxAApOHXRP5swE4nUIRrl8rX4bczalTDS3LlEMxYCNaPBSMxVUMN\r\nDePIYoNtTj9ioXKtyJ336zxKtj4qYAHmuu0D24AcyS4k/zO8WG9oFPtGWQh4\r\nM90MjOd/ETwgjrIKsULyMtZxEwp0ArVA8npVNsP1HIYqsIsZ/o3wG/rs0Bxf\r\nfISY4/LL3GT3kYKlXLpWNWehbZQPlSFUoeJ1+X4EE4p1ZKecbhdb5x9Itkz8\r\nxf+G507reikuAtGeT+/MbH40Vx5x/2j1xN74CKxiWtFDaUc9ZG1Y1t9vE3F3\r\nP/MYMZ9asqHUtIPbl+yO87tlUaYhCzZ7WjeIvrs1t3yaQ7sHXdVQsm36bAD7\r\nLXkJeVGn5DsFp5eK9FwM1YsFTr+zRZblM4swQTDHRnAs8Ycw8ksosg9eND5Y\r\nk+DbDmKc0FdfVv3WvMoFR5Uz3KROTihjR4zlWw2ReaZEcW9bzTfPefDvIDHS\r\nc7NYiZeArZ7Kq9BIco80aqoGEbfPJrX9NdCo2qQzVBXAdCfjz4T+hXEQZJjX\r\nUEDpySQW2Qq8dXMTx/YKr1oaoq+UmEq5+o677uz6gaUW9j6a6DtJYH+xpFj0\r\nEomfYObzk8X8WBuSTpHNu/06zbOGKrup0JmCFmnNcH5/EC+q6c5y8s/kCL6B\r\nv+UcQyhkBDaeWD+G6AwmxTXHpk4a9CGL0Ww=\r\n=wxSw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9ac4d2e0a05eb945713a0e6689abc3b12359e181","scripts":{"check":"tsc --noEmit","prepare":"esrun ../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.17.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@digitak/esrun":"^3.2.2","@storybook/api":"7.0.0-alpha.13","@storybook/csf":"0.0.2--canary.4566f4d.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.13","@storybook/router":"7.0.0-alpha.13","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.13","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.13","@storybook/components":"7.0.0-alpha.13","@storybook/core-events":"7.0.0-alpha.13","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.13","@storybook/channel-websocket":"7.0.0-alpha.13","@storybook/channel-postmessage":"7.0.0-alpha.13","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.13_1657607139096_0.8269153980974995","host":"s3://npm-registry-packages"}},"7.0.0-alpha.16":{"name":"@storybook/ui","version":"7.0.0-alpha.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.16","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e059c37441dc80edda3691a1f6f309ecc502e3a4","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.16.tgz","fileCount":28,"integrity":"sha512-qk1XPbErGIxlRTq9bqCkA0B4LgJqIgUmYUk2UE8o58zdc4/UXT7q5L+chmm97ulfqc7p0kQsV319pT1CJWWqYw==","signatures":[{"sig":"MEQCIC1YxvrZwJsyNswN4tBzdan+CbHXyaEBsCFxHddULv7zAiAA0cMBb7kbIDuGdI3m+WXObOP9h3qsNFd/xUm/ltI5Ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6323071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3o8yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxEA/9Ffi86DH2h1MGnWk+OseaWEd42EjmQUySoGTBUt7Ba/9fw/HS\r\n+gJXKwtJwtJcbLkNLX/peAAhG7NFMxzWCQv6EJr9/oRjfYY3P5iKjd6oTH0d\r\nlYkEhZaBeDhP6hXxii+kbkMb1K0wt3MBmMzHPJl3ETcKMKhIGwuwB72SaXxu\r\nZ+IMVHD1F5aZ8NtIAfR2BdGjHrDgA68AtmvGEopZBrOFUIpRt6Y08+s3PbDl\r\nODqshz846DTIyXDckAkyBYf2LCOPSXkS0sMRm+IgnibhYOclBCk0d3krG9Zc\r\nZu2s0MRZ2jT/5Sv0uyKJLX3j+s1MMTdwGxqd4l+/vfHb/XXICz/t0qeSwZOx\r\nI3XFOxfjUi8WetbwwPoaqNTTDoddKxX3t7zGqKJV8n3ykq0MC971YbxcoQ6h\r\ngU/3IUtY6Ogokr0GJqJVsObvkS/IgCYWzIwdOxjMt84VA6UpfIRXQdV1I32Q\r\nHJ9S2XCsfYN3TIouiOv8As1H3E1yfsMhrbZSfJY2reZA+3DP/o3TXcbTuees\r\nz11QhaPSDv8wTZzA0RK3YHqncidyVa1HuQiEnsTtYnSDOfg9nBnbnNnKFbBt\r\nRbEyJSGFgZnje4etEDa+Iw7TvS11L6mcZo9jOYtF4tEiJ7Tqc8B4hP6D3LjQ\r\nhfD94hr/lXCsaKhwF4q94FEn8zBI1YxV8oo=\r\n=eNAG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"df30e7db2b251418af106345e5722477f057ec36","scripts":{"check":"tsc --noEmit","prepare":"esrun ../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@digitak/esrun":"^3.2.2","@storybook/api":"7.0.0-alpha.16","@storybook/csf":"0.0.2--canary.4566f4d.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.16","@storybook/router":"7.0.0-alpha.16","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.16","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.16","@storybook/components":"7.0.0-alpha.16","@storybook/core-events":"7.0.0-alpha.16","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.16","@storybook/channel-websocket":"7.0.0-alpha.16","@storybook/channel-postmessage":"7.0.0-alpha.16","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.16_1658752818213_0.5669601176151273","host":"s3://npm-registry-packages"}},"6.5.10-alpha.0":{"name":"@storybook/ui","version":"6.5.10-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.10-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5c10eef1b723d8824aaa074e97758cd6d035d910","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.10-alpha.0.tgz","fileCount":10,"integrity":"sha512-8zqroX9r7uBlb6rW4nCjf+mHxfkOJeAa7K5dN3fxZgJ9o0oS+ipLkReusN6qwFDDsNvdpL31/jtAklKhbWHzgg==","signatures":[{"sig":"MEQCIAcdb9K+q0x1VemI7smiDL+BTILLqMW8LV4lGZB9kFY6AiApRFgajQsbQ/PYhEKza2M2ZXkkULFaubqGwKChWmjbqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4CqtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBkw/+JVG+QeUrl3Nt8ScSAnTpDWz/pJDoUP2OKGBVlzKYZc3/xk79\r\nC+2YOGUIbuy4zFiHwmkixr6R8ovXuDXUomPUoJNX+qlIPnxkkt1+y4IdJJkN\r\n9oWEeq/2wToiVZMKgXpAN9mLPnbZGluEeSCC+a0dpmWHhHsgu1DLtsOOueS5\r\nxwaujv7BS8tITy6qUfEMYHIeAV5AITm3R1qMxgir5C3/2ei1Q82xUoxM4Dxw\r\nelAPcde9S7oecqLk9D8WvBegPYvMeQ14lq0um9uH8o///sZk5zR3uCGPHshV\r\nwRl5A7QiRbGPaPa7qkDvoP/CVXR2jC2CHCp5UstPfOvNzr7Y6WY8Gzf0q5WV\r\nN+oEudV/Np77fckJbWCNadQDIHAYdT/Mjvb5SqdVSTFYiKV2mUO8CD7J7+nN\r\neU3XmWJ3gdmrCniUWjVYc87ItwWbr7bCQMgROCM7xR/d5EQWSU5lyWB2x65s\r\nKG2Ybx+NZkUNAsUTg30rOQFZNdS99EP1+fC3U2h9/lHintOMvwbS0KI5adeC\r\nC/X4GRb7NG/YLCrER6lAgBy+N9MOXgsC8+e7PLFQ/PwKAu7vmlrRqh1Zn8C1\r\nBn4rJbqpENKPqvL2BRFsUOcTgjrHO93zUWQ8ox5g29Aw/JL23Dyf+1rnNXlF\r\nVAIb0GrZVoJxcQslaprk/jttsrXli1wRx3M=\r\n=AUub\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1a48f7af1886fc828cb84f32ca451cce456db78d","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.10-alpha.0","@storybook/addons":"6.5.10-alpha.0","@storybook/router":"6.5.10-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.10-alpha.0","@storybook/channels":"6.5.10-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.10-alpha.0","@storybook/core-events":"6.5.10-alpha.0","@storybook/client-logger":"6.5.10-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.10-alpha.0_1658858156852_0.6567424034554492","host":"s3://npm-registry-packages"}},"7.0.0-alpha.17":{"name":"@storybook/ui","version":"7.0.0-alpha.17","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.17","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"dad98c0f9d53f4b80bbb953c137e2b84580bd68c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.17.tgz","fileCount":27,"integrity":"sha512-jOAVXHd3ecctPCXscR92bHyPKL2rc3Waia3SkwqyaE0owhxWJHYbh5UupWfwDTkfQwCmlZbRLItpErggaXg57g==","signatures":[{"sig":"MEUCIQCNvExvVDjIr6212bbdq/1+xOF2lh8aL7xkuhZoussjCgIgT3KaPUg0+dos/D2sJXC2jiB/8/LPMhOowtPG1nslyeQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6022998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4XthACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoulw//bB3lucAWJkaoQAMSlbT7knaFTymY6GiVs9yhBxASJifGfdan\r\nfbtQwQJCHJMvU1aTnQ89sDmp5L7qHuTc592lO0vX8FstC8cWQDSZkO700DKi\r\nNl90wQm8atHgargCD55GLSMBoqhaXeLyutt2M7GdOCKFmTGLQ6aJEBIYa3Rk\r\nsEzkeWAGGCfsmhOtJflt6/P2/t9foYQWTlK3NoR3K75xLBNojPq0PWgOsjDu\r\n8dCmch6JABfL77Qy1sYUmBVoyTWBx/DsFvXF690CiLPU5KO6kyInajO5gZES\r\n1VDz0i1fAhMJjkCgrBPPXVXbFpK+Kojof0CUQsCDBMO19MnrBmuDbmW/BM+a\r\n776gbOXreC6EOEzTbk8kzVpqFRReKU/TyrtysC7M7GdBMBAj0Oe3FjPFEUk/\r\nE/1oUVvMdWHQ+awDwp1sb1ifuYV04rUxQsL0T05J0Xd6It6GpOffIR/UN8qn\r\nVoObbdo9eXMnLSusa2PyO0/T+KSJvfwJfcqkvsNDpoM2wsl1L/71EspB2nCd\r\nEWy4jKpNudUjGvCXCfK+iYTeJTR4D/XbCU1Yed9uL3+yDd8xYwImAKO1l816\r\nhnnygRa0LrFAyD0lOLSlJBEPvxlKBATZXG5LKG/gzvffQS84bxVkVW+1ZmUp\r\n7gkk4hXwtDfQNgw8Tgp1Dn0lIri+ZVvcOjo=\r\n=Y4BM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./../scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7d44bfd3e759c6f17b75029ee2e067fab811f27b","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.17","@storybook/csf":"0.0.2--canary.4566f4d.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.17","@storybook/router":"7.0.0-alpha.17","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.17","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.17","@storybook/components":"7.0.0-alpha.17","@storybook/core-events":"7.0.0-alpha.17","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.17","@storybook/channel-websocket":"7.0.0-alpha.17","@storybook/channel-postmessage":"7.0.0-alpha.17","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.17_1658944353314_0.23445197994573252","host":"s3://npm-registry-packages"}},"7.0.0-alpha.18":{"name":"@storybook/ui","version":"7.0.0-alpha.18","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.18","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"004f3ddb290d05c379115f1860c421ae64c77ad0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.18.tgz","fileCount":27,"integrity":"sha512-TnyifY0ykl0uqC6LlR0mSeXx4NHiAyE5GIrhvMrNiBD6/FEShnnHtp2ln++SEX3yfWDibBjyywjZFrRfCF48cg==","signatures":[{"sig":"MEQCIHqNqKUqW4zjBw1sTbwj8Gqy7w7US2GALHehWl8TRYKgAiBzJMos24+aDoCxWxr4UEW25H4isluMjy/wT76fGCwbFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6025956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6aMGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAsBAApNsk2N9s4vAazwGaDNL8uJ3y+ZMZjHecGyadM8E22e9T6Zcj\r\nzpXhGdwKvk1bESpzRiD8DNU/RJweKzGlaEha0npC2mM+zm5V2w/f+NEut1ee\r\nN/D+FcjT4UlU2krR4Jfjacrjd2dhBY9EaDZjr8IwOS8BmT3sqbqKjwO/9/B5\r\n/uXELX6FlDp+fk/bhgZ7nw8v+BdeXeB2ko//3eCrdDplj7FzBjur0H3Qu4nX\r\nkaaEdNZDExetyUV0ooT07UCNb1ol1fgxaVtmf3nvbY145seICX6R3oiiBMA9\r\nyADSr+bu4kY1wWIv/GYE9LHl6zEvyUgz94X5OJIfm/79GIG5+YyGY1XuEe74\r\nFyv1BKR9aWM3k9W6amNSVudaXLUkdvj0/nVjUJuR0vX4Cx3VFjcNyzqtNSUi\r\nGVEGz4YWmn13Trgq5miGBRHypncV3I0ER21mOQFHaxsXelLSmlOen1NC3cSy\r\nMhRp8fgcl+Pz+7LKKn8XZmDsHUeum/edTrOFKRdyISTWnvzgRBSDQCIVwSpq\r\noji7zF8Pfb8zMHjz1yKJ4oCq+Vm0oiVZwAx+K0cLvNe1a9/zQXfzcoaULEji\r\nla4sg1tgYZBWjnJ2mQRBQ78D7Lt0ZEIRaADWJw5TqWPwRagjzXFUtk/FZrD0\r\n5BE435DH2ttE/X+TNHBRaMvAUoxbZ1nnwKo=\r\n=nFGN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./../scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"bd59f1eef0f644175abdb0d9873ed0553f431f53","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.18","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.18","@storybook/router":"7.0.0-alpha.18","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.18","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.18","@storybook/components":"7.0.0-alpha.18","@storybook/core-events":"7.0.0-alpha.18","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.18","@storybook/channel-websocket":"7.0.0-alpha.18","@storybook/channel-postmessage":"7.0.0-alpha.18","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.18_1659478790458_0.6421010172074622","host":"s3://npm-registry-packages"}},"6.5.10-alpha.1":{"name":"@storybook/ui","version":"6.5.10-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.10-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a0b1d7094d112adc3f901e3dab41e6d7dbe5f04a","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.10-alpha.1.tgz","fileCount":10,"integrity":"sha512-9FoBoy4q5A6gBntL7PvxilfriDWuf+4ylJKrOUcf0g2Zlj1bttTGgBgKiU0Wn73gvv2rcVETshOtZLXTQtQemg==","signatures":[{"sig":"MEUCIQChEucax14vF6KRHI7ePYJG3wl2klp5vnL3Zrzub05ouAIgKkhn0tcFw24rdZVE4Z4WFgpPj66rTk3z4YvrrlkgB5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6bC/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCxg/+JcG1teMp+TAZ81Fbt0DL5YAohGE6W7S7eAN7g5r2jAj+5t6U\r\n5uXLOK8m3K1g7wfOc/jO4DWCcuJsRnjBxE/yPo/EonhHFVF66U8YWbcL+Ovv\r\n0/FmlqXMOEuHeYlnOn0gTjHhRBDCaM2Jh+5F1uCLn+x3OuMhW4OXIOtM4L72\r\n9yCt4v8GDe5tCdU+0VfEcGFr7tTSqcc4pH7ubBhYLFROHYFJncNPuuWuI+jL\r\nlHKh7YvbeVSinBiBZvXTQNLjOyn53tL4kFYwdTbASKpTbT2fnJPGSN1KPlkY\r\nJxqmTUSwF/BOsPg1mxQ3SfKomr1h/5VuPlN3HEAXKGSeLo8NTTy3EFtxP+ls\r\n4x/5Byg54EgFsZmz4pYMNKbKFz564W5iux6Ogabr7Ix4Vy41uDF2Q7rm7amY\r\n2FuR0mRm94dMVX+Rf1iIN7sXCdH5rFiO+CQiwDcpLBft2VA5Ex+Zns/nuq8L\r\nVxT99HbGVq8zfybO+22oxxDmZq8gZInyPzBRz+Y+ypyznWuc37r2TLegggPH\r\n+kKYwT9gUcMVJ+gIpnxDI3gQYLrz6k9G+GvWaPnuKEle+EQqBPTI10AmqeC6\r\nym3PCAYZzBTLPj/NlHOxWIkOB3YluLaURfGLCMVv7iGPKvGbiLcGfaw1gNVL\r\npKpIp7cBnVqmV4MZi4uKBL0Kj8Ngr1tUNV0=\r\n=cLRS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"b02a0ef8866c6cf8c609a32a14b4c55f513aa569","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.10-alpha.1","@storybook/addons":"6.5.10-alpha.1","@storybook/router":"6.5.10-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.10-alpha.1","@storybook/channels":"6.5.10-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.10-alpha.1","@storybook/core-events":"6.5.10-alpha.1","@storybook/client-logger":"6.5.10-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.10-alpha.1_1659482303505_0.1379862335012063","host":"s3://npm-registry-packages"}},"6.5.10":{"name":"@storybook/ui","version":"6.5.10","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.10","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f56095a1a39ae5a203f2ac7f3dba86341a5927d5","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.10.tgz","fileCount":10,"integrity":"sha512-6iaoaRAiTqB1inTw35vao+5hjcDE0Qa0A3a9ZIeNa6yHvpB1k0lO/N/0PMrRdVvySYpXVD1iry4z4QYdo1rU+w==","signatures":[{"sig":"MEYCIQCMnj57phCwjRHRnmnt0rAgU6h8SGREE7UGhBQGWA5UegIhAK50Is6qLpscojm6dPP1rKDtSw20eEPKTqy5tsFs0qIx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6wrsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpbcw//bn85npz2tRBMR/fJbE1Rby+PVelm6vTdiWG74GvvGkHcYkwL\r\ndeacAJ8ZMxTYN2OLCu7JvI/5F91nP3HDnRSBXJuP/UsBIw/ILGczYoENkuA0\r\nZ/LHmjWdsJy6Yf5fMOLxZ69ADAp67EjNJiYppbRaZy4mndSNxjBD8gKlpu7X\r\nINjopp3UMluifJaEBmkDVm4DqNgtBFj5drnnLN23DLm9F+59hZPG1XcdwCLV\r\nPn/QpNIBtJSrq2bVXwYOW1jMulYDQjPHLYXoTeD9vqlrZSfhMAVwhim8UHSj\r\narDv/8IPMMB0/375qTHDTncSgIkznl3g1cAuz/Khb3aNDAD4mmbKzM7KBlPQ\r\nBoj4twl3PKAG1Jtmfsi8T7zhhRfARUyBSKQP4/pctBWhjfJaBiLiI+g7Sg5E\r\nw+T12wVQjN3iOVElGMGTSuPefwg0t7yhrfBlT66EzlV6eQXJ/wPxezW3H5YD\r\nCN1iIGYuvwhw5O30NRX6giOz9/E3zDxxP4pUrMETiniM6If88FTYGw/MkI+p\r\nKQvaDt8Xz5B2AOelfMvMW6NR6FXpNl3XOxKHz/tSNkw6e/zfWci28+HZypG/\r\nFYHPB0ZzAivMA+p2csht5U7k2wfaFsen7MRBt21i4WhIDpM1AxjZyVuaSwEr\r\nSMbFizNiXyl5vH1X/umuaWrVB49wkghwlLQ=\r\n=EW3K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"893881ff6f87272c0ab0f21776ef8fef990d0c36","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.10","@storybook/addons":"6.5.10","@storybook/router":"6.5.10","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.10","@storybook/channels":"6.5.10","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.10","@storybook/core-events":"6.5.10","@storybook/client-logger":"6.5.10"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.10_1659570923952_0.34407989996364385","host":"s3://npm-registry-packages"}},"7.0.0-alpha.19":{"name":"@storybook/ui","version":"7.0.0-alpha.19","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.19","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a5639f0e00ffd537529953b9e5a5c97bce6cd817","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.19.tgz","fileCount":27,"integrity":"sha512-U97rIOU54r0nj2QpH70QRtZpeWCEYF937xYWQEQiOH3SuaBSRd1kDI7U3jSnh/q3vJfsq6cgdnjPKHL4M1iJRg==","signatures":[{"sig":"MEUCIEUa1+LHSnhtkInofXU2D+HvYC/xn7X53nyptbO7zcX6AiEA1TgIfD5UNl5cbF6GVd5VC4S1v9P8xmGva+z/v5fdg98=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6020374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9dMCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8AxAAk8IMppvYSxdaq9mK6K24r2NGeA2OTbKlKQRE8U9zlwFXzN61\r\n2tPKe33EgD+poUvTn+SHsidag6hrFst0f0WTbiQUpa7DBbMGXHMXL9OJfNWl\r\ndG5H9dAa/VQ7Eo550XCPUQTOhIlc7GU3tBhEU5SIMFVnxxI5yXKQy49c6/zG\r\n4hBF0NJulhVZEefrg8l2AjfkZQCL8wPJS94EE5+R+Timja+OPGtsAaUDJLRD\r\nW4i1OpknZSKlE9JkBBSxsIbCTpfNETOHrpvkJNBr89joop0SuUeZ5SFTxR6h\r\nqMW5yEjvPqunxHzdhQUX2iTuL3OhnWK0Badx1/IsapWMpbr36qw3DytvqwKy\r\nY2rr1PThC0Z8jkglijXJA1J96om/bEPZky5YM6haEGw2jCphYxPTWr9HxEmy\r\nC0sZ4PhESxrA7OV7ZvZiWBLaMpwVzCjjal5QJt5rSwCH1/vbCuFt+TT/fRcF\r\n8YHYtXEKS9dRQCXxWFJPZvyzaeBVoVaygz916zjqxAfoxMaqGPK4pXgc4t8Y\r\nrAyLvsJz2W6U19uzI55ckwzU0gpE3AM0wuxSsL7MaIEaA2n0rt90MG5GDAd/\r\npWKzuhweHssGTw5SJtBj5tyrXMifYEnPYFx6Zu+k7i78sGSaGIFC+sP5ZL0w\r\nHvRzPhFFGhqWKAfz0F+WtLKeEicGtoOiIxc=\r\n=tJqY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"74bdb53f67dd59bae2661c668d2d5d4296113281","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.19","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.19","@storybook/router":"7.0.0-alpha.19","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.19","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.19","@storybook/components":"7.0.0-alpha.19","@storybook/core-events":"7.0.0-alpha.19","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.19","@storybook/channel-websocket":"7.0.0-alpha.19","@storybook/channel-postmessage":"7.0.0-alpha.19","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.19_1660277505773_0.24237823398716207","host":"s3://npm-registry-packages"}},"7.0.0-alpha.20":{"name":"@storybook/ui","version":"7.0.0-alpha.20","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.20","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"fb859a69592128dd204c43755f995934e3ed0365","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.20.tgz","fileCount":27,"integrity":"sha512-JMGrrBDCpoVLxh4uKS4GUmVETbqwdN3gYApQbYajLyJyaj9CFzOD/is/14nyZ9WrG4yc+rqSepeHSmUyElWpXg==","signatures":[{"sig":"MEYCIQDTp8ETNJvEqLF9kLY4bUGGpiZHmBjj0BO7R4mWzkHwIAIhAPWgkI0m19mEu7lbtZ2PJuYjNX77/AdzpATdXrZAxdyx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6020374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+qDeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVBg/9HMOsWyZ7L1xVIeTe5fgShGdmGOCqQtCgPq3koNYG7IM9bNvm\r\nmzeg9S/4b/8QwOfUbVHt7z1v1CghzmxsWE5Ys7eCcs2WWGeu6aAxw2zbyrnL\r\nY6UPdT5IbDFEeZDPmPm1A9WgysH5CvxhT0s6EVLE377qvDEjMTHDanYqBVSV\r\nWiuvCkZgBCt/LN9EwN5+UrCsMYTyD1g+hzFxF/2J6QXHkt+7ZBT61Jz0Ihiw\r\noB4Hm6LGgbsU+cKn7UE4MrOotOC5WAiAMzFK3OQShL9Ywg394axxbjZnC9ma\r\nlZM6ogtNVdu3elYHBOIZ53L2+jPNlA0VFrPQAcFhDTu/H+XhWBY8EaWQk/H2\r\nhQQirEnDJxEumtPErpI6ov2TNw4TnpjazXu/vm0vgld86SzQsEEqs4JZlSQS\r\nqjlBysAqqBD94dwCZCGhuI9sIYaBqRChdmI/BFe9O6kbZv8Qpo1ZNv+jdt4G\r\nfJQ0VT5bBiE3sjiamIvd5W3V2tLvG3FDXSTe5ZnoPlVZJ7e1mH04srgKclm1\r\nRbKH8nQL7raWL+E0r3goAriI+L3hYxUUdxeK4fbB9hyB/cJJ61cd/T0j5Wgw\r\n/JOgQdWAvZndKnbOwbOZ0EXiWd6c85NOKrCuy5iqaRxFhND8hJTWupRIxoIw\r\nBVB4sBRySqWCjYxn7JZnIoZG8V6hxqZKKLg=\r\n=c1hk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"a6c00d2ebed21da54b4772b4a4f7fed9258f0ab4","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.20","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.20","@storybook/router":"7.0.0-alpha.20","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.20","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.20","@storybook/components":"7.0.0-alpha.20","@storybook/core-events":"7.0.0-alpha.20","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.20","@storybook/channel-websocket":"7.0.0-alpha.20","@storybook/channel-postmessage":"7.0.0-alpha.20","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.20_1660592350586_0.979057664909817","host":"s3://npm-registry-packages"}},"7.0.0-alpha.21":{"name":"@storybook/ui","version":"7.0.0-alpha.21","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.21","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"792688f505a3e55feb252eb65a23c85f8a0d92ef","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.21.tgz","fileCount":27,"integrity":"sha512-Q4msvMyBEllE4l2KxsLMgk5cg3VQ/35tmC6Os3osnzBvVMFWLjfhtIEYN0wtN7NP9M8vO55E8h26pM/m88wKsQ==","signatures":[{"sig":"MEUCIQChuM4BD2/xnwz+cc9YYXooKLia2DFsvt0UwiWD/YhCugIgO+gfxXsDGz+9xmmChYZvtxGgQgKaY+QEHSxuUGkyS9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5897424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/FHiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAyA/+IwAd5IBS8CXFhtduihVKZWNRAHTCQTtnMm80Ooq+WBVTuaz+\r\ndpbuxOfhBhk2JSMoNWSaa728YhgtPsi8O69bdoO31Dg2jj7g+Qc18myt+S5q\r\nSNbVHKQyccEL8e66LrpqeoA7KV0oAUlcxx/7G83uFwB8opjjC6O4oISQ6tYj\r\nMM+wS3ti7VFZAYfV22SnsbGFt6PSP70q2433MoTk4Ya4COdbVYmYphQNv4sk\r\n3YXQtuPIxVxMMKDZ/hcXSQMny4dtbokzO2+O/VwsNzgSFhULhn7ALY7tKZVG\r\n3pSfRX8hslhvJE7Zw8Z7rEjRxEHtGF8BPznHOeCGs+DcKh9xD6zBaB0Q1OcL\r\n8kx7Jvwc8H9zGglFdW6P+8EshpvK/ViAwVcEWbPOb6MTTxXcW4phDBoMXlFK\r\nweegYcVdSxCnXvKjl8LAu47C1BWp6mxWPGMOZt+1HtzvtvG0u5PqI59FhJ4/\r\nGm8smdXkAld33H/l9A+ulXiUKL1z3D52F1B3nrfeW1+csgGY3bpypMLsrK9k\r\nxjaTprln2LcieEySDs647d0NGf4qSkSbxUwgW70lIvU9seyyY3XV5M47lt/Q\r\nUS44c0HaTBymyOidVr3vlqjrzwgJ+D2YlNUtar+HidApaOFGaSPpop97Y1fx\r\nw3Z6sjVUkl+hNPwOXA3M25gWwc4kPWlanoI=\r\n=W5Wv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d8cdc5b21af68e69c6eefeaae0e1efadd06947ea","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.21","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.21","@storybook/router":"7.0.0-alpha.21","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.21","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.21","@storybook/components":"7.0.0-alpha.21","@storybook/core-events":"7.0.0-alpha.21","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.21","@storybook/channel-websocket":"7.0.0-alpha.21","@storybook/channel-postmessage":"7.0.0-alpha.21","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.21_1660703201667_0.23964013565155473","host":"s3://npm-registry-packages"}},"6.5.11-alpha.0":{"name":"@storybook/ui","version":"6.5.11-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.11-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4d398be6f2e1c37521164856bff0e104de82f502","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.11-alpha.0.tgz","fileCount":10,"integrity":"sha512-+VXUQr3RYZEEmJxcz2yfm2R1lpALcJfCTzHk+aQPg9YMfMYijaScJdifCu7XYurQw0fGbfTBp1yJm5uneMuskA==","signatures":[{"sig":"MEUCICBkj+m0w/OLpvg+hPNDd/qNaF5Dk2IMruQYnk8YXKM4AiEAhnpic8/8hFQ9xd5L/3aOt1PpOfHwcqYY4gMENsEL72E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/P1oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpCBAAhT2QYcGk+Z/9quT9nDgOZnBoH8N24x8/p0LreQEGYxY7rn9W\r\nDIEYflTdHh9gc/qW+ECr+wgvi9zpNowv9EK/QWLgbMmTFseT8gxPBhU5tK+k\r\nmQJbGe0cU+Yl31fl81xRBIOPmgH4tvxqHyN2lDsQTeWPsII0bBwEZ3OKRERW\r\n0fz2PV5K08MgovMAyFGk6HHy3qL/r2QaxHJ1P4Q0LvbLX4ibk4FBXIBqoTZk\r\nJVX6JiJ8BbvCoN02eGmS67ZkT0f0HOodq0w5b6dSXA4T2s34MKNQEajTrBDo\r\nmQTTg5dZvAAFknx+r/dYCX1kBW8UI5VK+k2WxQoggwb500xSeiKzgBst/QMh\r\nHMW2HRtSZA1RsqBxFpKJEGZ21BKpqD2aAy45ktDQoPCKcuypS4CJ30aCqzYb\r\nKSD7z59oT2dP6eohMAEHILSn2QM8Af/0/Iy4sprWlGqCjDNS5LY24IIptM1J\r\nOpxfxCeSo1Pz2STtQ5Pe41gVZ2baL5r13EeQXEo+LMTUN3GlSs34QaSv4MFw\r\n0l6/mQapxfBtEsa2WQLyH8nk3JWbwDSqvKnDMchHfcNKri91aDQe2mIefVxs\r\nlbAOzcy30Viz4wdnbE52kZ/K2a7wogCnaYaK/zYPtiyNxkG5o8DZ2Be0Q1Oa\r\nUS+qJvzGkXZjOEfYEfYbzPGkrGQ/vaJWgNE=\r\n=4fKu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"32945d12113a70c17a3b8f7d3172b500a0b7658e","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.11-alpha.0","@storybook/addons":"6.5.11-alpha.0","@storybook/router":"6.5.11-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.11-alpha.0","@storybook/channels":"6.5.11-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.11-alpha.0","@storybook/core-events":"6.5.11-alpha.0","@storybook/client-logger":"6.5.11-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.11-alpha.0_1660747112007_0.8911828195507234","host":"s3://npm-registry-packages"}},"7.0.0-alpha.22":{"name":"@storybook/ui","version":"7.0.0-alpha.22","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.22","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ce5dfc8f8826f1dd7e214144b3ce40961360accb","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.22.tgz","fileCount":27,"integrity":"sha512-kT+Nh1tP+zHNjwx1np680pDt09jHv/Pxsv8Qb6yCkOpfDf2KIZCvfItjNCB/xe4MVir2Hk9KS2VUZUpOJp1FCA==","signatures":[{"sig":"MEUCIQC/AF8NnVVGKSdscbehkVQHkNcUIwydg1m/2/o9bDdaRAIgUmCSJ7S1qbi14v7GF32L9J0YVBVMA4GU283a+MsKp/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5897905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/idUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+hA//TSk/0Ilj0PhT9QX75p4ZsElLpyijMuSNBPih+FdUDk9MEo3Z\r\n3ZT4l0xaVQoF0lO/MA7UAlzmFdUOnP2j/ryc30hsC3+Qnzc03OjtttnXBiSZ\r\nGVQ5o/vg9UYfKVHFudYMLMZVs92IRN5IvuyJxk1SLbL5rFjBNmOa4BG19ZF4\r\nDdtfUGxImS17OTeWL9DgA7RbjRcyJPxzp7YcHoZVnWRhaShU8LJKtMvElDlm\r\ngcGvDsHlBgOf60sgqQ19fGkHVm2upqcYyQnGunPn+O3BIY4+AKPRlSE7Dlm5\r\na0ZUyXV+xxjPIXkFEC+k+KmlrukCGkJ/UDOxJqGBpk6thcsB+aB0iONG+i96\r\ns1pudGvBQhNXF+5UMtg2s9dnwSUNffnAlzz/cAZGgzLPj28qTj+xQXYm2LwL\r\nAiu4xgjl33dm7bBac4hwfrZx0kDi9Z3HNMxM9Pt3oVjQD4LsKz/l4IBTmXYm\r\nFiA7DF6vlmJjjdsxsoKM642LNkY/nY6wDHyKR5eOFs/34W/d0SPB0g5MQDjp\r\nggiJaVnn4Wge4UOF9IwNN6rXCfrHCJC+0Zy50i2qtBwQuu220fT0elye9684\r\nwW4qTw89i81n/Qq+2hOZa84xzZgBe6knvk3ACjSWGh8SQjMaymnDNHlsOQz0\r\nzNIKDsHm5KxgL0ArUgyv3IJuSTLSwv6ock4=\r\n=nLJo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"408cd2770da3f5cfb54843d74dfcf31b6c7e0d58","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.22","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.22","@storybook/router":"7.0.0-alpha.22","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.22","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.22","@storybook/components":"7.0.0-alpha.22","@storybook/core-events":"7.0.0-alpha.22","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.22","@storybook/channel-websocket":"7.0.0-alpha.22","@storybook/channel-postmessage":"7.0.0-alpha.22","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.22_1660823379783_0.7582479230835371","host":"s3://npm-registry-packages"}},"7.0.0-alpha.23":{"name":"@storybook/ui","version":"7.0.0-alpha.23","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.23","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4c336ec39fddf289f88a79297d9a03d7a387a61f","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.23.tgz","fileCount":27,"integrity":"sha512-hpIBf+bUhJL6PMqM2EkiL+L636giM5oVO2WO1foQugJdYUV/r0xhIW9bEQYOwaah8CebLDlVH7Y6XHq3oWpo6A==","signatures":[{"sig":"MEUCIHPvhan1Vfm91W92RDffkMr6R0ctYApRY65kRZuGxaohAiEAwTkTs/iJ5NUbvp/xDrpm0LGnOthq14W8Iyui5xnzcaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5897905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/jFGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7MQ//fPm+20L6R8QzGvpeWKPeKPI4hQcR06OjqrVxeCMSO+qMNyUt\r\nX343A2oYchs8cpJ+l13Awi869yPtDsOYgSwIDzhIXd2OBKeQ+78OqHwO2eHe\r\nZwEXNk/xh6go7DaQ5xvXy3xfCBeiS5oDZz4AxQqRNWKFcZPq6hB9AaEZ1j4e\r\nm1eUhtLDgWX5r8rlEmE6U78tHKJbS5Rz8c63BTX0SdtfP+zkWepm83TOzotC\r\ntDk82D0DNgZ5+MRmDDgO7CZugGDLjhzmOPwaToD9bmD8TrsXEp1Qvd4zCVAW\r\nESSq+/vp5mLPVrLMk92MDu4DLg/p13Wu+BJ+go+pweB+twE3E4fmb+Nv7k5p\r\n2FRvMyWd8KA9sMx/7QE+bA4qO+kVNZNNvRWd+e84h1oHPyUZ5ljFO03nDZod\r\ngF78qbLGWDZTuvm/gr+cOAtbV5ni2NJoTkbSN7QsdvyxrtreTv2lgHCouc73\r\njJvJX48yuC+ein2uzFhMx80IdoYSVR6AxwouWcTF5cTxs36NJUxE9uGGk0w7\r\n52zXByfPBjAz2bqhsCqrFHKGbBLju1zcv5khzSOVyDJ5nqZmEikBj+tOOyLX\r\nZTA6aw3bvfWlvsRDPkjw+09J0xCOtBXNZ5A7EM8kuCN43Ku4UnEJcvmS1p42\r\nNVqoPWJXId0l7Ii/Ct4ZlcQjnvV2gjnLWkw=\r\n=KKPy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"0900e20acfbc12551c6a3f788b8de5dd6af5f80a","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.23","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.23","@storybook/router":"7.0.0-alpha.23","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.23","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.23","@storybook/components":"7.0.0-alpha.23","@storybook/core-events":"7.0.0-alpha.23","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.23","@storybook/channel-websocket":"7.0.0-alpha.23","@storybook/channel-postmessage":"7.0.0-alpha.23","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.23_1660825925746_0.5336716791943616","host":"s3://npm-registry-packages"}},"6.5.11-alpha.1":{"name":"@storybook/ui","version":"6.5.11-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.11-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"07b84266e22ec5ff06520bb22b0c61e3f97db523","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.11-alpha.1.tgz","fileCount":10,"integrity":"sha512-9FxY7OYVfLh5q6Qd9p1bPb6F5n4nsg35Ta1PQEfbCcY1OpWBXNb8HeorxsauL35AXWnvqC5Wxn3ngoGaHfsoWQ==","signatures":[{"sig":"MEUCIQD9HqNB4xJNmo/PS39W1MWzZXiPm+M5NqBO+YFVtT5TeQIgZyhzEVbYhKckxPaJOyTMBDMEpzpmvlcvxkuhKmYo2bo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBBQpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhqhAAlwINYNa7tC8jkBAeP2U3tM8O8wyB+YIaYq2jh7eaa9fq3Ote\r\nxUGKVwYaoKtJ3uoJ6eU/iXdePEkrnO3W4gqNA24pLBUFUz3pldAf2D8hxbEy\r\nNmizSR6ywJ8KjKFXgi8ru/ZKh1FKoDaEQOc3CjO8Oox49c6KO2heJwruI/Ft\r\nRq78zyIWMlvfiZ/dKUkEl0WJy7c+nX8MA8SA5mh+VIM+aMlBOrNaRZeYJtSF\r\nYhXO0GNvXNYIsQGepyI7NIIOhipqYoZ7P+mAGkrUW9nUSoc5lX9OJhzPj7Em\r\nRTuOe/QfT79BeJyWD7yPLpqZKYn1mmxjZjjlLNrwR/p0aIYGVTWvIS4RTMHX\r\nc6A1sBBEqmTLUqwN/RBeOUPvjCQsn2vfFP/R3uhnJEZRIs+BHssmzS4lSnrF\r\nZ+FR4TbRqL4qzRqB4EDUmNpBwq9WWB4nPWg6b8E2JKF1V9Wks2bZSzv24F+G\r\n5xutDT45YutOUw/txXtsU2wyJz4sbXDOhV7nMKlmi405IQtWAaHOHqzJhExx\r\nSmnB6lU5MRAPQAO4XIk91RSbgSjfkfjUglvUxl+Y71AUUEhcS0GQz9YjLIDO\r\noWqDQHk06WuHScGixDNU8oZ9unidEHofCxjGvo7LwaJtIOmM41mow/EAVkq/\r\nrjen4uv2smFyEwXHxh+H0STK9rVtRq+WgEw=\r\n=o/1w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"26cfe201c360644f2ccdf36e4d8c75134c9bac77","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.11-alpha.1","@storybook/addons":"6.5.11-alpha.1","@storybook/router":"6.5.11-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.11-alpha.1","@storybook/channels":"6.5.11-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.11-alpha.1","@storybook/core-events":"6.5.11-alpha.1","@storybook/client-logger":"6.5.11-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.11-alpha.1_1661211689079_0.13649992136038103","host":"s3://npm-registry-packages"}},"7.0.0-alpha.24":{"name":"@storybook/ui","version":"7.0.0-alpha.24","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.24","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5049d06e40a9b32c664c0fcd98c451220daff6df","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.24.tgz","fileCount":27,"integrity":"sha512-vVOO+iAD/GOt7Xja8VXgRwQ6oyw54iRnPJkWf462GzparB/p+T8T/O3pXctG9jnk+4l+DGi4jRMuUNzfwckj7Q==","signatures":[{"sig":"MEQCIAdYbDRvf5wlEiQ/Bqjbz2S6S9gWfGycaAddUzf37ORyAiAsTfUcjjw/h5gUG11Cxpbv/aePDUlqMR1UuWfX1mp8JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5899929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBaDMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZYQ/+J0yuihWUTUzD17oaOEv4UCIGkuqEPvnwVFd6ngrpcKDuKtqa\r\nSWzH+Sf8VIYJvv9Gj4CjqihZ59HuIUnQ+HRHgq8XQp0jwuE2xomScnij13aW\r\nMDFCfbp9fopyBoGS0S89eTYzOI6rK6Pw+p28+HnflvxDNyP7jjgeNw6wAv/G\r\nilLYJRQlNmeLLxr5uaJCEILHrSnzSWYVov8xLxA6UseF5vsQ9s59XtlrgCur\r\nvOm0NJ3JN09I9FH3kh0xF5yZxuBIaOVs83yD2+tA+6CYougFPYwiKC1qbhU1\r\ntIE68Z0yoZiQU7AtHjTxZTCB+8c7bp7BnBMuKTbiFFipWgGAdOaLFrKhNyPA\r\nxNo9ZjYC15sSkKblJNdfH/ofot4zQS16YUeuzx7xmDh5u6MNDcalMpVo6tXZ\r\nYTWYPLWvD44u1wIlbU5HVawdx9ENpSeQqWpaC+QpXKmy8WI4L3ytikSEZw6x\r\nPNjmp4h2sx3tUqzHPdMak4OwbgHMAAwc6sMNEmWvikl1OkakBSqrj3cMb2we\r\njQ6MzaIER0zauAzVLOkDegaE8LFm0MQdXU/6TXKvFlGrSFGhYA/IOQ8x9rl7\r\n5u9dzoWwQYDleKKu5ZJ6QZaV9b208wQ+k5a7n0CDhq3kcEcfq7bUIqWbLmM6\r\np0HblhcSlDsRXLZk2KYVHWylYMN6VQvi8ig=\r\n=kpvj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e3232cb426b8381afa48f42e6baa45fd9af9bc3a","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.24","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.24","@storybook/router":"7.0.0-alpha.24","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.24","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.24","@storybook/components":"7.0.0-alpha.24","@storybook/core-events":"7.0.0-alpha.24","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.24","@storybook/channel-websocket":"7.0.0-alpha.24","@storybook/channel-postmessage":"7.0.0-alpha.24","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.24_1661313228256_0.9088112637116919","host":"s3://npm-registry-packages"}},"7.0.0-alpha.25":{"name":"@storybook/ui","version":"7.0.0-alpha.25","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.25","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"59b4d8670469e3d27eaddc699c438749733dabb0","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.25.tgz","fileCount":27,"integrity":"sha512-srCCTS2DtOUsC3XKULKGaXm/2JPRqOcLNucbYMggbJ74jEyhkfHE5CZ+ZSG/KEjgaQnxJHlIRZFXmO31oHq55A==","signatures":[{"sig":"MEUCIEh/SjA2KrfNddzTIblOnlkeWkuC8sabqiYPVR5IQ9afAiEAwNrr/48O24ir2TZgzg/673J70YHD1s9PbPi08Hms2d0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5899929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjB4s5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/MBAAikFQ3kbiXO8yjoHYJc2jaBSQTzfyGBg26HwqIC747oN2xm8x\r\n33+X36Nilc2Twqiz4DhC9XwP+kenQMtIXgjuTtNHx9a4GZv64/l7w/tDapDU\r\nF0H3hSuseORyN1tHvYG0sGJIcyO+Px2d2HzFWG/jiQbFYXYNuDcb9akeuwVw\r\nEdULTNtl6xPTCQBpraxCr6DCYoL4jCZavV92pRokiJWsz65uqBBe6tDaV5Hz\r\n1hAlZ86DT4gbMqbh2bDZeQoUta59g1rNt0GWqE4Uj3Q5ieWrAHs3H3PcNnBk\r\nbmh6zK6aJgDlTsFWzfcrqM+1ghq2vnV2TXsmvRdT5juzvfZQKaKjsFNrqMzP\r\nxFS1H9hS/7PlM74lrkQoQy/6In/7MwD03jn6UhuwmpOVccUzaumF+p+K3smr\r\n/N0lvTs80OlLw0deueNiSDfVw6qfceo4L55e9WkIgICTJrSqD5o9crGie73W\r\nHabQHOw6LdFFH642NcKDpOtKVrktvOFI672oOmLbZsB/2gWOJ3FNB1WN6eH6\r\nY1ZzpRTMC9NoS2DNWaA8bmUm1JM048ZHCjK7uXwg9mOV2Y/z7dzJNkLm5pid\r\nAiiSpXbjk61DKYK71SoMLZ09p4yKFcmBpywJNdbSic/Fp5RFUTjeBw/jyEEe\r\nsRPD/YlYgwp+LJW+v7iYmMTFmoLe1NLPnls=\r\n=WYku\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"058af8bac4892d95fdfe755dedfd826cb4508fdc","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.25","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.25","@storybook/router":"7.0.0-alpha.25","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.25","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.25","@storybook/components":"7.0.0-alpha.25","@storybook/core-events":"7.0.0-alpha.25","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.25","@storybook/channel-websocket":"7.0.0-alpha.25","@storybook/channel-postmessage":"7.0.0-alpha.25","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.25_1661438776892_0.3435027767981189","host":"s3://npm-registry-packages"}},"7.0.0-alpha.26":{"name":"@storybook/ui","version":"7.0.0-alpha.26","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.26","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"0a9e2fd70285ef1b3d7ef3be1e7133c2673c76ee","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.26.tgz","fileCount":27,"integrity":"sha512-09NuItkW1yx6nArVWRP023vQtsjfif2sfYWi860Vo6A0PC775S5P9f8ZySyCdgAPMuuX3Qu5tNpJXXjRYozMEA==","signatures":[{"sig":"MEQCIDZJ9fMKPMqpnnbTpFD6wyLUZ1S9TpiXf4+k7UxVObtmAiA8gRlb33Rm4SdZbEsLF/XQcRaiAG1enZd88Cj764OhnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5899929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCKrJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdZQ/+JXlnimne0RJlsi+ItgUGW7vFesY3ooYDowNHK5nBEohhRL3R\r\naxRo5cTN4x4qwQz8FN0OCpAtAEkIkdUpLZF4glaV4mW9Tpfr4bbLmVvK10bU\r\nFDSV2iGGe7dXtgxc7QTYmiPKb/lbC5R9iSPIcDnIaXJbd++j5T2SBnfjb+Wl\r\nAHYnZi4jNkpUFyQJFgcKcxYcZPFE8tjb66w28r98G8v1zJIGA2RpchBAMqM8\r\nE6kLLxB1Glf02+ID8q24QDyu9ctRKqsorbrXna+oYqD8HwqHRhq8UWtGuYt5\r\nlqbP4zFIV/fT1tSXvUaTZz0LeKLQFQMS3xVhb4LnXzV07/SdfIPgOE+dpupC\r\n77AW2MhAOhwULmFz6AfkKYhPc9DS4ifW7vNlH7ArtWNCQOR3/UkEsdJGIrI8\r\nl2He6q8eXWEQGNUvWDVc2vE9bu8Qt7DF07rimpSXhVbC0YfSxlQ/G8ST6Hzg\r\nZvOcRAhKB53z4isx1kiEoUfkWlvme0Knod2B7yUL2jyIv9wgJUIVqBtklhb+\r\n9Is/rOaWiDW3F7l+sfH2y7sIw66lqJPnBVv0OeT3rgbu7xyyU1ApBECfh+Nj\r\n4VPts3Z3z9r5WF0Nw4ef32XyJ+MNrHVK+8wdswjfgU0inKaRzeMsA3sc3qhh\r\nsWcdnPfnUo5gAwCg51kXwUQT87p9I2VDyQw=\r\n=dtQW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e5c9cfe1d0482132e59734d9cfce57477045914f","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.26","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.26","@storybook/router":"7.0.0-alpha.26","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.26","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.26","@storybook/components":"7.0.0-alpha.26","@storybook/core-events":"7.0.0-alpha.26","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.26","@storybook/channel-websocket":"7.0.0-alpha.26","@storybook/channel-postmessage":"7.0.0-alpha.26","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.26_1661512393173_0.1248412556150138","host":"s3://npm-registry-packages"}},"7.0.0-alpha.27":{"name":"@storybook/ui","version":"7.0.0-alpha.27","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.27","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"4d75fe40464e61ac0fbf5e6abc1ab86e639523c6","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.27.tgz","fileCount":27,"integrity":"sha512-brXehp26fOtkza6Z8Y6CjbDxQDqRMniHU4gKgFOi/KYlNB21fTo3C1zjyT/XewItTq9ftMqrFKutBcZ74lGtJg==","signatures":[{"sig":"MEQCIGEF3v+Q+WdvFU8L7vGcUFki7R0sLtO/tdKoBRQIYUM7AiBjWiIEtI0J8cC7SHZBKTn2OctIKVz4usVYkLxt8Srg+w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5881191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDs6QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9jQ/+JBRz6RQD5jDNJ4cIKRsZTa7FpnLfK+AojTiVgMf8Q3H+bDCW\r\nZiZd1zPBo2AjLijppfRHkoKsgE7NG2w2ZmIRde/Hzk6GHtha/0ymFr/5vhB+\r\nA5tAWf2nLp26aRABU82qh5wBGtmkr4RCGkdy0U0fHrJ957CbLbiVjFL2Iz7R\r\nJVAgEp1UDAA7DKjwuoCMW6qGoXWRxRMAQJ3XzVTLjllQqwfGTMrxjPOltUhe\r\nXF0u7wVw8gVfCsfe09CNd5g6x8vgeH7C8W4kKTCMYDbk4OBK6/q/jesixpwx\r\n9mFDmg1UlOtU8b+ABEX2GFpjRGU6GTjOiZ7uxz77RRBzIgcgS0+XfLSuUkWJ\r\n4M1B/mz1YokuwxS7zaeEbfOHsds3NIPbr/Dom0n9yNWkq/qYmX+1zlfSNrpN\r\nIasTR+7aSq7a6S6k+6XiWPoi8Qve4NiPcT/IkxNm3spc6tpvk6iEykm9fzQo\r\nUjQHXt30wFUTBJhZeLbWXfBC7N6YJCh24HFTvRT5U7/IfQ+R/73PW7IT+QaQ\r\nPAJKTv18qMIcSx9Z8+3eoh8d4+FL8RGtyZyAJm9fOE3R+tiGEk8tb2gafU+e\r\nKZX1RzmfngjyRINhQdZYIaWhL3qg/B/M3ZOZ8tQMMODaAeIZj1HV/bGU0tr2\r\nFEpEhZF+feZ0IGg7vt45pc7f5jOiAeEQkPU=\r\n=VDYz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"3e33f0709dd97151b7dfd86fd9858d13fd1c5738","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.27","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.27","@storybook/router":"7.0.0-alpha.27","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.27","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.27","@storybook/components":"7.0.0-alpha.27","@storybook/core-events":"7.0.0-alpha.27","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.27","@storybook/channel-websocket":"7.0.0-alpha.27","@storybook/channel-postmessage":"7.0.0-alpha.27","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.27_1661914768102_0.5024144337637473","host":"s3://npm-registry-packages"}},"7.0.0-alpha.28":{"name":"@storybook/ui","version":"7.0.0-alpha.28","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.28","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"5b7152088eaf61622d31411b49a30f53b3a90bd2","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.28.tgz","fileCount":27,"integrity":"sha512-wE+Pt5C58WnP0t2VN1muRJaq3tAFmtCyOTzzL3kg1w9RoYt6dde9u3kcCqJk8ONecLodFjMUZQmQNMf6ipTGAw==","signatures":[{"sig":"MEUCIQCM+/I6G0okL83wkhCdXDPLibxP2qByJc2liEWGM/CskwIgTP6e8Gnn2h2BvRndFCIswmaJN3Sk7VuR544za3KD7kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5881868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEONYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOcw/7B6TDK0WOdo9GQWyHjZkqOUTrfSTOAl9Svx6uCKI8nypctgh+\r\nRgP6sTaMMvLT3l+UChv9QozyAE0Tj9ymu0LwVADezti5wOnx0CjEYRXvUGJ6\r\noR03XDjuGifWGRkpvq6qcUE8MxU266aUooCc4O67cdJLP7VXS45xh8Ts725e\r\nf38ktPdDSk2vPgPTKbOWlhq3x5Ptu5sYCEvpSvlvkpyNGzaeQzd6ZXoFVHF6\r\nj23BR/yw/duzpe5nM2rP0VUZ1PxuxcgbAbY6eR409KyunaSIR8DZxHubhcdG\r\nLsRTsIXivEXKYBq46kbdEYSNxj+HEAxIoTMLcqHoGh4gKPdjdQPP5gHanmkn\r\ngC4MHH2NSSlfSZxe94nyN2kR9f+KptydOcZvsVVJnzv8uypTtO119fSB5Aee\r\nFOM0orl+lERY9QsMpLXRJ9GRwNGTFYYFJ+x3ObBc22OtcXLGbheFju2fCd3D\r\n56MSXCT7i8smbwpYvadWcr2WGmxgCFfGd4cK4EXVWBYwLGVv0VxvqDwhR7Mu\r\nqAqCwSeqXB8dG7hY0/re56NSCUKKA8fzQok17yGF1dYeY7DMksN+XSWRTiPj\r\ncEQskYwYRW/A0nFZWXFkH8BeuKQbn1aCEEpWKdAiSOEW7/A2sZsd4MDzo2mT\r\nfkuynlJiwv4sy63lS39PuqCprgf+02giyMw=\r\n=4rhl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"941b85ce04c2e7c4328edb3568c1dece36dfbcf3","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.28","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.28","@storybook/router":"7.0.0-alpha.28","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.28","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.28","@storybook/components":"7.0.0-alpha.28","@storybook/core-events":"7.0.0-alpha.28","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.28","@storybook/channel-websocket":"7.0.0-alpha.28","@storybook/channel-postmessage":"7.0.0-alpha.28","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.28_1662051160301_0.541474255203729","host":"s3://npm-registry-packages"}},"7.0.0-alpha.29":{"name":"@storybook/ui","version":"7.0.0-alpha.29","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.29","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"225b736b6343d11cdfd496ef29ce409fbc3d269c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.29.tgz","fileCount":27,"integrity":"sha512-zeltIMaBNuHKYs5iUlt7kiJnCDqKwanrxciZBG7kiPnmKWdZH62v4J+3LJ5gaaM4yhTlENn9qCjiqalQtktYaA==","signatures":[{"sig":"MEUCIHeSyFftOhDkdIR8/SYY5wyYiV+CrqWlRHYeEvyJ20sLAiEA+Ivpt6DaAI7FSISU3/nknFR7+cAH20EW01cQN5GcwO0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5881868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEinHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWKw/+O16/dRhQKqUWcpfjXyYdw8/F9coEFeY+BIYhF02fEtfUy2O5\r\ndoiLSE/Zx9AV5d97SpLG0ip7QSrySIHTbn00vYtc0ivM+Y1GmZEkuns46I8c\r\nKq4Yfnd19lMSMcqXL4K7zvG7wv19zlPumdcFkZMLZw/M5/nhYbbIkyYCM+5O\r\ngTH8VxrDNYBAPXo5fvAPfWRc0hK2mkWMTL7phM7NZyduO5Z7q2bN3C0D2e/o\r\nisKV9eDtPmWFeEfwKZCqBXV9S1OSwYNf+XANm2AqGEiwBuIlm7wdXzwfNZJ+\r\nxzFZX3AX2/et86nu/bYuL2fabXxU0LP2qLbZneU+LSMdoouVfNztZhISxn++\r\nDob5tnSlOMzDROvubOgPupsGMtNjBAET7fXvmt830ANTNEHiQQY4whDxmZK3\r\nAfr2pkskbRMIr5/B5dhF1HnvbRQR733IbH1xdH7L4J09P9JVsWp++017VXEU\r\nvRe2E/E0DnvVZWyTmHRGCFAUHnzlugoWwkralnpkVNrxWTAVYBcljWBeCiF8\r\neSPNAJSfQTU0nolMaaAqBD3ZIFv3Xyj75baa34kYaTSdGaXFAiF8kkQOzzGY\r\nArfrWoUY4unCqbVunpMHuyGbkqeh1V6iNFUpEjunVmUw0NAJ5h8hmBgSmo53\r\ncnV4KN0zIcRFeAUAnZLm76nktVfAmaw6ViM=\r\n=m/KS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"87ce9b91ce2c7e35a716d2254768fb1a34e777c7","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","core-js":"^3.8.2","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.29","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.29","@storybook/router":"7.0.0-alpha.29","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.29","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.29","@storybook/components":"7.0.0-alpha.29","@storybook/core-events":"7.0.0-alpha.29","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.29","@storybook/channel-websocket":"7.0.0-alpha.29","@storybook/channel-postmessage":"7.0.0-alpha.29","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.29_1662134727329_0.26075657378058015","host":"s3://npm-registry-packages"}},"7.0.0-alpha.30":{"name":"@storybook/ui","version":"7.0.0-alpha.30","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.30","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8aa3a3e52b850f71287cf4abe7c4faf6b6008ce","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.30.tgz","fileCount":27,"integrity":"sha512-qwjxUyIEfwz5LOjllGpGMXsfVD1siq0iqj8c6qPngcpX4a3xzsqGXiqzNXvevgBkvfjEqoXjK45cuaBzSSA2QQ==","signatures":[{"sig":"MEUCIQDgeg7gNmrumti0jIP5cJ8p5HfI669Jp0xWDKNbSlX9DQIgPXGEmDrpbZziaS1eqaYDUTrmfGOhYq5tfGO4JysAatk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5881813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFiowACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCvw/+MeHxZDcMvx8aV3YpLKkQnH+KZG+0Ndy06Ykx8jRBvwffMU6R\r\nrF2eVQatokZ55tMlMNcb/3lgpB7H03McUPsyqhWEWLtuNeiE/qeLH2akW3BL\r\n1jBZQqqjBTEbsl3X/AjJWntxwHAfbmQ0bjumCrsqZ/0trgtRLbKdPWPeSTH+\r\n76F6R/S1E0xDnuVf7nTVxCMJ8frvzkQWfWmzrkHfKmT3UO5Z+iogJO94/9oG\r\ndxXgnKI3Hr4915QT0677q3vEtp8FfV2Ekms4JOz0Y7vKhyjKUGfprFGS7/LV\r\nHEfxUUBH6jGzTggBECYAueuXeQm8eIE+AptW5pYbTLNERIUp8TpF6qZRsA3f\r\nVxyuqjnCbCq6i867ioU3RioHGeTZ+Bv+GxJPfI4xeJgJu85dPYx9p17V8Wzq\r\nI4QYJLb3h4tKwuBpRDHXVfSKVAcpFHEdemJelkpi6HMxmZhq8HfaZtWC1Ush\r\nAH5ju9M+9z88RRe2m+DT+1XBQxlhREPKUF2x4cIdebtp441n1D7GS1ohfsEb\r\ns22Xv/uAZm5+e9VAcVkfXGE2k094qG9dZ67MHHIbDSwHDZLqAAmrq7Dh90HV\r\nb74oEdHEkopWLtaaI37e9kq1pv6ZKuoPQ0pta2EfQLfaZzLowEEg6t4LrB1F\r\nRcd5AwXHz5GbQqZE7k9MPJ52S+lYoC4I7/g=\r\n=jNfJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"aabf7b595cb13d8a86dca27ad3d6039205bd55d6","scripts":{"check":"tsc --noEmit","prepare":"../../../scripts/prepare/bundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","util":"^0.12.4","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","@babel/core":"^7.12.10","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.30","@storybook/csf":"0.0.2--canary.0899bb7.0","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.30","@storybook/router":"7.0.0-alpha.30","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.30","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.30","@storybook/components":"7.0.0-alpha.30","@storybook/core-events":"7.0.0-alpha.30","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.30","@storybook/channel-websocket":"7.0.0-alpha.30","@storybook/channel-postmessage":"7.0.0-alpha.30","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.30_1662396975913_0.24990438809587512","host":"s3://npm-registry-packages"}},"6.5.11-alpha.2":{"name":"@storybook/ui","version":"6.5.11-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.11-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"7e4353291fcffa122b88f2f762f706a8082f4c96","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.11-alpha.2.tgz","fileCount":10,"integrity":"sha512-8qhKcUQfE7udMGVoZ72Ixz5+10lmEVCRbS25CU+RisNeoTAVv0RS+5wNmhgO4OIWUEGPimrNVuRpaeNVE+Fi2Q==","signatures":[{"sig":"MEYCIQDp4SCFdkqhm7TtylNG0ZrEM1S/rXrF1KDlRSnbjdp/OQIhAO/cdIX8+mXSiyj893+rCF/F1c06qPI06IR9EXJKXusG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGAdyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocNRAAhi77R5r5aQHJ3/E0C7wrIzAuJXy8EFTP/hJTRpoATaMSzvJj\r\nKS22bxL4B8bGYwgxulEl2pKhQ1986cSIy6g8QpOyofSFIOBTvgj9zzmp7EhN\r\nOL6drn3cNwQDVWtTBS4z86L07pyU9qRthzr20lcWkgbDw+BDgjYJAvUF7/Dv\r\nhjPKIPrhDz20GWlzxpiqqYvVsi4EtuAPKELtmZ8uP9S32MxoEkz1MzPCgaE4\r\nG05Svp1OvwWpB7/W3Ckz1RLShZY5Fz29xyStVkfMQm5sWOAMUO5ZoajCs2qZ\r\nQTIMYlZVJgawVbQ3hGo6HbUglKYaKzlfiOX0MgNy0ae4QGcgi7ZRcbNPrQBA\r\nM6NWDlQRpOQ74xOGSI0Yj+iH2wCRmHX72mM6MoAbNxZsvuffYQNGdMowVOXa\r\nGkc0kb5Y7dlsECwoKrVUEP3YhemHcz/nhfhhv7iaa5ID8xPqr2l3mK4iUPlb\r\nGTYCXaQkJXOhyE3JZOFKL3wY4XHRzPzZs8gpLt/nI7yjDA2Wxip1D0yXJUz/\r\nZnx7k9TBoYWB0sqFzDvFyRRGwtQZrWxlTahFWL/lox0J5Wb3NAKI2tDHXbdD\r\nCuoD+vAdAh0QZGFX1L8ceyZKbfh5xELhenkrwUNyIX9FK0E00M/jdotg1FG4\r\nxU4b/MPbrGUz6IBCdl/Y0vkHhzgFe1GkVos=\r\n=NjYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"069134850deba5a8f7497cc66d4dee834ac95ba5","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.11-alpha.2","@storybook/addons":"6.5.11-alpha.2","@storybook/router":"6.5.11-alpha.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.11-alpha.2","@storybook/channels":"6.5.11-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.11-alpha.2","@storybook/core-events":"6.5.11-alpha.2","@storybook/client-logger":"6.5.11-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.11-alpha.2_1662519153983_0.8289806933348485","host":"s3://npm-registry-packages"}},"7.0.0-alpha.31":{"name":"@storybook/ui","version":"7.0.0-alpha.31","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.31","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"938585eb393c4a41d3f6b4dcfa4669d48a2eac37","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.31.tgz","fileCount":27,"integrity":"sha512-a8sk268uKMlcJo0kpBDPkRzLDMKkYo+JB5R2sHlYfJhVn+II6IKvjDnZJ34nkTktO4/aCgQZ8VtAXnru1+EZgg==","signatures":[{"sig":"MEUCIHHwGsRUKnM6W7e4KviXWhMaRSbNjCkwFQYRdlJOrBafAiEAiGrvGTC1f0W5MYEvyM20UwuHlEPL73ovu5hgbt1dX1w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5884484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGA03ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGnw//Su2Y5V0rCQlkx97CERtuBH5yYjLGFY0CgkAg2dsAfC9uJQy7\r\nIZMc9XiI5Y5dWbrw4pMvQrGcyut3/OT4LQAx9R9t7NkF/r3LVdwzqKxv9aRj\r\nEoQDbDBIrwESGAzpHuBYH/7H+zFVKXjbK/x/z0EH/4BAAwj+Xp77PG+hZTwh\r\n80MikmQ1V0OSR9Ts1Gva/8Ot/B7QcxvDJVwnVKHZlT3SaQpVLXq8wJiWhqjv\r\n3UVaOnWrcwteZu3g6CPRHtP4+R4Cz4fVlIEQxQ7Y2OBYlOGBHt3O3Y5gGPJL\r\nz//KNefcsd8Fk9UqSwECSNBPpGVONyBQ7f+KFV8cCjflwxUDK2/eZVfEW+Pm\r\n5hRC8v13yg+KKDo7tuWCqxK55DLs6MLC/933ksYWtvhQ7fuSXVuS5UIabNP1\r\nD3d3ryT7uFtLFXhsln4BKL8whkZcmfcbPze1a0U9iFRAi+PCwSDMDeyT3Sog\r\nOjBR2xpbBGmiDfaY7g4u7QP+n4FxeVmP0rNJJ9BJAG91Jx6SfTP/yLaP2afD\r\nwJadztUtgO4hucqW8UZD8Rc/yvdZg6hYL9OwGymhD8Y5RWieq00gqYgOakNl\r\nKTl92JVHJVHQ73xojwupS9TsP178ssBXAT+JnVKbqEBWpzwZ9Vn919vWhcAM\r\n/IBgof7g8FUUx44nX/cPlE1RcxLd1tuwVb8=\r\n=ywER\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"02c013c33186479017098d532a18ff8654b91f1f","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.31","@storybook/csf":"0.0.2--canary.0899bb7.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.31","@storybook/router":"7.0.0-alpha.31","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.31","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.31","@storybook/components":"7.0.0-alpha.31","@storybook/core-events":"7.0.0-alpha.31","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.31","@storybook/channel-websocket":"7.0.0-alpha.31","@storybook/channel-postmessage":"7.0.0-alpha.31","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.31_1662520630870_0.5808002525039664","host":"s3://npm-registry-packages"}},"6.5.11":{"name":"@storybook/ui","version":"6.5.11","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.11","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"636be86ff424122bc25ab04b88ae0ee43877b533","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.11.tgz","fileCount":10,"integrity":"sha512-ksPtZxDIaB4PKKOghW0uA4tKe0b24x7U99Bmd0iJle9fBURMOQVHaDNCUmd2mXGy4WncNwrh00H/vLsOFtBJPw==","signatures":[{"sig":"MEYCIQCys1b7vjLKJvK2eIQ/WY0/dBNws4aZqQV7DvN7QYTzOwIhAPfsAE1o/szjEJuqHTA1tq4aPug6MeHgcAY28UgaVgdn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH9wnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqt1Q//WWmmei74Uwh6XA2ipZS+W9t0HcgfPula3ZvOuucOEvkXB8TI\r\nQaFHP2sELqSsLrPj7WBK8rLrI1wd1tQOmHZq5jRL79SGzSck6clM/hTQdXwr\r\nyFzlfhCxgtOTRrfB0WFjgcVcFv/HDYI/659Wovv7OoP7BjAfkN7wkeu3MUzP\r\nRjnDYQP/QgNwYShiCZzN2LOMVTy01IfUNpPchcK1z99NBPqMmYaGS4owIemt\r\nwHA3Xs088jv1NparMtbdS2KVp+MbxXcCl/kNTz8bK16qnMIU08J3o3/J6zzj\r\nfIFqtFSHA+fm0Xze5VYA7cPlroEfaNgbwgBUsseYvFuDmSTs0MyUdphUqgoN\r\neWCwuPHGiqhdoMuYILw9IMWs9ebbH9SqEVBiRi/gMlk61X/XsvOBIXh7XIHp\r\nRDtCz/PN8j6+NpakPfADYI+xY9cgoDfzApLFnnpES+i+XZTmxRsnK+pZ3Dyt\r\nLOmejGT1BCieLE5ScVar2RU+wfIZUmxQClXy66m8RUrX8lhuMwAmkPQAptJ9\r\nQJBMj/hib6wItj3GcA8lC9RaSsERlHfdLk+AU8T5GHvBzJC1bMKLNg7XxrHy\r\nYnUciC6Sjdqj4JZTJ77w4On1VnxMGJefXFc35aMPF7DDQgZwpeUUD0TW/B0E\r\nUGWGn6sdiOheXYej8ZvMn0WtRpCicuD5QQg=\r\n=RTEk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"db56a2586508ee1082640f24402e491333e42ec4","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.11","@storybook/addons":"6.5.11","@storybook/router":"6.5.11","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.11","@storybook/channels":"6.5.11","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.11","@storybook/core-events":"6.5.11","@storybook/client-logger":"6.5.11"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.11_1663032358798_0.4670963376547732","host":"s3://npm-registry-packages"}},"7.0.0-alpha.33":{"name":"@storybook/ui","version":"7.0.0-alpha.33","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.33","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a26a72d532cd488fdf697fed584f68a852828246","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.33.tgz","fileCount":27,"integrity":"sha512-KjCKOmY0SQfRMCzo9ppPV7uFx946KSsyTDCqs/yeBCKjXyw05HMDLVclQqVQ8mlfiAya79F/EmhfjJ7/ooImGg==","signatures":[{"sig":"MEQCIDxrOVoLtoFsXJyIBJIoKvVoScGMl6TOZfSPrGcnrvxVAiB7LEJvnFw+fp/gBjzrgSU1HM8rQmofy7KMqNE+KtTcGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5884585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIGPiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsiA//V1MgmdR+0PQ6qWsm9UMcuBkEWr83aaThDXLMaIDIVPbO9oBd\r\ne9ezqGONkg8EDz4ph/Z7qMH2Ez5q94ehgi83ePQNE3LojVSa0JdDaoSMKFvB\r\nM5eBoomj5XxonXyWexMF8Tp8WgoUXoSwpCSL2wiHm8hZLO6c1hb9O/DObPHJ\r\nFhvfnDEVkgNKEmLIen8N0wyEuBHt2mLEqYTVkgrMhWl2k/MxXAFef4ScLNUr\r\n178mn3nVNH8bIcLIFtCT53p4dXbkfjOgdrSG0MP5viokB3bwlGu1isPEImAW\r\nRkSLr9mzFCiLzpJ4IiW//cViyl6nCAzifjzjOTurR/VfiOa3DyzKjPK3Gi1O\r\nHCEQbSN5Ibi+uvvzxSjNtPSxhBgf8ZxCIEirndvBOilxHqSvwzs9c2gbCbQa\r\n1wdiv8WEU52Ryle5Cne4u/o7HUOhoCNCQiKHK7NaHufoKR7yuozIqyrXTV/3\r\niP6754Wywp5iSGIiAsAkN77rQT4LUDumzujpsA7kOOrk1WPNMrs63wD2V6tT\r\nq1noWnQlhidTpaQn3kpRnmLnXoKYV1pXYww37RqWtnByTeQs6AsHq9u4HYFr\r\nCeikQdJsL6gGSEsHnXgqYCEdiCCNHxtkpfmUvER9LoF5lAGesEIU29/8zkPk\r\n3cVX1E26XlGWYPrBe+Z3IgN1UkTk6WqdfLo=\r\n=ZfBs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"5da5b0fabd04cc5cd5771e8242a960f05d03234a","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.33","@storybook/csf":"0.0.2--canary.0899bb7.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.33","@storybook/router":"7.0.0-alpha.33","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.33","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.33","@storybook/components":"7.0.0-alpha.33","@storybook/core-events":"7.0.0-alpha.33","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.33","@storybook/channel-websocket":"7.0.0-alpha.33","@storybook/channel-postmessage":"7.0.0-alpha.33","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.33_1663067106504_0.9322429815276063","host":"s3://npm-registry-packages"}},"6.5.12":{"name":"@storybook/ui","version":"6.5.12","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.12","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"25ccd6e6d5aae227ba6561c2b8e9cfda9b0ad4de","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.12.tgz","fileCount":10,"integrity":"sha512-P7+ARI5NvaEYkrbIciT/UMgy3kxMt4WCtHMXss2T01UMCIWh1Ws4BJaDNqtQSpKuwjjS4eqZL3aQWhlUpYAUEg==","signatures":[{"sig":"MEQCICU5t4N8h+ao9FgQqqMDWhBNTsQZxP1B1uXc1hZbljSwAiBQS006LilqndHgAyLuEiBAoK5Vyf6gE9IL1pw0Y9tJDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjISavACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRbBAApS+gZYO4Ke2vurMrPy/reaM0rFK8CGlE2ZTyfbvJFGyrV3i+\r\n3Lkybgb/xq+yqxWtLzctlM0KjfVVkZvuSD7KjVkGcan0iPDLbmffkcb//GD4\r\nl4zuUJ5jxQL2veFDFuXBAq/1EtnK2oppjczCURbDlovQQyivwCmy4s4Kd7sV\r\n+o7uLuhmtGrHqF/R2CV3f8KM1iMgE03HrvRzHNM/ORJAG8QBMjgA7jY36JXi\r\nkplDF1QRkSSVCCMQ1ZJPLWRRnEi9fA+HiKyw8GvSFShSDQzsu38xwkMVwY1g\r\niwk8HNPWOa9ImK3oXm6EySUXEabZykU4TXObHLBE0RiOmdMLNAWzxfiSuWvk\r\nMZjBw1cyw/J/J6Xr961idNLzzVU2euWsgxFHasjv7OUMJNOugDbe1b3+Q23Q\r\nfcTdqAwGP2wENFWmhdxnhQXsnkcNnNaU1eg7vClgA6pD4TzVXWn3PIP85Dnj\r\nES4d+cwaGnaM1VKFf1S7pMcEtkkMrjCNBK7QFAgbq4HGGO4UpRQ94NrVYNLy\r\nLzH3HgBS577ZAHN3N6elMkonYvPSe8iUXifML0mR0rff19tvlmz9BtDj0cfO\r\n81z3otCZBkdbe56hZKOSJ5g0gdvhzlPViDzh9EjL0lrf+gbZ06v1EvtZepFk\r\nbKzIz66te1fSxDGwn76MRvjgbGoQeXSlZ+Q=\r\n=0LWN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"e3991cb4dac45c964e29f82da6be5912464c5a4f","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.12","@storybook/addons":"6.5.12","@storybook/router":"6.5.12","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.12","@storybook/channels":"6.5.12","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.12","@storybook/core-events":"6.5.12","@storybook/client-logger":"6.5.12"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.12_1663116974912_0.9944216693325103","host":"s3://npm-registry-packages"}},"7.0.0-alpha.34":{"name":"@storybook/ui","version":"7.0.0-alpha.34","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.34","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e280897c7b0667c034f23bca74e2fa3065fbc78d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.34.tgz","fileCount":27,"integrity":"sha512-8F7FnSFnuvvRawPSpJx8Jc286W+wOI6ni7cNXL3pGxfuTsI1yXfwHOk8wj/B378YuR8nYvP/e61fmo9ldNBf6A==","signatures":[{"sig":"MEYCIQD1xE06QsA7zd6FrkyuLtjF9TqqsD4iBiFOqA3aKSo1SAIhAJAXPy8HAUy7L7rYblHylZ/8phick9a77ikd/hdV+1pI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5887022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMm1dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+Gg//SrJpK6YeAEPsAwQ27nGcucIf3JYzQbFhwUWe09caEaQWOPmG\r\nXBCbxX2Yni48Jh0PcIcFsK0Ca2SKFe4m0uM6YHYLix0r4aSJQMbmk9KJ+eVE\r\nQy1K70S4z11QDz78+qxTodIP4hlnHsryj+YZI7PjHCgadNZ4PCJ0PJC4sq0e\r\n7N7mtYr9Q3t/XVpZia5P+GpTwjIt45vulbr5GNbGGduIt2k46pTZzb5eR2dk\r\nAsuiH01yrzHaSVCKsbi9W45pTU2SkHQpfzQ9+617S96xP0UZ4kC0X2QeZSsr\r\nb36JTLLwBlteg3S0MW5uz9G0wKdXiP2dLvH3Deh5vuUUZwIO1PqyIl9zL/Mg\r\nHyGqCCBJGStoKsS5nFhTv1DkiZwLnlvHvhinobg77UzjLAc6N3iEtRhEsVKG\r\np4NFflIoTfVUrtzJvpfpVGpdlfd8Hp0GFa6WKGDgtUhLN7/pbmKxF/oCZE1B\r\nVhebUok98gI80eLhu31xM9qN9E72mJPnIJQLuQtc/q1ND3Z0WFgerKhugb4I\r\nDbTD327tAybNCJVyVz3WR//ElPF8iI7iax4EHaxuFqczIm197OqkyCNTgmR0\r\nEG42K3PPP55Obr7cmzDmJ61VHsPE9kQXcMv0IABf9pc+kGW7YLWqwSkpbCaw\r\npnWd2357bGglmO5KG7qIVpoD5d29BaBKD8o=\r\n=0JL4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"fc90fc875462421c1faa35862ac4bc436de8e75f","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.34","@storybook/csf":"0.0.2--canary.0899bb7.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.34","@storybook/router":"7.0.0-alpha.34","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.34","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.34","@storybook/components":"7.0.0-alpha.34","@storybook/core-events":"7.0.0-alpha.34","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.34","@storybook/channel-websocket":"7.0.0-alpha.34","@storybook/channel-postmessage":"7.0.0-alpha.34","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.34_1664249181637_0.3969720761469173","host":"s3://npm-registry-packages"}},"6.5.13-alpha.0":{"name":"@storybook/ui","version":"6.5.13-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.13-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"b2d3f44a4d346722ce6d789bf97afa0fcee2b2b7","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.13-alpha.0.tgz","fileCount":10,"integrity":"sha512-QuR96wxPSFr10yxLKJgeevWz67QKik+UUwZ91ubpFs427kt0QW1mb2+0xxPogR3D5t74mXZLIPP47Av+Tw7ISQ==","signatures":[{"sig":"MEUCIC2UKSfekAJCWfZlwvEcjexqUSRk2gkVcf2ruKAGwf8hAiEAlD32UwPBQfTB7qK8gQcTkLKO61xTfez2OAJbhCTthVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNDxQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQqxAAocUPBTBJDSR6hGrDLceba6xEiboNLL3Bo1uH6SwdrZ3gtoTU\r\nG84TaafaPmxGXaSd0uLaYGEkeu9TWhwSFj5EQGj3xWu4OChc79SaX1ely2iK\r\nrlFq1a4tYG0a6Y/N0QfxxyUA11zzrJF9IFfU/DNLfOKxBJONPqUjppNImSi5\r\noke9nx3ZXggyrVWYtRH3GiMIvNDmKNUb0rEBV4O1DyLNS2VgwH2WvPmGi3QG\r\nAmpyLFIAqZBriBeIogPDznDBroH6bPvrytpr/CJMVqAG889LauKmav/FT5lh\r\nRdMUQnTJsT8YOFKziyxGPznuNbIL8OdzqWRbrk1w/sHzCZKdvv6M5btAWu6Z\r\nKRDtj8JINqPQfttY424M4dOQIOPlnMFkdKdR0pha43mOcXXKER+6uibLMg5J\r\nF8gH5gR8V8rHEJKMsE6QoamGJfg8hwD6JjU5xhH1ZicRHK+bm/bLz3DzLWw/\r\ns3rGwJwUOgI6EFWByBosaKPsXFh84O02lQgth2F/gtNKo9J7gi6aoHUJALSr\r\nsUFepyqQGuzi9sF1f8lKBAyBVV52pOYE6WBvMvR+Cr+hKA9WKz6a5Bd6sp14\r\nnKXGO60laLGyqzIkaCGmFDD9eoZRyat7LlyDCN2gEV/F97CjYPO6Hvq2FPq+\r\nt3gCwG5T2jGHuE047XHl7k9o7uE2ljx/Q7k=\r\n=pYBa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1423ff5ed44da6f0bb3b7838c96f2ebe31cef05c","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.13-alpha.0","@storybook/addons":"6.5.13-alpha.0","@storybook/router":"6.5.13-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.13-alpha.0","@storybook/channels":"6.5.13-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.13-alpha.0","@storybook/core-events":"6.5.13-alpha.0","@storybook/client-logger":"6.5.13-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.13-alpha.0_1664367696654_0.3671752289145338","host":"s3://npm-registry-packages"}},"7.0.0-alpha.35":{"name":"@storybook/ui","version":"7.0.0-alpha.35","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.35","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ad75e7a17df5adedb5a554fe4579686fe88c3cc3","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.35.tgz","fileCount":27,"integrity":"sha512-NEH8X3rUncvZmtRnYtuHEVvAoZ6xR/g6vI54I8OG8lV7pAQd1aPFR6zPC+qQHKZjE1rP14jSjVnDnzK7QMLEBg==","signatures":[{"sig":"MEYCIQDkoY0wqf5lxBi0hhdFB00v8NuPbMfSIwY9dZ+lvai4awIhAJeqHBNOP3TrZa1TqBS/GeVfh1aI6C3lVE2bD5lj5ogm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5878860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPa6kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS1w/+K4xfyryCbFgErV6emwhIDFmVWmFnbi8EHEdH4WPv72s44TPz\r\nS5kcgnk4Vpep8z4sBQL6UiGsDrLcOdex3RblHbUSiU+Oi9B/YG37hzt3lJ2W\r\nKRjn293pRIc5J0DWwooEEwfVUqvevGOY/32lcgqimAzMZ6uwc6l0yDftqH2u\r\nEpbRG5k96LnkI34b2ZwW0Hy1ohoHiJzooudk4ycuGfWRRE0SSg1g5EMLbcpK\r\ngp3R2Qf3xF6ds7idXSLuPIcasF9l//ANwZGiVyzzo/LcB0L9R05iKI85i41D\r\nyw4MIcvJqfPR4s5GvlJ7woD7G539TU63lJXI7bRz07Pl6NINugkd/3pKkKrA\r\nKG3ldhjbPD1FOJIhJeWwLpecuMe0X8vXRSAxR45e35DzR6aZaxF5AVx7c4y7\r\nxungdEyJLy+iCnWELZOWEA4IyC62tEvp9ROpLINQ8nSU2mLrj0cb/YGLWyXI\r\nJiSlXpp+Ge9vAzmPCYAIQXZzLTktcmPONRfE9eK2qjxeM+s6DXIQ74UT1gPD\r\nVEl4iWOylG46arbiiXBKB9Lp87FfGWLnG+uXMPQP3ndPFs4oHUhmAUxDpDeE\r\n09hI1pxG8j1tPFpCInSNC5eWXmSLP7eYzUVMp3i4k9Vb9dp/UqJc+psfZrN8\r\nQB6UKZozJBaAMsR0WYyFq1plp0vcrs5lP3c=\r\n=fiep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"d8972df8c6c1c4716131a856751f5914acddaad1","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@storybook/api":"7.0.0-alpha.35","@storybook/csf":"0.0.2--canary.0899bb7.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.35","@storybook/router":"7.0.0-alpha.35","@storybook/semver":"^7.3.2","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.35","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.35","@storybook/components":"7.0.0-alpha.35","@storybook/core-events":"7.0.0-alpha.35","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.35","@storybook/channel-websocket":"7.0.0-alpha.35","@storybook/channel-postmessage":"7.0.0-alpha.35","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.35_1664986787996_0.2933528185351004","host":"s3://npm-registry-packages"}},"7.0.0-alpha.36":{"name":"@storybook/ui","version":"7.0.0-alpha.36","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.36","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9174c0c32d1a4209cd15a28d18323fd3dabb0e76","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.36.tgz","fileCount":27,"integrity":"sha512-EftUTjJtl+Hz67DCrFrVZQmojUQeWcyH2TkMLX8CnYbvdJzuXxrMFbJBA2E9XuSKODBhJXxEhzCh3kCrMEISmQ==","signatures":[{"sig":"MEUCIF0370MImE5FFeB8KN+x11sI8fMEzF+SZlwArTb9U2IOAiEApuFVs5iOLNKSzvLMfUJTIo71IIWkGhNtPk4rmmVYvY8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5697204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRxLSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqW3A//VTA4OtqomnmQivrjHlKLLSt+fL/NzKJzgOHZ7aMXdJQghbmk\r\nJNUq7J+OJ0A3QjRy584CCNGahb3H2o98taP+uIF8tBU9xOslQdi8LSfR/q+h\r\nj1t2CSYhEmkWCnCiGUX+TJMpjGKN9D8HaEPZ8TEW8NU8HtTq3boHBxfOMR0z\r\nahVnWag0ldlfhLhTgkh3q9G0ge0K4xScO3dTsaV36a/GtmSmpNO8zs1ejG04\r\nMcESq2Ls7XG/YC5XnzCrNYpHfy5arxw4pVal7cKUkCrfW2aLiPrJ86dDfP7p\r\nVw47klvS+wTOsMNaFaqT6yTwcWpJ0170NHB4JEPDYnL/FbaKgMVfZpbUz7no\r\nRoDSPJ0lzY0mhagl9o29jJQ9IoQwHCiYFQXdWz5DVlnkRS07aVeBXPrphlGG\r\nsFUsuA2Op7Zvz8uaeVKy3U6ZW1v6QLRUBGxEnac1i4C1fZvq73KGPPuz5KUq\r\n2pvykwkiBxr5jgcD0iuoT+KVhNujbvyiaV/pM46TSNx83O9e5LwY3aivaUQJ\r\nNokE+rDh+zH+c8GSFozOuFB1oNj0byoA/QLEXm7eCuOoEX3b3Ru9FRHQc4Gt\r\nb+Q5FscV3Z+hucm8y0XXMulaBQgGka1mGJUzgjt+YhISykGkBu4lAPHclw+K\r\no1LCTyKbrz0iAWBM6q/UFerXwSIUsaZNVZw=\r\n=PVyn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c7cab45bef4e7c1e7e4f41244e2580a082c8841e","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.36","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.36","@storybook/router":"7.0.0-alpha.36","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.36","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.36","@storybook/components":"7.0.0-alpha.36","@storybook/core-events":"7.0.0-alpha.36","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.36","@storybook/channel-websocket":"7.0.0-alpha.36","@storybook/channel-postmessage":"7.0.0-alpha.36","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.36_1665602258231_0.3099878997227523","host":"s3://npm-registry-packages"}},"7.0.0-alpha.37":{"name":"@storybook/ui","version":"7.0.0-alpha.37","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.37","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"830416d4a266bc0413377de92dd46b3ecbccd370","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.37.tgz","fileCount":27,"integrity":"sha512-idznEXsoV3e1Q+7YcKv1EjKSNDkOKwNO5nCpy93MnFSIovosJRFS89aaPuRnHPVYuLtMdiVCQBCEco+c1nHMjw==","signatures":[{"sig":"MEYCIQDUDtENz0jFVafEfogS3JEDCNIg39D8RZIt+GbcVVLaKgIhAJW7FkRDzcTC12VHWopb+lB6mhKSor3YoGsAK8XLWKiC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5697204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRxbEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmox8Q/+OS0curdtdeCrHHLCnwmtNA20osWWaFnw+ooubx1Vxb8frsnm\r\nPdT6OmR0xD7mSJRSSicm+3zRUiw8mR0lG02lEgd7qt1KqnAweZhbv+Cwgw8p\r\nd3LP2WCdnmO8oaEzjx9/iFDvO+mIyoXnmGvzA1w+JYcKiYPo/l96AeKgPijq\r\ni0gE8bzb2U+LWXJ9o+3bQOg+zD1O1Kt/+aHr7+f+Ou0V8sG9aZWuRluNANEl\r\nXYbRNfN4o5UWB0+7nu7OIss/pB3kQEdwmpFQNI/BFrd9tbGFcwokYsaWDzY6\r\njErckFXQCiRWcuFwrzAxBaXVHqD6wCUvmTWT3dulvcUBL2NnIV3tcXj+pGAE\r\nfM8qaTsfxbUpvnSs+mDHL2Buib9vTH3m15tfpYS7PURVdSaL2To1/U/BZx1B\r\nj9zqXvpmOug/H0z1toKwhAAEwjEYnGoSiNFnyFHJ8a/Ga2QGceiOkIMHUJMi\r\nz+hqWzDkzg0tuaYN8Avfwl5n7OWmJwE7MM04XOgBEQPxLxrKii+slssHif1n\r\nRYsVCWSl40G1Y9blW9NXtyojJCMytZy4PXSnYH8zo5tVhMsgJNsX6T6hXJ27\r\nElcrVtXablUWMzE5QP53JzABhorBjYokSMuR/q3GOLY376/ggU08BFTkbgBc\r\nfMdIkck3TCLS55QwFsdp0VZHFgmytlk0GBM=\r\n=+7Km\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"82667a655108283aafc828427f00bb3590a334e5","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.37","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.37","@storybook/router":"7.0.0-alpha.37","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.37","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.37","@storybook/components":"7.0.0-alpha.37","@storybook/core-events":"7.0.0-alpha.37","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.37","@storybook/channel-websocket":"7.0.0-alpha.37","@storybook/channel-postmessage":"7.0.0-alpha.37","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.37_1665603268156_0.6917733827418613","host":"s3://npm-registry-packages"}},"7.0.0-alpha.38":{"name":"@storybook/ui","version":"7.0.0-alpha.38","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.38","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"9729526bc4a095230e47d82ad1b59d8ea4f7f54b","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.38.tgz","fileCount":27,"integrity":"sha512-ZGoAmDuSjEAbAnw+OlqAC8wKC6BjzMs0sohrp4Dk2gYyULX0+zJ1U3G3IKIOicZSqanIzvITLrnEefCT0+tXIA==","signatures":[{"sig":"MEYCIQCqmwArTmrrrGr7iDvCM67KpPCckUnOKn+Kx2vuhaNiGQIhAKjrD0c1oCQLtmgsm9ZusQqNVfnivovntvfwOEn6ro2o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5696068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSiApACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhPQ/+K+nuWEJdU1P/u7LvwNGv3IeZeVaNJKcy7igljJfWdl38qhpv\r\nb7rWgDnaCO23mbWkQ4WIg+C1sjxeQWmGLNIJCSX5PKjuzKY1ocUouhCTqvz7\r\no2jnPsnVBWQUXfcfI80VaLWIXE5pf9mpmznBX+ltkOn3Gar3SKx7JQ98pkBA\r\nZnACnuy4pcIxpbmhxN3FC1tHaraaqjnzHdvsM+XeMUAF+awfRVhMu7GeiSKN\r\nvmEhaS/5MFUbAG22v7mn974kuaA5qqQ3nV7lOCA5W+9164kkDqkqu/uH1A5H\r\nVl6xzkkLuvgyo7uGT2PX54dXmlcrFu9IsfwhnTguHN3QKqVsZbYZHNTLBGTo\r\nAH6ZjaIquNI0fPHoDPI2OCMPPfwh7jsHqGMTP0bMzD0TwUqDqFE62QgVogQn\r\nx9oiHBohsntTNEAeF1ghm5OhjPL5X6WsT1LPMmJ58+FguhSGXzQ7lUJCQpsa\r\nOyijPXT+HtIWKQ6MC1C2iKOrezwANi3t8Hlb1R1zpO9Mofio+onpPliMirQX\r\nhcGzFMNFsKra3DfJL42itnpXZfEkNPV2JCFcNkVJqUQ6YYd9c9mRd7IPU30w\r\nomJq0OJsHeARjsykSKnbua5LAoaJKx/QdGwvm785prisPiUbpJbaPfvoAoho\r\nzk9ifSQ+cEieh4y+DzKyQ95rA6FbrwD/J70=\r\n=IMF5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"438114fcf62a763f0e8c07e2c34890dd987ca431","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.38","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.38","@storybook/router":"7.0.0-alpha.38","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.38","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.38","@storybook/components":"7.0.0-alpha.38","@storybook/core-events":"7.0.0-alpha.38","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.38","@storybook/channel-websocket":"7.0.0-alpha.38","@storybook/channel-postmessage":"7.0.0-alpha.38","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.38_1665802281429_0.09162767039138009","host":"s3://npm-registry-packages"}},"7.0.0-alpha.39":{"name":"@storybook/ui","version":"7.0.0-alpha.39","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.39","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f895e0b3143a8dc3b7046f56664888cd452158e1","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.39.tgz","fileCount":27,"integrity":"sha512-wSu3MnPtHCrjNlxJwQ4tnaH+B+hkqT9McD6XrJQXLPbhLCAGjbyCz0UuGrDCKIMZB/LBCHofjpG66rriN5perA==","signatures":[{"sig":"MEQCIDwY2YVWm6X593fXdUA4TEoYe6CWk8Zs/PTHgsVyPOVJAiBUMta8wS11qp8NOxI0yB00A1SisvU//UtPlwMJ6jCfZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5696121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTtB4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMEw/9FdjAxiYZIiL7xKu6OuYJ/v4x0G1m6Pu/UQs57wZRXC8kxshp\r\nNB25PXb/2KZD/emMXkrCHawySNbshQbCSEd4aPaCUDZgBYGjTmX+fpKqtvIz\r\npCNIR0XGYb/0FUJdjF4Rkxcj8LXHoHMF6PkzMX+uABpF2oea3LZCHClM/0SH\r\ndkbCzn9V5Dd56wi254q54WWp3jLp+hGNSy3qUnArzoKKnwu5JIBucKd4Mzky\r\nIgoPkmbKxZAT+CipyP1/vHCLqBFcO9tvHELUz2YQgHGzC3maAKDbj+KBzaYw\r\nf/0zilj2iEA5UgohIv36P8UqcxIFGcWzjw8XfMcMRx+8w2dVZ8cz9LzN1pk0\r\nTVDXsCHoEYNeh4TpCT4f9UW0CAROB9WWnx5e6u+Wj+XEpjdEF/NEc/3aWqQt\r\n6Q+M5f+q5uSdRaHBY7O/tPXfC9KGL6O3lkzqNxGYQSriIZ7Ql3DE2JR1BXup\r\nW5pnbi5veb6IxND5fNLoEMjgk7sdBtZqohFyhyiEBYzH1/WuQdFaeXfv5ffU\r\nF0F9iWBLXLRgg8PRPqYrWxxZ1EpRjHk4Q/SKqK6w9rzQmV1Sv4HKvGec7+NH\r\nhPyNZ8CcKX4wOe3uMkJrjh6VcaU4ATA+CbUQ6lPhD9cZ6NA0gcw1R47kzx6K\r\noJiiogPKDoJiSozq1aHKrFzmD3gjRkwKP8o=\r\n=ZBxD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"47386bd49d141ea70daac41ab3e4d52749fc5da9","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.39","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.39","@storybook/router":"7.0.0-alpha.39","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.39","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.39","@storybook/components":"7.0.0-alpha.39","@storybook/core-events":"7.0.0-alpha.39","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.39","@storybook/channel-websocket":"7.0.0-alpha.39","@storybook/channel-postmessage":"7.0.0-alpha.39","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.39_1666109560266_0.3719523697417779","host":"s3://npm-registry-packages"}},"7.0.0-alpha.40":{"name":"@storybook/ui","version":"7.0.0-alpha.40","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.40","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ee3044c9ed20b0a40614843ca10bc355e34f1478","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.40.tgz","fileCount":27,"integrity":"sha512-IwfeaVec+rxtMuVnYe8sOHf0D5J3Q21oy8rmq+82yMoWwmmvj907dVHR7orlcOrKgnef5huhtXr9bQaj54tpDA==","signatures":[{"sig":"MEYCIQCiDx36igFHdxTRpd1ZslR1PufCvuSsfGfrNgEQkPtrjwIhAJPU8jB6eaOssXen7fWXyCM2FiNqqzwnpEg7MulS9CuO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5688848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUEDKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDiQ//f6cvNVUw5QCr587GYZfefBpdkMXW8n92SfwJwUGcFJtYx7u3\r\n3moYhMbY0b9lALF+4f52dh1qApQ0mqPefd4LaHlOdam2b3tIbKt57B8veivD\r\nDopqOzDkBVgcpIro+XA6rWJYqJ+uyofP043yA/ZaOdCbp7ZRKIwFGyKdlf0s\r\nOMa4d+DDXEbfYWLUTwWltvTtQnflmXx/o0Fr+PHVrAib84EClD46dehl1K3C\r\ntw5IEJqkYhrJSiWkfSUyGEWym30nX4rieAFnPsysW5MeUDjhoyTL0E8uXpn/\r\nS7YVu87X3J9zzpNXBD3qikyuLjqJAxrt8fg/OycKjv/y9bvxUeIy83W3v5ft\r\nhxPBGKxShZsv3GW8StWNEupM5cz2q9L43OaOoS2wCsyuzZ0B+m2F8ufOzSXb\r\nPaRZvoDKbkoYKUBUL0Z6m+t+Mrd0nKCX7zVE3/T2xOp5NxgGE7qf2EZimAw4\r\nFbYGSZmVBYLUDYehA+TTk3ypFXQsqhO8OfO/0JCjhzKChEHXg0kxo+OFuGVY\r\n0dpZTCQoU8+6v7AsrZA3BIeU2g+mv+skJdOOmELV6JqPhjZihWIjFLskaK0F\r\nmONr/ztXA6PJ0qqY0eBRxfzYi9ggwOlpECKomS2EZR58gm255UWsXqaezv8a\r\nVOEy/yPZhdKpedT4R2A0TX2ycDZORZoVpq4=\r\n=hsSS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"8f6d8629f1ad7e776c39e2c7621f4a0d538aa93c","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.40","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.40","@storybook/router":"7.0.0-alpha.40","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.40","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.40","@storybook/components":"7.0.0-alpha.40","@storybook/core-events":"7.0.0-alpha.40","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.40","@storybook/channel-websocket":"7.0.0-alpha.40","@storybook/channel-postmessage":"7.0.0-alpha.40","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.40_1666203850657_0.11491090535048287","host":"s3://npm-registry-packages"}},"7.0.0-alpha.41":{"name":"@storybook/ui","version":"7.0.0-alpha.41","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.41","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"041f1385ee87b8d4367395370324788ba0c95cff","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.41.tgz","fileCount":27,"integrity":"sha512-dpzB+1sOllaaRgo6+/iA5OJqdgnspivIX3IwoIFsj6QKMIhM987OEh4AuXLYMx4z7zNmZY/Fn0sJWfWMiLfDRA==","signatures":[{"sig":"MEUCIQDKaejfnhgUNMd2MTVZR/JXMYEUzGERurYdYOoDbMu6wwIgb/gYQ9DZosO9oyIDIDIY06dXDyo2mMcnaenE6H4oV3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5688848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUr3jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKKBAAl4cmYDuKKi0NFYKPh5zz1s4PqjfhkbnHMGUfbPPyvFoCGzJK\r\nDZH6k7IBiyvYdD5M2AJntl6Ddk2EoxmjjHN3vWtULSc3p+HV+t2raOHzuuxf\r\n4Py0M0E/L0orzsXZWDe+Q9ISxOtwzjYFQSE15cXHf6LCuqVwqWi+F88pqJIb\r\ngyiSRSUOBkNCufGtqicazv+kemCJcV7zuyilys6HipJ/Cu79/HTKNotIAChS\r\nrJCTuHeYBWCbswoHeNQRxJHJmmPZHTDcjrfMBgJo/zwtoP3K/Xb4kYWM6yiY\r\nfDOMVlw4zSjeBfjmdUltbe7BtdKoBSsXD+APFrPZQ7tWpx+natoXWapNk6W+\r\nKVth9C8Cy0zTWGTVt1bxSaLMSscPk3+C6JGCVOnGxikK/F4a/3bYGbb8/mqs\r\nGKaCDdI4O685UyINq45S3DoJh5vZPokF5hBHZFJr3YW8h+NOjsNFT6FQ7EJI\r\n8IfPCm0N4oj3QEkPAtmS6LCcCUF+AVrbqjr7MYfJKdmPtXuFNjdOew43y5ot\r\nofG8or8MgaY13/zHUB2GZ52nsHj+SA2Yelg7nAmzEB+Wq02JDCU82SKxw53J\r\nga2iYPJpt6HsFbX8xmsySSbCwdM+syqmB7Y+lhFV6Rq0IJQcIXTkHAF4CVev\r\nCrsr6bhvrkJk5mJJqIqojEA3S37HQ+0AHpY=\r\n=W6nt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7ec6f916eb875bd2e3cf3aa6b1afcd1fe25d1637","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"16.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.41","@storybook/csf":"0.0.2--canary.49.258942b.0","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.41","@storybook/router":"7.0.0-alpha.41","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.41","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.41","@storybook/components":"7.0.0-alpha.41","@storybook/core-events":"7.0.0-alpha.41","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.41","@storybook/channel-websocket":"7.0.0-alpha.41","@storybook/channel-postmessage":"7.0.0-alpha.41","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.41_1666366947065_0.5544877345790644","host":"s3://npm-registry-packages"}},"6.5.13-alpha.1":{"name":"@storybook/ui","version":"6.5.13-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.13-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8e2f5f0a60776559e0924561e49cfeec69cbe84d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.13-alpha.1.tgz","fileCount":10,"integrity":"sha512-Newm9qyrnDn2zrlenAwPAcPFDu5Z8UPguioh2HgU1EHdMforYk4TWhL5xVwgoWRv1H31PZKIgLnNLjsMuFZhwQ==","signatures":[{"sig":"MEQCIBkPI6tu4ljCFPU1DH6akL7uBXAAwwfhd048kYq5/j08AiAkcT0CY79XB26j+6CsNL1XiLQwhM5NwJxFWRVARrk0Eg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVgmIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoL8g//TF1fRyu2cOB4Js6ChMBYjsRntSYt1rswf0j1ECuSXdW8UgfS\r\n5dFCTYUH7X0Vs7H/P8Deka+cbVpDG2xDrD7RZjyaQSxrDcagUtWvfVUoREmI\r\ndDXNs/tnzBuotbrO3YpvFDsJKsE7Mqdw5/uLvI9+TQ/W5alBsz3SgFiEHtVi\r\nUSzUjPrBYMbX9Rpta3khau3x5mh5KhGJAnaZD4O9X+X2DUXiBvP+XxCno2PK\r\nVg0kZugj7zeboKTvoAU6rFvm0E3K0JiRwhBuSbpOAoXgfAbSrAR3WMVj7mJN\r\nYgRzizVrl+7T+MR0YngjTjNyO8fj8xSr/lL/5lmP6iYkT3ea4H89YPLqN9LB\r\nde8ci6BPz+EAXu+o1M8DcF7/7H5mFsQ4ysJ8wQe5HUBLC7KIjMFhh5RmHtOj\r\n8q2//08uSdS97jw5TyAKIBut2W4TIpDDZYGPo+mK4VC04pGZD2CWWeIxkZQn\r\nYW2kCWYwxr2+fU1VLMx1Y2DaTVVy8OcYrvGD+L3q5t1KeOx7G/0VSOWeOCzC\r\nkCEckuhDy8bRBJPYM7gPYoq/By3mt7Yd4RqHacNJLu6SOZfhFoF0ZDDEJM+H\r\n5MSUstHAzGPqgXe/BY4xZzWkcU0Q5UK8Xoe3lfSO8xwvIjMlx2eRXQAPnF2A\r\nXXAWUB/XERnBJSk0oZJohIyO/lufO9RUrq8=\r\n=qWIU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"03f5ebeedfa0027ceeb18c0991ddf47e1ffa6651","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.13-alpha.1","@storybook/addons":"6.5.13-alpha.1","@storybook/router":"6.5.13-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.13-alpha.1","@storybook/channels":"6.5.13-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.13-alpha.1","@storybook/core-events":"6.5.13-alpha.1","@storybook/client-logger":"6.5.13-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.13-alpha.1_1666582920028_0.7723392791665347","host":"s3://npm-registry-packages"}},"6.5.13":{"name":"@storybook/ui","version":"6.5.13","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.13","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"16b25fd839cdafc2b9989c548bc1ffb711b33dee","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.13.tgz","fileCount":10,"integrity":"sha512-MklJuSg4Bc+MWjwhZVmZhJaucaeEBUMMa2V9oRWbIgZOdRHqdW72S2vCbaarDAYfBQdnfaoq1GkSQiw+EnWOzA==","signatures":[{"sig":"MEQCIBL+QUveqQM9ll438jYTy/EAL3N8Xfp9/nZx9LhWa7djAiBQny39KYirgrYo+zieX4MaDtEz8km0zBQrLOetLtFuJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVg6MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOpQ/+K5fbN03tXvQQQ2wcWnT4bJpD95WMf07CSqRHUFnJORKcHf8G\r\nuxtsAW6Dy+Ufjz9845HY6FEk09RZ3ws5tuz9mUmLnmu9wf3SnZs/ywE/PyQf\r\nMKYOwBW03GxhBQH36rwJYvB9QVFcHXElrE1ye42D2MtowJ/F/bbNUJ1LWx+w\r\njGjtEWjhV207/aDd21Epsk3+hvykfM++tQhnFU4+2Nu2HuQPys2ocN4Kf2j2\r\neSOZDCG6NK1ge5bPSoI6KPEkO5jfeesIltMK32zOMOIvmEi7BfcVPX/85nlk\r\nhzwOu19eRxlJs0utDEk1l5qHxW4IHUKebpW45LgY+vzSEiKgFq5uy1o0xL2V\r\nVQV3/ueDDy8ptzv7pa00nJ/gbDrBvhg05qtP3ONgxHjLRLDoI/cUws/kjy8z\r\nNhsxDyr9cikeotGQIQc48shC+B11WH8lBffE8OBNaYryWAOXru7agURSCks2\r\nHtjPUsSLAR4CfZpWRhl03qLtyL5ZPeoH+ku+j4R2HDIDx4nBfGi5Kvt81iu2\r\nvt4kksHEDj5T6mWFglIV01/dMCVdISojXHStJSNV7LviHoBUiFKgcNtXSZSA\r\nxHTTo/nXjXM5lpHb10ynLFnhrGxFj7yAKL77ynnGcHhKpuk3Se+9GXBp4wU2\r\nhRP4oF9CeZPEcWDw6smF/HJrV/UsXGaDDsk=\r\n=jFUW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"9bc627d9b364d2ea915470dfd08cfe5cb3716dee","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.13","@storybook/addons":"6.5.13","@storybook/router":"6.5.13","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.13","@storybook/channels":"6.5.13","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.13","@storybook/core-events":"6.5.13","@storybook/client-logger":"6.5.13"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.13_1666584204250_0.5865354923567614","host":"s3://npm-registry-packages"}},"7.0.0-alpha.42":{"name":"@storybook/ui","version":"7.0.0-alpha.42","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.42","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"777196c55b0b140e799024463c7ef1aecd6c2d76","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.42.tgz","fileCount":27,"integrity":"sha512-4Gz8GkCc5x6QrYhLhp6jeFWOYgZ9ANirWKHXdWWWIGfXtmzaaVmQo17nqiauMSOtV7nCw2eGdhTk8dypzeYYJA==","signatures":[{"sig":"MEUCIFdo3NUt41+ScEbwDRcbII4hkOI4mJRBVj1C4Yd+OAUAAiEAzc/Cjq+ZQk0gKK8ef5ULvDMzurmj9ADukzWN+L+t1kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5678420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVhI7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgvQ//diNPB6R8e3MOYnTgkfX0b+WKMzQAN9qo+ue3ckwC3W099Pyt\r\ntCaQtjzruoD618668XTlqm+ePTC/KLb3RhOSp1zfSCSVvrReVYrLXgEyxygY\r\nSH1dZGiBAZDnxHMhct4ObOQW90gbBOCg2LHoAiD03PWxXr4UsNBg7lY8Fbos\r\nPXSCnWqhbVIA1t8j6otYLpAzqztQ/JzGDc6BjUDC0L9ygEvwYe3pqTMsLm4t\r\nj1si96uc2PyQr9DeIVJ6vn2HBuuvv5KpdvQ+RsssOrURmPp7Ph6UPS1ekJji\r\nEmo56T3Ll4+bKebpOL3G6ANchsi41L7lvSvFDLYiKla9zm62u7yvRZgyhWlR\r\nrNMjDkD+VBKWL87/TobUJRmW8yb6jCB+mHox6FX4jeT+ZnObUVj+dQWwthrT\r\nRlY1GDlzRO/ddwzeXgBEO2Mc6aDW6g/vNEAoaD0X7+bngH4cCiBn7Sq2R5j+\r\nfDyY7AI881o87+vVsFzsJU41K/Ol2NnBxYdPMijfX19FeriZ0GuvRQUW+IPs\r\nGCpoL33FXF7Zul+BQvNTGCeckdC1nLLN0AzHstaQUmZ308hIfTs4aqTRWJl2\r\nmO3PqQXsYq4PHgZ2Moeq3NPTWv4v/+C34BuyGf9wKQPawVanHEuq2Cy9q4Eh\r\nA5lBM0DCSmrm9gDEJC8GAWHtX1ijghZ+Sq0=\r\n=DhaQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"4ed2e832e3accf8e533da92a46a812eacaf5db0b","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"16.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.42","@storybook/csf":"next","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.42","@storybook/router":"7.0.0-alpha.42","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.42","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.42","@storybook/components":"7.0.0-alpha.42","@storybook/core-events":"7.0.0-alpha.42","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.42","@storybook/channel-websocket":"7.0.0-alpha.42","@storybook/channel-postmessage":"7.0.0-alpha.42","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.42_1666585146781_0.7402969668562436","host":"s3://npm-registry-packages"}},"7.0.0-alpha.43":{"name":"@storybook/ui","version":"7.0.0-alpha.43","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@7.0.0-alpha.43","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/code/ui/manager","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"ffe07d30570fe3e8e2193a31c07cef758cc0ff00","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-7.0.0-alpha.43.tgz","fileCount":27,"integrity":"sha512-PI0y55gSdMGndJ5GHPwX49C08DncrQhv7c9Uk7PjoGXOaXacc0aMBqFEmV31KGR6ogWK2PIsHDakrqW6nzbK8w==","signatures":[{"sig":"MEQCIE779/Bj1mGNd25KlLL1YCQ1be4zFP5STuVtW8oNq+CmAiBrO89O0PzWixdQKJsRiza1HuBrURWCrvBn9bKyNX5Vxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5506973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV9JFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJKQ//cTIR7jdXEA2IXZmdgxKge+Z6vcOxOOUkVEMIDxmTWCY8OQ81\r\noK5SKfYElihMbGpD1tezpyZtvNnya/yqIa4ZhfcXkHNABZgDdm6QnuZNCLWm\r\nbkAwD9Bbi4JLKJR482rMTOaisbb5qMWh+5dqCbaJZCzvOpKPOOL+5vr+xDlJ\r\n1+v+OgJGYfcXm28lAcG+fPcLHA0MTgBriZn6kwpy3Hrn0GnC5oqHKLeBL0dJ\r\nHSP950hFcn7NxjQ4vNUqMXpV/xNKnPdiNmHlMGozbT72tWHqOOqsqEKsonNh\r\nI6Cuh5nNWQKmE9rBvD1aNlnTmMtb5ZWhCUuZRLMujsqSWsvJwcrpILXCzeSk\r\nye5iSpVTkRg2KKOWP/lmfMhFpsFEtsuJ5qXykE9vCnwH+H+09+ilLfMskfKz\r\nekYPxnnYfhlCgybdTOWZPDkVK5gW8u9NpaKLgpdeNZ55PaVvpA1Qoiq527Tl\r\nCIMX8FYwUrbNKvX2hYGTi90mv1piEnHc4WKhEnCVp/Q3Ghpz6h/R9ky9GiEa\r\nY+RQKMafeGH5ZbObqJZ/8aoXSg1IfKdtjApiOHj3RQ8LW0l8YaQwY9KEl233\r\nghnP9FMO/+neRCZQV7bd8WaWAqCFaovw56+hLqG/tcFw0fzNdcPWOJ0F9p3g\r\nQAFgprZUj/tXgiWZ4Ma0QHOXhyx3Xdm52Dk=\r\n=nJlS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport { renderStorybookUI } from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","bundler":{"pre":"./scripts/generate-exports-file.ts","entries":["./src/index.tsx","./src/globals.ts","./src/runtime.ts"]},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./paths":"./paths.js","./dist/globals":{"types":"./dist/globals.d.ts","import":"./dist/globals.mjs","require":"./dist/globals.js"},"./dist/runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.mjs","require":"./dist/runtime.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f801c26f7bdcbfeeeca6706c0854d130bfb2f38b","scripts":{"prep":"../../../scripts/prepare/bundle.ts","check":"../../../scripts/node_modules/.bin/tsc --noEmit"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"code/ui/manager"},"_npmVersion":"lerna/3.22.1/node@v16.16.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"_nodeVersion":"16.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.10.0","react":"^16.8.0","enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","semver":"^7.3.7","store2":"^2.12.0","fuse.js":"^3.6.1","shelljs":"^0.8.5","fs-extra":"^9.0.1","polished":"^4.2.2","downshift":"^6.0.15","react-dom":"^16.8.0","ts-dedent":"^2.0.0","typescript":"~4.6.3","memoizerific":"^1.11.3","react-sizeme":"^3.0.1","resolve-from":"^5.0.0","@types/semver":"^7.3.4","@storybook/api":"7.0.0-alpha.43","@storybook/csf":"next","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","@storybook/addons":"7.0.0-alpha.43","@storybook/router":"7.0.0-alpha.43","copy-to-clipboard":"^3.3.1","@storybook/theming":"7.0.0-alpha.43","react-helmet-async":"^1.0.7","@storybook/channels":"7.0.0-alpha.43","@storybook/components":"7.0.0-alpha.43","@storybook/core-events":"7.0.0-alpha.43","@testing-library/react":"^11.2.2","@storybook/client-logger":"7.0.0-alpha.43","@storybook/channel-websocket":"7.0.0-alpha.43","@storybook/channel-postmessage":"7.0.0-alpha.43","@fal-works/esbuild-plugin-global-externals":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ui_7.0.0-alpha.43_1666699844898_0.3861914850756205","host":"s3://npm-registry-packages"}},"6.5.14-alpha.0":{"name":"@storybook/ui","version":"6.5.14-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.14-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2467000d90e93b54ab27640c7db87a6875696cef","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.14-alpha.0.tgz","fileCount":10,"integrity":"sha512-TOJIhNgLupudPRz6ta7YAXXlyHbFNkCp1zXDJY7mU6m4DK1C3kEDxWvcyxh/FG4q57/vW/Qu+llMxBtDw/csdA==","signatures":[{"sig":"MEUCIQDK56DItIvNf4urSuMiMiotI9AZq+ltmT2ds67n2QrJrQIgIHj85NwBc1K1NKhGKkR1rJnA9NThALDs3iEW2SHAOA8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeFh9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOtQ/+OjkB4hHyGwMganTULKskrMKih6Jvp4YlysT+xz01hATgvkMm\r\nfqPVzpHXCz1LJECwYFW59iLoN4pMLQu4edm+rJ+r6ZmX7riFXL5OSg53jzl/\r\noyF9cLjexqpbZS7zyAA4r68KEyUkIfn89//xLEqEx2gbx5iIsjbrRxCTXjOl\r\nuL+AROW2fl2GXaHZu1YhjbAeUJyLJG5PfviND96dmCgOWlaj5RalwL8sQ0g7\r\ndYLF8+YB6UveCUZTX9zIJtQF2D9G6BN0zKhEZ34DXvFelPguorHuaW9J/uFO\r\n25Fio6v9/mobzUrTlw1HMEzKSNiHhg4t1JOyLmhh6dbUk/mZfR/wIK/Botmm\r\nsawCfFzL+Qj2vTju4OCVQAazjnMeQkNucNxoDyZAuSi+tniQcKTWhYX+vzad\r\nzWF3iA7UFSKbpEwhtjYxqUzfNkr71tvF59iRrC65mwCzxFihZD/BVXr5x3Hh\r\nLuJuqCRi1SOn1OANmmVgXonoVTwE4DLcU3yDlvHxbYcd6qjID7eTs3fOa7EJ\r\nq6nsbt1GZZ83WTAbn99NNUyiy5xthZaFA101Cns73II0klckvxcEF11oCa3F\r\nB3QCnLaGMpmq0BvuXRje0fGpeTZJJ9t4NopP1OH4jKV0XpEigf0Lcg2vQRf6\r\njfSILTjWGuw4G/BlZXsST0PBC5uJp/55nMU=\r\n=beeP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"c4e122aed592304807cb5a13ca08c52fca8eab3d","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.14-alpha.0","@storybook/addons":"6.5.14-alpha.0","@storybook/router":"6.5.14-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.14-alpha.0","@storybook/channels":"6.5.14-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.14-alpha.0","@storybook/core-events":"6.5.14-alpha.0","@storybook/client-logger":"6.5.14-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.14-alpha.0_1668831357157_0.1451951026897067","host":"s3://npm-registry-packages"}},"6.5.14-alpha.1":{"name":"@storybook/ui","version":"6.5.14-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.14-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"671c9044da786eb6e434a9a8d68d3bf2a95d1f7c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.14-alpha.1.tgz","fileCount":10,"integrity":"sha512-elSQtjvyOFdH5rzBgaeXu+Pti+MB9R+c0llcfPN5Obp7ORT9bInojbL36cosMxfu5iynpefQ/VYfgVzp0WdwKQ==","signatures":[{"sig":"MEYCIQDACcZvXJlwBlxI1s1JI8Mu2T72MTPtG1+QA8k8m5/K9gIhAORBE7HKE7tfEnNgHV/S34MZpAM/agFT1Jd1pOoDamRm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjg3s3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKfA//fmO7X3daPJD6R/KkeTMaZ+Fpv+rbcP7erNi0EaCtFq4WxhaQ\r\ncGl48C9IDy95UblRIFYZq7733cI3UgdiF0cycHsvWNo5FJ1QYk+D0D90p0Uj\r\nskmNzezWBSIHjiUXpBf5A9zlWaIjjvxcqc6iMreCBkDnqwLAPCikSfg8z6Is\r\n1nQJRNwG9H0HWBP31v9dH/Sl2jcAJcS/cYNfXEHvLTVNKycfXJJvCXXQ2U3M\r\nK8puIqCNeB8BXX5b8+xPvsq3EHjFNdAa9+//ZY4HOoZPX9vhc+d8IDh/Yxd0\r\nb4iLR6Mjkcc6+7LD/2bVXYvfCuKgsRnNf4v3D3D1OYOWFv7ldx5rek/IE2NG\r\nIF20+TblQ0cIM5cjx+y6SvAxphbjVtBQzdHbL2xa8RRvbuLUs2Ia6Jmbi2eT\r\nUb840KdGHfGj8i7gN5v0aKVBp1RrEn0Zz3IgMIDBz6eIGbcI5c2cS1Psz9nv\r\nQ3JiilOhzU8hL0cr5ullcrFC1ZA4RRj56EK4tLgHIf2f2Fi+NfKUy00DArQg\r\n2ADLUr/YgBkFCu6LNla6qCSKazLZRH5oLIJkTD2MKKqhO18YAs43rg8e5UG4\r\nATLWk/Uop6PXHzCPX/bWDay8kZVkMgcj8VigqWhywYzXK6t75isTcIIgzI7O\r\nhTwoghiaaxBo2rQp7yDi0TsKGQIjSdeZr/w=\r\n=KQ7Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"16dfcaa06913126a0fd6f13e14caf8180b4ecb7f","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v14.20.0+x64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.14-alpha.1","@storybook/addons":"6.5.14-alpha.1","@storybook/router":"6.5.14-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.14-alpha.1","@storybook/channels":"6.5.14-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.14-alpha.1","@storybook/core-events":"6.5.14-alpha.1","@storybook/client-logger":"6.5.14-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.14-alpha.1_1669561142934_0.9208896742577575","host":"s3://npm-registry-packages"}},"6.5.14-alpha.2":{"name":"@storybook/ui","version":"6.5.14-alpha.2","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.14-alpha.2","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"f8caa7c75bc76612a3fcce833daecfe4488b2465","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.14-alpha.2.tgz","fileCount":10,"integrity":"sha512-b7sJww8povEQvSJxFLxdKvDnNTQsTaUHJwm928+nngHdc9KMErA1mpJEBX2PujES6N4R/u75yVQweV/8DNtrJw==","signatures":[{"sig":"MEUCIDAc01U4/2RPpUi3Ly+rCES9OPcBWXXAtx3NxX8VcW1vAiEAme0yV2yASgEToWUS5oFIN4JFZy9skiC7BFmZ3CCGLnM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiNbCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNGQ//W/UesPlLD1y+snOx/oL4IbjjZtFbz6XiXePcTMXXhhHq8ZCE\r\n4ECQ2O0UJZbeAeAhP9179s7wqoDKWwjlpj/7XF/lSpfsIGGZzYzALsEEmoBW\r\n8jJH8foW1l5QuJJTgrF9uoj2kfLGCIqVfPwIA25WJth7IFvPqUzJd5Mt/CSX\r\ndJPHq01nv5QuH4DomtXSdO0018iSxTr0Rj3CwrOEgomKGR7FL1hhhoO6rU/b\r\n8xruehaOYbPbxTCgj2sd+OnZnx9S7RL/QpR1TrzEATeOHmbqFRCd9KWyNuXy\r\nIMzskid7c78wzSJQgTJDaH44Z7nM0+E9bhdvPE046sjzrqg6k6thgbJdyPUW\r\nHCPN7PqYcTTKyLx5FpliNNExztzuMbei+cg+Sxf1pM63eu8Serm1vaDJZK/K\r\nWL3ErYqcfqixuuRjcyw8ql8Xlt3z2GMK9WOqGqWR385Gr8eYNelEkY8SbfJi\r\nbeUxW10PT64yibn5RZpNTjD5kkAkSlbQOJqdFJSx0Y2PuZsTt1SslmD6wO9o\r\n+95h+AJtulKd5CYfdqmXJyLtx2oxm+vw0Gqwuj8duwpuU55HfR7R0pku0vqq\r\nbwtPvU1mJrJsEcX8AGawwvmJu7Y7bm0MsGPL4+nNoZKml4NkcpMFnSLkMsm6\r\n/iStON+Ct5mHRYZP1ZlinhzOTm2+ovGhpWY=\r\n=C97Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"71f07c4af213258303a8513dc9a6a7c70214bcbe","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.14-alpha.2","@storybook/addons":"6.5.14-alpha.2","@storybook/router":"6.5.14-alpha.2","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.14-alpha.2","@storybook/channels":"6.5.14-alpha.2","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.14-alpha.2","@storybook/core-events":"6.5.14-alpha.2","@storybook/client-logger":"6.5.14-alpha.2"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.14-alpha.2_1669912258099_0.031178785823701816","host":"s3://npm-registry-packages"}},"6.5.14":{"name":"@storybook/ui","version":"6.5.14","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.14","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"8c03a37917adc0060b077d3acb7f0064ace68083","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.14.tgz","fileCount":10,"integrity":"sha512-dXlCIULh8ytgdFrvVoheQLlZjAyyYmGCuw+6m+s+2yF/oUbFREG/5Zo9hDwlJ4ZiAyqNLkuwg2tnMYtjapZSog==","signatures":[{"sig":"MEQCIA+eSCCj5/XsLri0Uy2mZV7sQ4DorrchUfomx1bgoAr+AiAm9zHkteWannvzKnkMJiTyw0m4HX/xfA+448RJORanFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiUG+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8Tg//dHFWJG617TPRPVCALvAae3OIFAkzO13CZrti8XQfRRGGrDu8\r\n86vYYLFJx8DUbyNGpcgVoC552JXACogOZ3Ux9X1E45L1toJDdeC5HDtZSVz8\r\nCcfess0KZ+4S8JeXkuVZnM6nRM0sOCRyI1WeYE+9LkQHx4XeIk8mHkdzuEzw\r\nWEV2j7itQKbjbpdXm9RvpNluq7vIWKeTpFbyfsXbpFsBu+r2h1UV7/crgIBv\r\nfv3BSPlDF0M2f0jfH9H2D9Zc253KzNiRqMKX1H7j4l8TkQJUcse0EDififA5\r\nupNnOfstoNv3VvGtuITNfS80AUqLKFyimW+iEiTSxvrJ0P612NJRGAkvtxJc\r\nfWMMxfmc/93MBDwUitaeYe3NvZEF7AgrqdTQ94RE+WFw93czMEyY2UvX7be/\r\nvJuaIkI6wQR4iUdOASCagybZAb8yCt73E65Y9jpZfJJ3TKUGgXdz/slN7Fz3\r\ndjC90gSN1aRxawUctgIeywnEnr3taec5b0CUB6gO9EAgFkG4LZUW+pGGcmtc\r\nOXaQbQ+F10ZIf0LB5TPXBrdES+60lzyffOWOD/v+q4s5hbe28Ot+SQ15OXVw\r\nFCboOB331PAQwHEe7+9zpw65Z1w5amsNYfVF2HGmbWeuTE3tn2Sq21j1luDC\r\nXSDgMgv3ajDRlNOzFAhlk+0jnt2VoFCPjYo=\r\n=Aub7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"cf65eb7ff6f58341ecd8010a24ee88d2974a7df5","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.14","@storybook/addons":"6.5.14","@storybook/router":"6.5.14","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.14","@storybook/channels":"6.5.14","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.14","@storybook/core-events":"6.5.14","@storybook/client-logger":"6.5.14"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.14_1669939646186_0.5728890207101156","host":"s3://npm-registry-packages"}},"6.5.15-alpha.0":{"name":"@storybook/ui","version":"6.5.15-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.15-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"af6171b55a12f4fb1a28406e82adddb32fa405de","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.15-alpha.0.tgz","fileCount":10,"integrity":"sha512-xa5lIudPGoZF59SnXJ8zi9kHNaRP5dyZBPxbRAxFAljl0+KPfbdJ4T4zvYuxdRnmLBg8ihhHOA+5Ynw3uwD9bg==","signatures":[{"sig":"MEUCIQCfZ4N2ZpmROXaCRhXEoVzuQ6r0144Li6JfzjlnBjKcsAIgBIRwPqRcDCs4CEGqs2UfjjS/9hZHc4YVH7E2X77d1/8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlxZWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolOw/+OXCvufAN/U19M8p8Q4JV+MyXQClm1OnYK6/08XBrc/bWo7L2\r\nrhmAUeMK4zHs4ybh6C98CACi2TwaZYqXJqhr08qlD3r0uqld0T5sgSkV2Tuc\r\numuW3ZFT3LJhhDFQnNfJhDIKryhZ2N6QS4j4WyPjrwwI+IAhe/XzNyLEqDrB\r\n8ekvZX0A+IowYQooCEjL0z0o1hsyciTGOFzD3jg9tCGX0EJAOYD/nIHLOX3/\r\nNJYyKq/iBgCxlxkrUD58YztddNCLqBhYLQLJj08GayeuXf5prktKqQD/0y2V\r\nvGBKdyIoz5qfenTuw2MUTOoGnX73NR8wOJ4d3FPDNZad3RwKgE0KB4a8laBu\r\n+n5PJIk0GRYoBYWoY1xLZUzxU2Pe+65JiA9eX4qZBXib9QuqUS51VFJzE6io\r\nSs9Ef60MnhmM0igGHveLJ1A9MPZdNLepyxJpyaWGigmC+A8ewg+ZdRdL/TC1\r\niWdsezespPxh0gMnXoZ89t2LuWnlria93+zRaec7/f020LM1PCzPyvTkWNpv\r\nwjhGtQaB0+Z3mI3URuDekqg6EuhAF8lfjg2fO7Fp7G/V1cYEAtQomJsFlG19\r\nVO0DHQUfUO4nAMsWvPhbotXdyMZLlS7HBSgDEPpkUnQ+R1bQeeGwQn8ofYDn\r\nahRmU9ZdTl0rh7HtNoHforuFLCVcNqn1zLY=\r\n=HTUv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"095d6ad0f577082c3faf1ac3e0140fc1a80a90a2","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.15-alpha.0","@storybook/addons":"6.5.15-alpha.0","@storybook/router":"6.5.15-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.15-alpha.0","@storybook/channels":"6.5.15-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.15-alpha.0","@storybook/core-events":"6.5.15-alpha.0","@storybook/client-logger":"6.5.15-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.15-alpha.0_1670846038604_0.8045356329390707","host":"s3://npm-registry-packages"}},"6.5.15-alpha.1":{"name":"@storybook/ui","version":"6.5.15-alpha.1","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.15-alpha.1","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"d4bec307996b31c63475d6ecb43b048816cd0f77","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.15-alpha.1.tgz","fileCount":10,"integrity":"sha512-H52FK33DIEBB4Pp4bML0si2RWUPT+TVtE4VyYc0MWShRyFyglRuEAqYQAgtL9cezf899qbX8eN4/CH5a5/VmrQ==","signatures":[{"sig":"MEUCIE78r19qLRG39Qg2pQlyHqyULj3JEnb3cGgA2W1BZgkOAiEAlXel2fuNj0NzHG8ztNlPI5QpwdLc8d+jVRFGvwX+828=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjocALACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq11g/8DCoENcauRi+9mSjSHVl7axGwweZQ0PB3CEUNLfpLoHyi7E9O\r\nfn50AldtUsowiAHj2qbRsz0V6WGM4D4HwbZe6kYtSBjkXBi1GETnaaL5b23n\r\necW9KDEdbhFrUhjF87lr2Yd2rdPYD0U6SlEmGMgev3eqd85ow9solp+fYVfX\r\nUUTXyWMtU8P+aDYw5KVuJo9bs0QbP/Ou3PPujgZz4FiArQxtkc+WRFIJkAte\r\nLKq14crjCtOSQuK3ixv1D6w2uAoU1t39fWubnR6994Q9GXTtoiptDMKl4Wrj\r\nreiQqQFJWSHTt8qa+wkRUMns0QCbuiZhXzsKEiHBDhSvkAxsmkrC8nUKj7pH\r\ndGclRjt/nKlLzH7VEWoqIZ8KsRcGryRmcaAlvSgX2gR1KcqlC7u3Q+106luI\r\nG7qjejcFyUiscAoRAxJ/FZHvaZOdVj1gcUjgFmFomWIIg05W7OgIsJOq/3fm\r\nAWExEdSy5cYziZ8IG1OdGFU/s7qJGgR9n9l+PZVOaFJM3wrw15uGul/UdMhN\r\nWYHCDiet4dYLNy/w3i9mcNYxi3+Ev6R/xheHd/Utoa/JdmkVOzGZqLlToIkX\r\nqqRIl2zMprn39tKynUkPrGw7i6wKo1gAUJh/qB0ZYBnLo3hdqNIYmvHOXY58\r\nc6wGkyt6ysucZIa/2M2iDs1OMKOXr/8WGeM=\r\n=tikX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"cfd775bd5bfb7c4bc4609f413e52c1ba2f226560","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.15-alpha.1","@storybook/addons":"6.5.15-alpha.1","@storybook/router":"6.5.15-alpha.1","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.15-alpha.1","@storybook/channels":"6.5.15-alpha.1","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.15-alpha.1","@storybook/core-events":"6.5.15-alpha.1","@storybook/client-logger":"6.5.15-alpha.1"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.15-alpha.1_1671544842736_0.08438846566197289","host":"s3://npm-registry-packages"}},"6.5.15":{"name":"@storybook/ui","version":"6.5.15","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.15","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"e4d80465116e53d48d2c3bb616909c37f5405181","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.15.tgz","fileCount":10,"integrity":"sha512-OO+TWZmI8ebWA1C3JBKNvbUbsgvt4GppqsGlkf5CTBZrT/MzmMlYiooLAtlY1ZPcMtTd5ynLxvroHWBEnMOk2A==","signatures":[{"sig":"MEYCIQDKh3DPL/ae9G5wSRNlQi+ZoYFf8EwrEVImRmo47KzOCQIhAMWnKnB4h/N5wujZ7If7ilxzm30c1mUrrAFY1ImXtsUX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoc5iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoM8A/9G1maRDC4qNmQhqREyTKHbnHfU9GAqMxNu8+hZIBbMaKTvEKz\r\n7+cpHxB+a0drk0r/taokEDU7WWRwLW0aomwp/HZxeTBrB2IvW0inYdPjJ5xF\r\niE9twdp/Fzy1WAfa3pVCRYTb8zexaDMF2XvzlLjy+HUdy6oumNm0oDPSv6z+\r\nhyrqluwDeml11NqbpBcTvBcqsWua9DEoEiykgULqXYB3l4/ZFMcR9dW05GKQ\r\nfum75gJ2fprimacMQE6Ydz4QcZGuBOhhHdcYB2ZNzYtSmooLxdva9JtmLO7E\r\nufUcpraxOBcVtGD6Ka8JDW18NQaGYo4xtNdkrIAHFJd2snTO9aUUQCFzZv3A\r\n0u6cjVMRsJB0WZb3tmTSU4Ct2R4SJ/apdnRJx/XTpuLwabYsiDs77EZ7z0S1\r\nECXh0874b6QTNjLCeXO5/cqgTupffqZcUBmOpE38wRlYPRDVJqL9FCmSYHl2\r\n0Eq+XnyHV3+oF/gUkCeFclJmjJefh6y4ka4CWmciYCM0ob+ZGV15YPNP0jjC\r\n92u9XqAmZcpvyHNHJM6x9aEyfgyGJ8fc8QoQ8u6RsQQzo9BVFGOir/qzDtVw\r\nqoQsFdZrCuCCxg4rFHBxA3JDM6hfA9kYWZEOElpFIWoouXsXTloNec6LemOc\r\nbwNjVyjKC4DfsPp8EWqqwyL4p1274RWns0A=\r\n=mr1C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"feab19dad03201d094000c656bcb4559294b3914","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.15","@storybook/addons":"6.5.15","@storybook/router":"6.5.15","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.15","@storybook/channels":"6.5.15","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.15","@storybook/core-events":"6.5.15","@storybook/client-logger":"6.5.15"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.15_1671548513914_0.40484806820713515","host":"s3://npm-registry-packages"}},"6.5.16-alpha.0":{"name":"@storybook/ui","version":"6.5.16-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.16-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"2fdbebbeef7efeae853becc88b07fa2caae4f24d","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.16-alpha.0.tgz","fileCount":10,"integrity":"sha512-+Yg86mFYy2UWCcZdebhLWIxOc1uxmMMyZwLoT4frPlgpyYZLOjWRYyBIQ2oT0HAjO5ntv/lSJl5rH3d7A9ZV8w==","signatures":[{"sig":"MEQCIAEwNp6ofhXmknz1yF5+Rd56Jefaqxyoz2cH3eTYWzkjAiAGBbSQHq6t2BiQ8faU55suGDi3sWfhMyGcUbu+gTf3nA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvuGIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrXg/9HcQ3zAx1ZUIsRqBXT4cfeHHWRFylWMaWXOHN40nPkhpIdI/u\r\nJnTTQdl5ZJm3Bpg/e29+aaV79g7LgwFPP0hFXnDCFsmCD1UkrYqt2ftNqODs\r\n19nhXFSLfgYLpMIj43M1FT8R66apHOE+ZAcMYGQpuu+94M3DjIQGeL550zcN\r\nzHeWHPzP9kCcP98bH5iy3VU1ztotN1d6/0XKnuWcwlDBklZSvWzbEXo9OLPS\r\niNWbMTEahJ3np+d+2v9ExIxSzcTluVXLbUxTUQi6h60W+HftVDWYNKS8J42V\r\nG4qzKuFFIAEMFWKHFgEJcMg5x0HIIbfyzJcd/YuG+n1Vht9HaNqjfs0hbWaW\r\nr+Fnr4TfHpbHQzNXK3I/ZVZXtf3dw9jNphforJGwy/IF4nyzBj/FRhwpSqOZ\r\nn01TQKm90LjEw4hBQ/XBb6dxh8mi3HEfIVVojopzAdQg8N07t65AnOxoQyXq\r\n3iidECwL4Pi//+ssTBcHtVmeF5igK14H3J/+U45UOFyu3SvEWFvsXjW4uSiF\r\nYTtdqmDH2pMPfIzodzYdDY7wcjCHOlcAQTw/mJbpfMMn9kmJdH9Bb2JlnAHL\r\nIcn2IkgfCWg94hNdwp/F+epKWW5PwJ/KNYbuzXpWck2AfL+mI40NmmlYczDu\r\nbqOaQOzUpK2nTsD1dynaJxovGufhWqFHjC8=\r\n=egwN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"1b48a7af6f154076a9c77b3890c2baeba4d724a1","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.16-alpha.0","@storybook/addons":"6.5.16-alpha.0","@storybook/router":"6.5.16-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.16-alpha.0","@storybook/channels":"6.5.16-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.16-alpha.0","@storybook/core-events":"6.5.16-alpha.0","@storybook/client-logger":"6.5.16-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.16-alpha.0_1673453960590_0.41070645394598126","host":"s3://npm-registry-packages"}},"6.5.16":{"name":"@storybook/ui","version":"6.5.16","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.16","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"c73bf456e672ecf2370b4365070088487fc0ce57","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.16.tgz","fileCount":10,"integrity":"sha512-rHn/n12WM8BaXtZ3IApNZCiS+C4Oc5+Lkl4MoctX8V7QSml0SxZBB5hsJ/AiWkgbRxjQpa/L/Nt7/Qw0FjTH/A==","signatures":[{"sig":"MEUCIQCq3y0fnU8DYVr2+rndF6D1zbWsAerPxHk7SFJ0MxItkgIgQfVq0wrkRprYPJyQfpkYe6yCV93VZPWW8+WbhvzYHl4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0mT4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvWw//QfBC2rBZuNCVpNjj3A0bqvBmtxZaBnUYafLuwz8OmB/9Y08x\r\nS6Opkx/aPH1Z0SgUn6c5FjqRefhT1HiNzmxdA2TZ8YZtSU4Um3pI4HJ/63u8\r\n3AMbw3SfFqasUL7c4mNS2LVHNeHg+X4eUxmMdJYC44VRLd5ADyM837Ty+PLn\r\nGrtZH9jb4BRsUillKKtxr1RcoJZbDOqv9yc/vmRK5MQIVmPBCo2Xq6c8rwIY\r\nykcjgHMprxTRcuwLOWEhxFz0Qt4wlmbyr3eB3sy+m8F3fsK+s4d8Q6H/k7Jr\r\noSAMUsvnONCAe3g5b0LeWB9pQFnxyvoVL9jV5KiRhcvTvnFhcBFsWqwO3G+B\r\n2sbJhHEymXH7l4liesHedYV7AMvlw/ygUD78YEnfA/3f2U3lKyOCyF40sT+S\r\nTdOlCVE5qNluy384zaO0kuVZIPbUx1+Vj9qHTcWnwRwlJ+0H1wbaod7cJD6D\r\naLJE8FbZFifx1NPMZnBbZklWfqFp5FIoZ6y3aPHXf8fQpmFg8rCi7Bne0nUI\r\npbzXF6/lBIyEYKxGy5edNja3FVYorlCFXxkV3/unoU/Sgxjxs4LHsHI8x7HC\r\nIDCQ0MqtjE3Mj7P0Ioqi6AM7zGPKG8eCypm+lDiOzdGKgJzY1cJRMt19qTXr\r\nBbuo5z6y7jUc9WIsKs4MzIFoiirtAD+7GW4=\r\n=wq1a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"7db13fface8f05b870a16b90694a840785830f7e","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.16","@storybook/addons":"6.5.16","@storybook/router":"6.5.16","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.16","@storybook/channels":"6.5.16","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.16","@storybook/core-events":"6.5.16","@storybook/client-logger":"6.5.16"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.16_1674732792092_0.3576699184442911","host":"s3://npm-registry-packages"}},"6.5.17-alpha.0":{"name":"@storybook/ui","version":"6.5.17-alpha.0","keywords":["storybook"],"license":"MIT","_id":"@storybook/ui@6.5.17-alpha.0","maintainers":[{"name":"anonymous","email":"michael@lab80.co"},{"name":"anonymous","email":"ndelangen@me.com"},{"name":"anonymous","email":"talpa@yandex.ru"},{"name":"anonymous","email":"tom@thesnail.org"},{"name":"anonymous","email":"davydkin.igor@gmail.com"}],"homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui","bugs":{"url":"https://github.com/storybookjs/storybook/issues"},"dist":{"shasum":"a7ec74ba101986a52bd9662d3d59ae83ff5ebc9c","tarball":"http://repository.ncinga.com/nexus/content/repositories/npm-js-registry/@storybook/ui/-/ui-6.5.17-alpha.0.tgz","fileCount":10,"integrity":"sha512-L188HSal+Jq6MNZuy3HUN/QlEE75B7okNBYj/ZR3/s6LIs2zceOZuxp2lk92CEh0dggoJ4HTRqPmKqMHNsXA8g==","signatures":[{"sig":"MEQCIDgtjDrfHLokiPg9uPMffvLaOPqJ2NKdKN9qXid873UkAiBhZ3Xa2PET7WdjHa08TuO/Ha4enOyikpUUITrXXe5ItQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1469167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkG8PKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyXg/9F7sGoO1GzERe9dfuIntg96PNcD4Xc29OuG9ls/NPpwSYqGME\r\n6kT3Dcx5+T84LXYPUWO0W6N3upLfLvT+NOZcMP7rVVqr1DrBhvUi9jkTQmci\r\nbW9yTj4ZY9Nu2vJdAEb1nmK1dZ4ELiksNTyUh2weuH2OjjY6zMufCm5lXRoB\r\ntqoR4MRsFhfmnqkXE8LlE9NnuUe8xw+X2hZCTKQHeLD75ZMUoKpDdl+8DC77\r\nExL7f3le78X+LeL4YvW8qYBBSNe8WTIRA/VY+JKRSJOIe1p0WQYN0D4E+sQ3\r\njXaE8nMZFsGh+5JRxgOAThlADP7KzRQz1iDPtYBnLH8Wx4uvtxJR/99KsZ+1\r\n1/im6c/5lDg8Rf1EFPitMRH1rgHoD3gyVhCpy69/Qrd5Dy3p81/xNyzLfScw\r\nWyaeHu3IMK0XfOEB0UNAXyY+/eU38k46LBHz1W0Im99KiByEI75ZJMQ70+rK\r\nbeB38URcRDJ4lXgarDFdIIi8tmPzYjdUOY7+wOTp1NZPAJxduMSkzj3T2LwZ\r\nvfZlz+zSJGJcdw7zWwlx0KNfcnQhhJFbzqlwPC5vTNXkeuAS1JR55Jn8hFKJ\r\n3JTWFxL80ckcegcD6qBv62XSk2wCW2NDQonxVemEOl2ak3UZzoscZ5KcRb3H\r\nmCJZb4x+fDtiw0w2nl+KI+RYqE7bwL8l9mg=\r\n=RmAT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/ts3.9/index.d.ts","module":"dist/esm/index.js","readme":"<h1>Storybook UI</h1>\n\nStorybook UI the core UI of [Storybook](https://storybook.js.org).\nIt's a React based UI which you can initialize with a function.\nYou can configure it by providing a provider API.\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [API](#api)\n  - [.setOptions()](#setoptions)\n- [.setStories()](#setstories)\n- [.onStory()](#onstory)\n- [Hacking Guide](#hacking-guide)\n  - [The App](#the-app)\n  - [Changing UI](#changing-ui)\n  - [Mounting](#mounting)\n  - [App Context](#app-context)\n  - [Actions](#actions)\n  - [Core API](#core-api)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [URL Changes](#url-changes)\n  - [Story Order](#story-order)\n\n## Usage\n\nFirst you need to install `@storybook/ui` into your app.\n\n```sh\nyarn add @storybook/ui --dev\n```\n\nThen you need to create a Provider class like this:\n\n```js\nimport React from 'react';\nimport { Provider } from '@storybook/ui';\n\nexport default class MyProvider extends Provider {\n  getElements(type) {\n    return {};\n  }\n\n  renderPreview() {\n    return <p>This is the Preview</p>;\n  }\n\n  handleAPI(api) {\n    // no need to do anything for now.\n  }\n}\n```\n\nThen you need to initialize the UI like this:\n\n```js\nimport global from 'global';\nimport renderStorybookUI from '@storybook/ui';\nimport Provider from './provider';\n\nconst { document } = global;\n\nconst roolEl = document.getElementById('root');\nrenderStorybookUI(roolEl, new Provider());\n```\n\n## API\n\n### .setOptions()\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setOptions({\n      // see available options in\n      // https://storybook.js.org/docs/react/configure/features-and-behavior\n    });\n  }\n}\n```\n\n## .setStories()\n\nThis API is used to pass the`kind` and `stories` list to storybook-ui.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.setStories([\n      {\n        kind: 'Component 1',\n        stories: ['State 1', 'State 2'],\n      },\n\n      {\n        kind: 'Component 2',\n        stories: ['State a', 'State b'],\n      },\n    ]);\n  }\n}\n```\n\n## .onStory()\n\nYou can use to listen to the story change and update the preview.\n\n```js\nimport { Provider } from '@storybook/ui';\n\nclass ReactProvider extends Provider {\n  handleAPI(api) {\n    api.onStory((kind, story) => {\n      this.globalState.emit('change', kind, story);\n    });\n  }\n}\n```\n\n## Hacking Guide\n\nIf you like to add features to the Storybook UI or fix bugs, this is the guide you need to follow.\n\nFirst of all, familiarize yourself with code used. Check the [source](./src/) folder for the source code.\n\n### The App\n\nThis is a Redux app written based on the [Mantra architecture](https://github.com/kadirahq/mantra/).\nIt's a set of modules. You can see those modules at `src/modules` directory.\n\n### Changing UI\n\nIf you like to change the appearance of the UI, you need to look at the `ui` module. Change components at the `components` directory for UI tweaks.\n\nYou can also change containers(which are written with [react-komposer](https://github.com/kadirahq/react-komposer/)) to add more data from the redux state.\n\n### Mounting\n\nThe UI is mounted in the `src/modules/ui/routes.js`. Inside that, we have injected dependencies as well. Refer [mantra-core](https://github.com/mantrajs/mantra-core) for that.\n\nWe've injected the context and actions.\n\n### App Context\n\nApp context is the app which application context you initialize when creating the UI. It is initialized in the `src/index.js` file. It's a non serializable state. You can access the app context from containers and basically most of the place in the app.\n\nSo, that's the place to put app wide configurations and objects which won't changed after initialized. Our redux store is also stayed inside the app context.\n\n### Actions\n\nActions are the place we implement app logic in a Mantra app. Each module has a set of actions and they are globally accessible. These actions are located at `<module>/actions` directory.\n\nThey got injected into the app(when mounting) and you can access them via containers. If you are familiar with redux, this is exactly action creators. But they are not only limited to do redux stuff. Actions has the access to the app context, so literally it can do anything.\n\n### Core API\n\nCore API (which is passed to the Provider with `handleAPI` method) is implemented in the `api` module. We put the provider passed by the user in the app context. Then api module access it and use it as needed.\n\n### Keyboard Shortcuts\n\nKeyboard shortcuts are implemented in a bit different way. The final state of keyboard shortcuts is managed by the `shortcuts` module. But they are implemented in the `ui` module with `src/modules/ui/configs/handle_routing.js`\n\nThese shortcuts also can be called from main API using the `handleShortcut` method. Check the example app for the usage. That's implemented as an action in the `shortcuts` module.\n\nThe above action(or the `handleShortcut` method) accepts events as a constant defined by this module. They are defined in the `src/libs/key_events.js`. This is basically to serialize these events.\n\n> In react-storybook we need to pass these events from the preview iframe to the main app. That's the core reason for this.\n\n### URL Changes\n\nTODO: state we use reach/router customized to query params\n\n### Story Order\n\nStories are sorted in the order in which they were imported. This can be overridden by adding storySort to the Parameters for the stories in `.storybook/preview.js`:\n\n```js\naddParameters({\n  options: {\n    storySort: (a, b) => a[1].id.localeCompare(b[1].id),\n  },\n});\n```\n","funding":{"url":"https://opencollective.com/storybook","type":"opencollective"},"gitHead":"f6dd58a9fa9f197bfb74d0b6c7d6b5d266f759b9","scripts":{"prepare":"ts-node ../../scripts/prebundle.ts"},"_npmUser":{"name":"anonymous","email":"michael@lab80.co"},"sbmodern":"dist/modern/index.js","repository":{"url":"git+https://github.com/storybookjs/storybook.git","type":"git","directory":"lib/ui"},"_npmVersion":"lerna/3.22.1/node@v16.17.0+arm64 (darwin)","description":"Core Storybook UI","directories":{},"sideEffects":false,"_nodeVersion":"16.17.0","dependencies":{"qs":"^6.10.0","core-js":"^3.8.2","memoizerific":"^1.11.3","resolve-from":"^5.0.0","@storybook/api":"6.5.17-alpha.0","@storybook/addons":"6.5.17-alpha.0","@storybook/router":"6.5.17-alpha.0","@storybook/semver":"^7.3.2","@storybook/theming":"6.5.17-alpha.0","@storybook/channels":"6.5.17-alpha.0","regenerator-runtime":"^0.13.7","@storybook/components":"6.5.17-alpha.0","@storybook/core-events":"6.5.17-alpha.0","@storybook/client-logger":"6.5.17-alpha.0"},"publishConfig":{"access":"public"},"typesVersions":{"<3.8":{"dist/ts3.9/*":["dist/ts3.4/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"enzyme":"^3.11.0","global":"^4.4.0","lodash":"^4.17.21","store2":"^2.12.0","fuse.js":"^3.6.1","ts-node":"^10.4.0","webpack":"4","polished":"^4.2.2","downshift":"^6.0.15","@babel/core":"^7.12.10","core-js-pure":"^3.8.2","react-sizeme":"^3.0.1","flush-promises":"^1.0.2","markdown-to-jsx":"^7.1.3","react-draggable":"^4.4.3","copy-to-clipboard":"^3.3.1","react-helmet-async":"^1.0.7","@testing-library/react":"^11.2.2"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"bundlerEntrypoint":"./src/index.tsx","_npmOperationalInternal":{"tmp":"tmp/ui_6.5.17-alpha.0_1679541194163_0.3352948526064381","host":"s3://npm-registry-packages"}}},"name":"@storybook/ui","time":{"created":"2017-05-17T19:58:45.639Z","modified":"2024-11-20T14:07:14.664Z","3.0.0-alpha.0":"2017-05-17T19:58:45.639Z","3.0.0-rc.0":"2017-05-25T16:28:45.327Z","3.0.0-rc.2":"2017-05-27T11:47:38.351Z","3.0.0-rc.3":"2017-05-30T08:47:16.004Z","3.0.0":"2017-05-30T13:40:29.061Z","3.0.1":"2017-06-05T12:59:28.360Z","3.1.0":"2017-06-09T10:53:38.403Z","3.1.1":"2017-06-09T11:33:29.586Z","3.1.2":"2017-06-09T11:54:18.560Z","3.1.3":"2017-06-10T11:47:51.294Z","3.1.5":"2017-06-22T06:37:16.735Z","3.1.6":"2017-06-26T06:33:23.443Z","3.2.0-alpha.5":"2017-07-02T17:24:01.981Z","3.2.0-alpha.7":"2017-07-06T08:40:16.342Z","3.1.9":"2017-07-16T20:50:47.660Z","3.2.0-alpha.8":"2017-07-20T20:30:11.797Z","3.2.0-alpha.10":"2017-07-27T08:07:31.093Z","3.2.0-alpha.11":"2017-07-27T14:54:13.799Z","3.2.0-alpha.12":"2017-07-30T23:36:31.078Z","3.2.0":"2017-07-31T14:13:02.573Z","3.2.3-alpha.0":"2017-08-01T20:14:02.369Z","3.2.3":"2017-08-01T20:38:42.793Z","3.2.4":"2017-08-12T23:59:53.209Z","3.2.5":"2017-08-17T04:51:28.662Z","3.2.6-alpha.0":"2017-08-22T07:33:44.414Z","3.2.6":"2017-08-22T18:04:04.590Z","3.2.7":"2017-08-23T16:24:28.414Z","3.3.0-alpha.0":"2017-09-06T20:48:09.402Z","3.2.10":"2017-09-22T21:44:17.139Z","3.2.11":"2017-09-26T22:54:14.064Z","3.3.0-alpha.1":"2017-10-02T19:00:05.201Z","3.2.12":"2017-10-02T22:32:39.683Z","3.3.0-alpha.2":"2017-10-03T20:13:24.489Z","3.2.13":"2017-10-20T19:46:36.603Z","3.2.14":"2017-11-01T07:22:57.894Z","3.3.0-alpha.3":"2017-11-07T03:58:38.770Z","3.2.15":"2017-11-10T02:42:29.988Z","3.2.16":"2017-11-16T02:04:45.397Z","3.3.0-alpha.4":"2017-11-22T11:17:11.794Z","3.2.17":"2017-12-03T20:00:25.322Z","3.2.18":"2017-12-18T22:00:20.155Z","3.3.0-alpha.6":"2017-12-23T17:27:44.382Z","3.2.19":"2017-12-23T18:00:15.618Z","3.3.0-rc.0":"2017-12-24T04:22:33.884Z","3.3.0-rc.1":"2017-12-26T17:51:01.107Z","3.3.0":"2017-12-26T23:59:53.203Z","3.3.1":"2017-12-27T03:32:27.252Z","3.3.2":"2017-12-28T03:12:59.016Z","3.3.3":"2017-12-28T17:10:03.706Z","3.3.4":"2018-01-07T13:01:53.946Z","3.4.0-alpha.0":"2018-01-07T16:07:48.177Z","3.3.5":"2018-01-08T03:46:05.623Z","3.3.6":"2018-01-08T10:45:33.547Z","3.3.7":"2018-01-10T06:38:18.153Z","3.4.0-alpha.1":"2018-01-10T07:11:20.157Z","3.3.8":"2018-01-11T12:24:02.016Z","3.4.0-alpha.2":"2018-01-11T12:51:42.357Z","3.3.9":"2018-01-13T07:42:53.394Z","3.4.0-alpha.3":"2018-01-13T12:47:25.529Z","3.4.0-alpha.4":"2018-01-13T13:09:42.207Z","3.3.10":"2018-01-19T11:31:04.515Z","3.4.0-alpha.5":"2018-01-19T12:54:51.963Z","3.3.11":"2018-01-27T06:42:39.295Z","3.4.0-alpha.6":"2018-01-27T07:18:13.629Z","3.3.12":"2018-02-03T02:25:21.902Z","3.4.0-alpha.7":"2018-02-03T02:56:58.352Z","3.3.13":"2018-02-11T06:14:20.436Z","3.4.0-alpha.8":"2018-02-11T06:59:14.679Z","3.3.14":"2018-02-21T08:40:52.198Z","3.4.0-alpha.9":"2018-02-22T08:47:14.837Z","3.3.15":"2018-03-07T10:01:35.333Z","3.4.0-rc.0":"2018-03-08T03:07:38.077Z","3.4.0-rc.1":"2018-03-13T10:38:30.317Z","3.4.0-rc.2":"2018-03-13T11:06:59.180Z","3.4.0-rc.3":"2018-03-19T23:05:30.589Z","3.4.0-rc.4":"2018-03-29T04:27:12.380Z","4.0.0-alpha.0":"2018-03-29T05:35:20.963Z","4.0.0-alpha.1":"2018-03-29T15:30:02.524Z","3.4.0":"2018-03-30T23:45:44.641Z","3.4.1":"2018-04-10T22:35:19.150Z","4.0.0-alpha.2":"2018-04-11T00:41:14.122Z","3.4.2":"2018-04-17T23:15:46.083Z","4.0.0-alpha.3":"2018-04-17T23:52:12.870Z","3.4.3":"2018-04-27T19:11:15.534Z","4.0.0-alpha.4":"2018-04-27T19:46:07.232Z","3.4.4":"2018-05-12T19:50:00.091Z","4.0.0-alpha.6":"2018-05-12T20:34:17.876Z","3.4.5":"2018-05-17T22:14:21.092Z","4.0.0-alpha.7":"2018-05-17T23:04:29.607Z","3.4.6":"2018-05-27T00:41:08.417Z","4.0.0-alpha.8":"2018-05-27T01:48:56.039Z","3.4.7":"2018-06-10T04:31:29.203Z","4.0.0-alpha.9":"2018-06-10T07:43:42.104Z","3.4.8":"2018-06-21T13:06:29.808Z","4.0.0-alpha.10":"2018-06-21T13:50:49.639Z","4.0.0-alpha.11":"2018-07-02T18:15:28.404Z","4.0.0-alpha.12":"2018-07-03T22:59:56.790Z","4.0.0-alpha.13":"2018-07-10T04:33:42.876Z","4.0.0-alpha.14":"2018-07-12T00:15:36.194Z","3.4.10":"2018-08-03T09:29:06.693Z","4.0.0-alpha.15":"2018-08-03T09:58:43.774Z","4.0.0-alpha.16":"2018-08-06T14:28:09.973Z","4.0.0-alpha.17":"2018-08-24T18:42:17.754Z","4.0.0-alpha.18":"2018-08-25T20:58:46.828Z","4.0.0-alpha.20":"2018-08-31T23:02:03.562Z","4.0.0-alpha.21":"2018-09-07T17:20:13.299Z","3.4.11":"2018-09-17T23:03:03.220Z","4.0.0-alpha.22":"2018-09-19T21:03:26.579Z","4.0.0-alpha.23":"2018-09-25T22:43:34.144Z","4.0.0-alpha.24":"2018-10-04T08:27:19.653Z","4.0.0-alpha.25":"2018-10-13T09:39:44.361Z","4.0.0-rc.0":"2018-10-15T15:42:33.870Z","4.0.0-rc.1":"2018-10-18T01:56:30.886Z","4.0.0-rc.2":"2018-10-22T13:41:59.821Z","4.0.0-rc.3":"2018-10-23T16:21:43.796Z","4.0.0-rc.4":"2018-10-25T02:57:37.266Z","4.0.0-rc.5":"2018-10-25T03:44:29.547Z","4.0.0-rc.6":"2018-10-25T04:38:20.609Z","4.0.0":"2018-10-29T02:32:58.837Z","4.0.1":"2018-10-31T07:13:47.507Z","4.0.2":"2018-10-31T08:50:30.796Z","4.0.3":"2018-11-06T04:53:19.717Z","4.0.4":"2018-11-06T05:40:25.731Z","4.1.0-alpha.1":"2018-11-06T09:18:12.937Z","4.0.6":"2018-11-13T11:15:48.404Z","4.1.0-alpha.2":"2018-11-13T11:36:06.828Z","4.0.7":"2018-11-15T13:34:21.033Z","4.1.0-alpha.3":"2018-11-15T14:14:05.280Z","4.0.8":"2018-11-21T10:03:51.079Z","4.1.0-alpha.4":"2018-11-21T10:45:40.377Z","4.1.0-alpha.5":"2018-11-22T03:57:42.554Z","4.1.0-alpha.6":"2018-11-22T04:09:02.755Z","4.1.0-alpha.7":"2018-11-22T04:36:03.035Z","4.1.0-alpha.8":"2018-11-25T02:03:29.146Z","4.0.9":"2018-11-25T15:31:07.972Z","4.1.0-alpha.9":"2018-11-29T09:50:47.921Z","4.1.0-alpha.10":"2018-12-01T03:26:37.213Z","4.0.10":"2018-12-01T22:50:20.788Z","4.0.11":"2018-12-03T02:48:46.448Z","4.1.0-alpha.11":"2018-12-05T19:13:47.050Z","4.0.12":"2018-12-05T19:29:33.991Z","4.1.0-alpha.12":"2018-12-11T17:30:58.039Z","4.1.0-alpha.13":"2018-12-12T17:46:45.060Z","4.1.0":"2018-12-12T19:02:07.218Z","4.1.1":"2018-12-13T01:23:05.596Z","4.2.0-alpha.0":"2018-12-13T01:42:59.976Z","4.2.0-alpha.1":"2018-12-13T02:01:28.343Z","4.1.2":"2018-12-16T15:22:21.558Z","4.2.0-alpha.2":"2018-12-16T16:38:49.357Z","4.2.0-alpha.3":"2018-12-18T15:05:17.462Z","4.2.0-alpha.4":"2018-12-19T07:24:00.340Z","4.2.0-alpha.5":"2018-12-19T16:07:04.698Z","4.2.0-cra-debug.0":"2018-12-20T01:48:31.683Z","4.1.3":"2018-12-20T08:21:09.406Z","4.2.0-alpha.6":"2018-12-20T22:23:33.275Z","4.2.0-alpha.7":"2018-12-25T20:33:21.765Z","4.1.4":"2018-12-25T21:11:22.390Z","4.2.0-alpha.8":"2018-12-28T03:19:26.147Z","4.2.0-alpha.9":"2019-01-04T04:39:16.695Z","4.2.0-alpha.10":"2019-01-06T11:00:02.436Z","5.0.0-debug.0":"2019-01-07T15:03:56.749Z","4.1.5-react-debug.0":"2019-01-09T03:35:10.228Z","4.1.5-react-debug.1":"2019-01-09T04:35:22.946Z","4.1.5":"2019-01-09T07:00:04.027Z","4.1.6":"2019-01-09T07:07:46.515Z","4.2.0-alpha.11":"2019-01-09T10:04:53.930Z","5.0.0-debug.1":"2019-01-09T10:52:24.136Z","5.0.0-debug.2":"2019-01-12T05:30:10.117Z","5.0.0-debug.3":"2019-01-12T07:28:08.530Z","5.0.0-alpha.0":"2019-01-13T07:18:41.459Z","5.0.0-alpha.1":"2019-01-14T15:47:46.504Z","5.0.0-alpha.2":"2019-01-16T02:56:41.096Z","5.0.0-alpha.3":"2019-01-16T04:17:03.553Z","5.0.0-alpha.4":"2019-01-16T17:11:15.237Z","5.0.0-alpha.5":"2019-01-17T08:47:16.437Z","4.1.7":"2019-01-17T14:15:46.155Z","5.0.0-alpha.6":"2019-01-18T16:08:53.302Z","5.0.0-alpha.7":"2019-01-20T08:50:30.578Z","5.0.0-alpha.8":"2019-01-22T09:14:25.246Z","4.1.8":"2019-01-23T10:30:32.726Z","4.1.9":"2019-01-23T10:50:32.918Z","5.0.0-alpha.9":"2019-01-23T13:42:28.897Z","4.1.10":"2019-01-24T14:36:26.206Z","4.1.11":"2019-01-24T14:49:52.511Z","5.0.0-alpha.10":"2019-01-28T04:50:33.638Z","5.0.0-alpha.11":"2019-01-31T18:42:24.710Z","5.0.0-beta.1":"2019-02-01T06:45:21.477Z","5.0.0-beta.2":"2019-02-09T03:34:20.034Z","5.0.0-beta.3":"2019-02-13T03:26:39.565Z","5.0.0-beta.4":"2019-02-15T08:30:57.581Z","5.0.0-rc.0":"2019-02-16T14:53:23.888Z","5.0.0-rc.1":"2019-02-16T16:11:48.908Z","4.1.12":"2019-02-18T09:40:36.325Z","5.0.0-rc.2":"2019-02-19T07:27:23.842Z","5.0.0-rc.3":"2019-02-19T11:26:28.150Z","4.1.13":"2019-02-21T08:01:12.399Z","5.0.0-rc.4":"2019-02-21T10:19:05.305Z","5.0.0-rc.5":"2019-02-23T08:57:20.656Z","5.0.0-rc.6":"2019-02-25T16:08:50.344Z","5.0.0-rc.7":"2019-02-27T17:37:26.862Z","5.0.0-rc.8":"2019-03-01T17:24:43.805Z","5.0.0-rc.9":"2019-03-03T06:29:51.286Z","5.0.0-rc.10":"2019-03-04T06:32:39.772Z","5.0.0-rc.11":"2019-03-05T02:18:31.680Z","5.0.0":"2019-03-05T07:49:14.764Z","5.1.0-alpha.0":"2019-03-06T02:44:25.042Z","5.1.0-alpha.1":"2019-03-07T14:17:47.451Z","5.1.0-alpha.2":"2019-03-08T10:40:34.164Z","4.1.14":"2019-03-08T15:16:21.315Z","5.0.1":"2019-03-08T16:27:49.566Z","5.1.0-alpha.3":"2019-03-09T15:29:29.512Z","5.1.0-alpha.4":"2019-03-11T14:34:18.216Z","5.1.0-alpha.5":"2019-03-12T21:29:50.380Z","5.1.0-alpha.6":"2019-03-14T01:01:21.823Z","5.1.0-alpha.7":"2019-03-16T07:18:41.721Z","5.0.2":"2019-03-17T05:04:26.920Z","5.1.0-alpha.8":"2019-03-17T15:32:38.074Z","5.1.0-alpha.9":"2019-03-18T09:33:58.070Z","5.0.3":"2019-03-18T11:11:58.829Z","5.1.0-alpha.10":"2019-03-19T13:41:06.647Z","5.1.0-alpha.11":"2019-03-20T20:37:56.218Z","5.1.0-alpha.12":"2019-03-22T04:32:56.907Z","5.1.0-alpha.13":"2019-03-23T05:23:45.429Z","4.1.16":"2019-03-24T07:30:28.737Z","5.0.4":"2019-03-24T08:10:49.086Z","3.4.12":"2019-03-24T12:52:41.012Z","5.0.5":"2019-03-24T23:06:34.943Z","5.1.0-alpha.14":"2019-03-25T15:34:59.757Z","5.1.0-alpha.15":"2019-03-26T03:11:52.220Z","5.1.0-alpha.16":"2019-03-26T10:45:24.228Z","5.1.0-alpha.17":"2019-03-26T13:05:33.582Z","5.1.0-alpha.18":"2019-03-26T23:38:26.061Z","5.1.0-alpha.19":"2019-03-28T03:24:38.308Z","5.1.0-alpha.20":"2019-03-29T02:06:46.542Z","5.0.6":"2019-04-01T04:46:02.957Z","5.1.0-alpha.21":"2019-04-04T15:37:42.982Z","5.1.0-alpha.22":"2019-04-05T13:45:56.577Z","5.1.0-alpha.23":"2019-04-08T10:28:15.326Z","5.1.0-alpha.24":"2019-04-09T02:16:28.585Z","5.1.0-alpha.25":"2019-04-11T22:58:36.369Z","5.1.0-alpha.26":"2019-04-13T01:06:26.727Z","5.1.0-alpha.27":"2019-04-14T01:25:09.416Z","5.0.7":"2019-04-14T02:08:09.355Z","4.1.17":"2019-04-15T07:08:32.349Z","4.1.18":"2019-04-15T07:16:07.463Z","5.0.8":"2019-04-15T07:39:49.080Z","5.1.0-alpha.28":"2019-04-16T10:45:27.402Z","5.0.9":"2019-04-17T00:02:42.095Z","5.1.0-alpha.29":"2019-04-17T08:33:10.551Z","5.1.0-alpha.30":"2019-04-18T01:24:11.374Z","5.0.10":"2019-04-18T06:09:43.798Z","5.1.0-alpha.31":"2019-04-19T05:01:06.511Z","5.1.0-alpha.32":"2019-04-22T03:21:35.086Z","5.1.0-alpha.33":"2019-04-23T06:31:04.381Z","5.1.0-alpha.34":"2019-04-24T15:08:33.409Z","5.1.0-alpha.35":"2019-04-26T17:34:16.291Z","5.1.0-alpha.36":"2019-04-27T05:15:52.186Z","5.0.11":"2019-04-28T03:15:04.178Z","5.2.0-alpha.0":"2019-04-29T14:30:59.255Z","5.2.0-alpha.1":"2019-04-30T10:42:23.694Z","5.2.0-alpha.2":"2019-04-30T12:05:54.039Z","5.2.0-alpha.3":"2019-05-01T09:20:05.105Z","5.1.0-alpha.37":"2019-05-01T11:03:17.007Z","5.1.0-alpha.39":"2019-05-02T06:40:38.196Z","5.1.0-alpha.40":"2019-05-08T15:37:16.182Z","5.1.0-beta.0":"2019-05-10T08:52:03.951Z","5.2.0-alpha.4":"2019-05-11T06:25:34.670Z","5.2.0-alpha.5":"2019-05-12T09:09:02.633Z","5.2.0-alpha.6":"2019-05-14T17:20:01.583Z","5.2.0-alpha.7":"2019-05-15T09:43:52.903Z","5.2.0-alpha.8":"2019-05-15T14:00:52.908Z","5.1.0-beta.1":"2019-05-16T06:03:38.565Z","5.2.0-alpha.9":"2019-05-17T09:14:19.151Z","5.2.0-alpha.10":"2019-05-20T07:50:35.999Z","5.1.0-rc.0":"2019-05-21T11:14:37.715Z","5.2.0-alpha.11":"2019-05-21T14:00:30.037Z","5.2.0-alpha.12":"2019-05-21T15:55:25.973Z","5.2.0-alpha.13":"2019-05-25T00:17:04.269Z","5.1.0-rc.1":"2019-05-25T01:03:45.135Z","5.2.0-alpha.14":"2019-05-25T22:34:43.827Z","5.2.0-alpha.15":"2019-05-26T00:45:03.540Z","5.2.0-alpha.16":"2019-05-26T06:15:02.255Z","5.2.0-alpha.17":"2019-05-26T16:58:11.768Z","5.2.0-alpha.18":"2019-05-27T05:39:40.110Z","5.1.0-rc.2":"2019-05-27T14:20:23.220Z","5.2.0-alpha.19":"2019-05-29T04:26:08.601Z","5.1.0-rc.3":"2019-05-30T06:22:22.395Z","5.2.0-alpha.20":"2019-06-01T08:37:22.700Z","5.2.0-alpha.21":"2019-06-03T02:44:42.405Z","5.1.0-rc.4":"2019-06-03T06:42:29.571Z","5.1.0-rc.5":"2019-06-04T18:02:27.984Z","5.1.1":"2019-06-05T08:34:57.074Z","5.1.3":"2019-06-06T21:26:55.936Z","5.2.0-alpha.22":"2019-06-07T15:09:46.230Z","5.2.0-alpha.23":"2019-06-11T03:29:18.714Z","5.2.0-alpha.24":"2019-06-13T06:27:37.856Z","5.1.4":"2019-06-13T07:14:10.942Z","5.1.5":"2019-06-13T22:11:33.092Z","5.1.7":"2019-06-13T23:40:30.349Z","5.2.0-alpha.26":"2019-06-14T12:14:23.523Z","5.1.8":"2019-06-14T12:31:01.195Z","5.2.0-alpha.27":"2019-06-16T22:56:38.051Z","5.2.0-alpha.28":"2019-06-17T15:05:21.870Z","5.2.0-alpha.29":"2019-06-17T15:26:30.105Z","5.1.9":"2019-06-20T00:36:35.433Z","5.2.0-alpha.30":"2019-06-25T12:25:30.505Z","5.2.0-alpha.31":"2019-06-27T04:36:03.875Z","5.2.0-alpha.32":"2019-06-29T03:33:03.729Z","5.2.0-alpha.33":"2019-07-01T11:18:50.809Z","5.2.0-alpha.34":"2019-07-02T01:39:42.326Z","5.2.0-alpha.35":"2019-07-02T16:28:37.051Z","5.2.0-alpha.36":"2019-07-05T10:20:00.832Z","5.2.0-alpha.37":"2019-07-08T05:10:46.876Z","5.2.0-alpha.38":"2019-07-08T18:41:35.498Z","5.2.0-alpha.39":"2019-07-10T02:49:44.602Z","5.2.0-alpha.40":"2019-07-10T13:19:03.047Z","5.2.0-alpha.41":"2019-07-11T00:07:30.768Z","5.2.0-alpha.42":"2019-07-12T03:43:40.041Z","5.2.0-alpha.43":"2019-07-13T13:56:35.801Z","5.2.0-alpha.44":"2019-07-15T01:37:51.826Z","5.2.0-beta.0":"2019-07-15T12:56:47.941Z","5.2.0-beta.1":"2019-07-18T02:15:35.757Z","5.2.0-beta.2":"2019-07-18T14:27:04.686Z","5.2.0-beta.3":"2019-07-19T12:23:36.776Z","5.2.0-beta.4":"2019-07-20T04:46:56.481Z","5.2.0-beta.5":"2019-07-21T02:05:06.308Z","5.2.0-beta.6":"2019-07-22T18:10:41.770Z","5.2.0-beta.7":"2019-07-23T10:01:33.549Z","5.2.0-beta.8":"2019-07-25T10:27:36.504Z","5.2.0-beta.9":"2019-07-25T17:18:55.360Z","5.2.0-beta.10":"2019-07-26T11:53:34.517Z","5.2.0-beta.12":"2019-07-27T01:54:22.486Z","5.2.0-beta.13":"2019-07-27T08:42:43.635Z","5.2.0-beta.14":"2019-07-29T04:35:24.882Z","5.2.0-beta.15":"2019-07-29T04:51:45.580Z","5.2.0-beta.16":"2019-07-29T08:33:31.971Z","5.2.0-beta.17":"2019-07-29T11:09:07.633Z","5.2.0-beta.18":"2019-07-29T23:45:28.956Z","5.1.10":"2019-07-31T08:59:14.272Z","5.2.0-beta.19":"2019-07-31T09:23:45.309Z","5.2.0-beta.20":"2019-08-01T15:47:45.370Z","5.2.0-beta.21":"2019-08-02T16:32:53.965Z","5.2.0-beta.22":"2019-08-03T04:12:33.768Z","5.2.0-beta.23":"2019-08-05T16:42:10.696Z","5.2.0-beta.24":"2019-08-07T03:21:53.118Z","5.2.0-beta.25":"2019-08-08T02:01:56.374Z","5.2.0-beta.26":"2019-08-09T02:41:23.979Z","5.2.0-beta.28":"2019-08-10T12:46:24.665Z","5.2.0-beta.29":"2019-08-13T01:23:57.506Z","5.1.11":"2019-08-13T01:55:53.174Z","5.2.0-beta.30":"2019-08-14T08:04:48.972Z","5.2.0-beta.31":"2019-08-16T10:19:28.549Z","5.2.0-beta.32":"2019-08-17T13:47:10.427Z","5.2.0-beta.33":"2019-08-18T13:48:19.811Z","5.2.0-beta.36":"2019-08-19T19:26:37.485Z","5.2.0-beta.37":"2019-08-20T08:07:12.012Z","5.2.0-beta.38":"2019-08-20T16:11:48.040Z","5.2.0-beta.39":"2019-08-22T03:35:02.851Z","5.2.0-beta.40":"2019-08-23T14:55:49.425Z","5.2.0-beta.41":"2019-08-27T16:04:03.138Z","5.2.0-beta.42":"2019-08-27T16:31:54.005Z","5.2.0-beta.43":"2019-08-28T00:08:22.959Z","5.2.0-beta.45":"2019-08-28T12:31:45.327Z","5.2.0-beta.46":"2019-08-29T03:46:20.001Z","5.2.0-beta.47":"2019-08-29T16:52:38.180Z","5.2.0-beta.48":"2019-08-30T04:20:10.977Z","5.2.0-rc.0":"2019-08-30T06:45:16.798Z","5.2.0-rc.1":"2019-08-31T02:59:04.219Z","5.2.0-rc.2":"2019-09-01T06:00:44.623Z","5.2.0-rc.4":"2019-09-03T09:57:53.233Z","5.2.0-rc.5":"2019-09-04T02:52:43.004Z","5.2.0-rc.6":"2019-09-05T06:53:21.399Z","5.2.0-rc.8":"2019-09-07T05:24:01.247Z","5.2.0-rc.9":"2019-09-08T04:59:47.901Z","5.2.0-rc.10":"2019-09-09T22:01:23.754Z","5.2.0-rc.11":"2019-09-10T20:44:03.599Z","5.2.0":"2019-09-14T03:53:27.601Z","5.3.0-alpha.0":"2019-09-17T04:17:20.110Z","5.2.1":"2019-09-17T16:30:46.368Z","5.3.0-alpha.1":"2019-09-24T03:58:16.951Z","5.3.0-alpha.2":"2019-09-24T13:47:59.936Z","5.3.0-alpha.3":"2019-09-25T18:40:39.869Z","5.3.0-alpha.4":"2019-09-27T06:13:36.734Z","5.3.0-alpha.5":"2019-09-28T06:54:05.536Z","5.3.0-alpha.6":"2019-10-01T22:14:39.050Z","5.3.0-alpha.7":"2019-10-03T07:06:00.202Z","5.3.0-alpha.9":"2019-10-04T07:44:07.029Z","5.3.0-alpha.10":"2019-10-04T22:34:17.960Z","5.3.0-alpha.11":"2019-10-06T01:39:24.727Z","5.2.2":"2019-10-07T10:08:55.646Z","5.2.3":"2019-10-07T11:10:06.522Z","5.3.0-alpha.12":"2019-10-07T14:42:57.264Z","5.3.0-alpha.13":"2019-10-08T01:39:15.619Z","5.3.0-alpha.15":"2019-10-08T10:14:19.610Z","5.3.0-alpha.17":"2019-10-10T04:51:15.701Z","5.3.0-alpha.18":"2019-10-14T07:55:09.841Z","5.2.4":"2019-10-14T09:44:14.511Z","5.3.0-alpha.19":"2019-10-14T17:43:35.573Z","5.3.0-alpha.20":"2019-10-15T10:51:14.735Z","5.3.0-alpha.21":"2019-10-17T14:59:06.902Z","5.3.0-alpha.22":"2019-10-17T17:58:38.669Z","5.3.0-alpha.23":"2019-10-19T02:38:18.727Z","5.2.5":"2019-10-22T01:44:06.359Z","5.3.0-alpha.24":"2019-10-22T02:03:47.962Z","5.3.0-alpha.25":"2019-10-23T01:37:51.289Z","5.3.0-alpha.26":"2019-10-23T02:20:31.886Z","5.3.0-alpha.27":"2019-10-24T15:10:04.899Z","5.3.0-alpha.28":"2019-10-25T01:59:44.352Z","5.3.0-alpha.29":"2019-10-25T08:02:01.455Z","5.3.0-alpha.30":"2019-10-26T16:20:52.474Z","5.3.0-alpha.31":"2019-10-26T17:46:21.342Z","5.3.0-alpha.32":"2019-10-27T19:14:54.291Z","5.3.0-alpha.33":"2019-10-28T01:57:20.094Z","5.3.0-alpha.34":"2019-10-30T09:33:44.125Z","5.3.0-alpha.35":"2019-11-01T01:57:22.529Z","5.3.0-alpha.36":"2019-11-01T17:39:03.908Z","5.3.0-alpha.37":"2019-11-02T02:25:47.462Z","5.3.0-alpha.38":"2019-11-03T08:38:59.019Z","5.3.0-alpha.39":"2019-11-05T13:46:03.439Z","5.3.0-alpha.40":"2019-11-06T02:58:50.227Z","5.3.0-alpha.41":"2019-11-07T03:18:21.343Z","5.3.0-alpha.42":"2019-11-09T08:05:33.428Z","5.2.6":"2019-11-09T09:51:46.440Z","5.3.0-alpha.43":"2019-11-11T15:44:47.099Z","5.3.0-alpha.44":"2019-11-13T00:49:20.451Z","5.3.0-alpha.45":"2019-11-14T09:36:28.496Z","5.3.0-alpha.46":"2019-11-15T21:56:05.913Z","5.3.0-alpha.47":"2019-11-16T13:05:20.784Z","5.3.0-beta.0":"2019-11-16T15:33:55.842Z","5.3.0-beta.1":"2019-11-18T14:37:54.517Z","5.3.0-beta.2":"2019-11-19T10:29:06.929Z","5.3.0-beta.3":"2019-11-21T06:47:13.030Z","5.3.0-beta.6":"2019-11-24T08:58:09.856Z","5.3.0-beta.7":"2019-11-25T16:27:59.792Z","5.3.0-beta.8":"2019-11-26T01:05:04.184Z","5.3.0-beta.9":"2019-11-26T09:53:53.491Z","5.3.0-beta.10":"2019-11-27T01:25:49.186Z","5.3.0-beta.11":"2019-11-27T23:13:30.786Z","5.3.0-beta.12":"2019-11-28T17:10:44.328Z","5.3.0-beta.13":"2019-11-30T09:42:09.587Z","5.2.7":"2019-11-30T13:17:38.461Z","5.3.0-beta.14":"2019-12-02T03:46:56.030Z","5.2.8":"2019-12-02T06:29:49.356Z","5.3.0-beta.15":"2019-12-04T04:00:07.132Z","5.3.0-beta.16":"2019-12-05T03:43:58.495Z","5.3.0-beta.17":"2019-12-06T14:46:25.512Z","5.3.0-beta.18":"2019-12-06T15:11:06.858Z","5.3.0-beta.19":"2019-12-07T08:53:48.263Z","5.3.0-beta.20":"2019-12-09T12:56:24.345Z","5.3.0-beta.21":"2019-12-10T16:55:04.601Z","5.3.0-beta.22":"2019-12-12T15:29:47.780Z","5.3.0-beta.23":"2019-12-14T14:14:28.834Z","5.3.0-beta.25":"2019-12-15T10:13:51.816Z","5.3.0-beta.26":"2019-12-16T03:53:50.589Z","5.3.0-beta.27":"2019-12-16T04:13:19.999Z","5.3.0-beta.28":"2019-12-16T05:19:37.444Z","5.3.0-beta.29":"2019-12-16T06:50:30.688Z","5.3.0-beta.30":"2019-12-16T09:43:22.424Z","5.3.0-beta.31":"2019-12-16T13:21:37.153Z","5.3.0-rc.0":"2019-12-19T08:57:43.299Z","5.3.0-rc.1":"2019-12-23T09:24:54.244Z","5.3.0-rc.3":"2019-12-26T12:14:17.583Z","5.3.0-rc.4":"2019-12-28T13:13:11.899Z","5.3.0-rc.5":"2019-12-30T19:40:35.364Z","5.3.0-rc.6":"2019-12-31T08:29:20.860Z","5.3.0-rc.7":"2020-01-02T03:08:20.102Z","5.3.0-rc.8":"2020-01-03T08:52:27.740Z","5.3.0-rc.9":"2020-01-04T13:01:12.690Z","5.3.0-rc.10":"2020-01-06T14:35:44.348Z","5.3.0-rc.11":"2020-01-07T14:02:02.146Z","5.3.0-rc.12":"2020-01-08T14:58:37.975Z","5.3.0-rc.13":"2020-01-11T02:20:35.667Z","5.3.0-rc.14":"2020-01-11T08:52:50.183Z","5.3.0":"2020-01-11T09:35:49.672Z","5.3.1":"2020-01-12T15:38:39.505Z","5.3.2":"2020-01-13T15:38:58.035Z","5.3.3":"2020-01-14T10:00:04.487Z","5.3.4":"2020-01-16T06:24:06.513Z","5.3.5":"2020-01-16T19:34:24.769Z","5.3.6":"2020-01-17T08:16:41.939Z","5.3.7":"2020-01-20T06:58:03.270Z","6.0.0-alpha.0":"2020-01-21T14:25:19.588Z","5.3.8":"2020-01-21T16:55:05.372Z","6.0.0-alpha.1":"2020-01-23T12:24:45.158Z","5.3.9":"2020-01-24T14:15:52.343Z","6.0.0-alpha.2":"2020-01-30T13:42:31.972Z","6.0.0-alpha.3":"2020-02-02T05:53:00.430Z","5.3.10":"2020-02-02T07:05:00.958Z","6.0.0-alpha.4":"2020-02-03T15:54:23.944Z","6.0.0-alpha.5":"2020-02-04T08:57:44.325Z","5.3.11":"2020-02-04T16:01:03.697Z","5.3.12":"2020-02-04T23:23:05.236Z","6.0.0-alpha.6":"2020-02-04T23:49:12.718Z","6.0.0-alpha.7":"2020-02-07T15:52:13.493Z","6.0.0-alpha.8":"2020-02-07T16:27:48.150Z","6.0.0-alpha.9":"2020-02-08T17:30:26.462Z","6.0.0-alpha.10":"2020-02-11T14:36:16.572Z","5.3.13":"2020-02-12T03:50:08.789Z","6.0.0-alpha.11":"2020-02-13T04:12:58.101Z","6.0.0-alpha.12":"2020-02-13T17:06:54.163Z","6.0.0-alpha.13":"2020-02-15T12:48:48.602Z","6.0.0-alpha.14":"2020-02-18T23:00:49.978Z","6.0.0-alpha.15":"2020-02-20T04:02:00.981Z","6.0.0-alpha.17":"2020-02-21T04:06:59.289Z","6.0.0-alpha.18":"2020-02-21T20:39:06.596Z","6.0.0-alpha.19":"2020-02-24T14:35:46.515Z","5.3.14":"2020-02-25T15:20:40.921Z","6.0.0-alpha.20":"2020-02-27T00:33:59.400Z","6.0.0-alpha.21":"2020-03-05T09:33:21.066Z","6.0.0-alpha.22":"2020-03-10T10:52:11.545Z","6.0.0-alpha.24":"2020-03-11T09:04:25.679Z","6.0.0-alpha.25":"2020-03-11T11:01:46.102Z","6.0.0-alpha.26":"2020-03-12T13:01:18.863Z","6.0.0-alpha.27":"2020-03-13T12:37:45.993Z","5.3.15":"2020-03-14T03:38:41.974Z","5.3.17":"2020-03-14T07:48:13.237Z","6.0.0-alpha.28":"2020-03-23T06:02:36.015Z","6.0.0-alpha.29":"2020-03-26T02:46:47.078Z","6.0.0-alpha.30":"2020-03-31T11:15:07.469Z","5.3.18":"2020-03-31T13:40:38.253Z","6.0.0-alpha.31":"2020-04-07T10:26:43.619Z","6.0.0-alpha.32":"2020-04-11T08:15:14.359Z","6.0.0-alpha.33":"2020-04-13T23:58:59.579Z","6.0.0-alpha.34":"2020-04-15T09:06:24.750Z","6.0.0-alpha.35":"2020-04-15T16:14:56.495Z","6.0.0-alpha.36":"2020-04-16T00:38:56.417Z","6.0.0-alpha.37":"2020-04-16T18:50:38.344Z","6.0.0-alpha.39":"2020-04-18T11:46:19.725Z","6.0.0-alpha.40":"2020-04-20T08:19:08.577Z","6.0.0-alpha.41":"2020-04-20T23:19:18.205Z","6.0.0-alpha.42":"2020-04-23T00:20:16.528Z","6.0.0-alpha.43":"2020-04-23T22:32:19.748Z","6.0.0-alpha.44":"2020-04-27T04:14:46.845Z","6.0.0-alpha.45":"2020-04-28T03:33:02.312Z","6.0.0-alpha.46":"2020-04-29T09:05:57.321Z","6.0.0-beta.0":"2020-04-29T13:35:01.813Z","6.0.0-beta.1":"2020-05-02T14:06:35.363Z","6.0.0-beta.2":"2020-05-04T12:15:03.325Z","6.0.0-beta.3":"2020-05-07T04:57:52.580Z","6.0.0-beta.4":"2020-05-08T13:06:36.602Z","6.0.0-beta.5":"2020-05-11T08:57:56.846Z","6.0.0-beta.6":"2020-05-12T13:27:44.307Z","6.0.0-beta.7":"2020-05-15T04:16:26.451Z","6.0.0-beta.8":"2020-05-17T11:09:53.844Z","6.0.0-beta.9":"2020-05-20T23:24:23.701Z","6.0.0-beta.11":"2020-05-21T04:32:57.667Z","6.0.0-beta.12":"2020-05-21T06:05:25.314Z","6.0.0-beta.13":"2020-05-22T18:13:26.083Z","5.3.19":"2020-05-24T04:23:59.760Z","6.0.0-beta.14":"2020-05-25T13:42:29.626Z","6.0.0-beta.15":"2020-05-26T23:13:10.175Z","6.0.0-beta.16":"2020-05-27T16:29:20.035Z","6.0.0-beta.17":"2020-05-28T04:41:45.799Z","6.0.0-beta.18":"2020-05-29T15:02:14.173Z","6.0.0-beta.19":"2020-05-29T19:36:09.591Z","6.0.0-beta.20":"2020-06-01T14:13:58.577Z","6.0.0-beta.21":"2020-06-04T00:44:15.787Z","6.0.0-beta.22":"2020-06-05T19:03:53.588Z","6.0.0-beta.23":"2020-06-08T07:51:08.303Z","6.0.0-beta.24":"2020-06-11T13:03:16.774Z","6.0.0-beta.25":"2020-06-11T13:25:02.120Z","6.0.0-beta.26":"2020-06-12T09:48:03.234Z","6.0.0-beta.27":"2020-06-14T02:09:35.170Z","6.0.0-beta.28":"2020-06-15T11:01:35.420Z","6.0.0-beta.29":"2020-06-16T06:11:27.695Z","6.0.0-beta.30":"2020-06-16T14:42:37.924Z","6.0.0-beta.31":"2020-06-17T11:07:48.489Z","6.0.0-beta.32":"2020-06-19T13:33:32.651Z","6.0.0-beta.33":"2020-06-22T02:54:44.894Z","6.0.0-beta.34":"2020-06-23T15:48:55.444Z","6.0.0-beta.35":"2020-06-24T09:40:29.772Z","6.0.0-beta.36":"2020-06-25T02:18:45.233Z","6.0.0-beta.37":"2020-06-26T05:50:20.787Z","6.0.0-beta.38":"2020-06-30T15:45:12.222Z","6.0.0-beta.39":"2020-07-02T11:39:16.526Z","6.0.0-beta.40":"2020-07-03T16:25:06.476Z","6.0.0-beta.41":"2020-07-04T07:22:23.633Z","6.0.0-beta.42":"2020-07-05T04:17:13.481Z","6.0.0-beta.43":"2020-07-05T10:42:13.479Z","6.0.0-beta.44":"2020-07-06T14:28:55.506Z","6.0.0-beta.45":"2020-07-07T13:05:28.398Z","6.0.0-beta.46":"2020-07-08T08:54:36.501Z","6.0.0-rc.0":"2020-07-08T10:54:18.037Z","6.0.0-rc.1":"2020-07-09T07:26:38.016Z","6.0.0-rc.2":"2020-07-10T14:09:25.751Z","6.0.0-rc.3":"2020-07-11T08:34:15.739Z","6.0.0-rc.5":"2020-07-15T12:49:32.060Z","6.0.0-rc.8":"2020-07-16T11:54:29.683Z","6.0.0-rc.9":"2020-07-17T14:42:05.855Z","6.0.0-rc.10":"2020-07-18T14:07:35.805Z","6.0.0-rc.11":"2020-07-19T09:08:49.576Z","6.0.0-rc.12":"2020-07-20T12:36:32.452Z","6.0.0-rc.13":"2020-07-21T10:30:15.886Z","6.0.0-rc.14":"2020-07-22T15:55:07.188Z","6.0.0-rc.15":"2020-07-27T05:00:59.366Z","6.0.0-rc.16":"2020-07-28T14:29:28.452Z","6.0.0-rc.18":"2020-07-29T17:29:09.339Z","6.0.0-rc.19":"2020-07-30T16:36:53.422Z","6.0.0-rc.20":"2020-07-31T06:31:44.353Z","6.0.0-rc.21":"2020-08-01T13:53:10.644Z","6.0.0-rc.22":"2020-08-02T14:37:25.853Z","6.0.0-rc.23":"2020-08-03T03:37:10.768Z","6.0.0-rc.24":"2020-08-03T13:36:01.813Z","6.0.0-rc.25":"2020-08-04T06:46:54.004Z","6.0.0-rc.26":"2020-08-04T16:38:18.935Z","6.0.0-rc.27":"2020-08-05T18:04:06.627Z","6.0.0-rc.28":"2020-08-06T14:57:39.235Z","6.0.0-rc.29":"2020-08-07T11:41:18.476Z","6.0.0-rc.30":"2020-08-10T09:35:01.079Z","6.0.0":"2020-08-11T06:42:47.957Z","6.0.1":"2020-08-11T11:42:43.034Z","6.0.2":"2020-08-11T15:12:21.595Z","6.0.3":"2020-08-12T01:40:53.753Z","6.0.4":"2020-08-12T09:19:54.036Z","6.0.5":"2020-08-12T18:05:57.585Z","6.0.6":"2020-08-13T17:28:51.228Z","6.0.7":"2020-08-14T10:02:09.567Z","6.0.9":"2020-08-15T07:27:44.808Z","6.0.10":"2020-08-15T09:18:11.527Z","6.0.11":"2020-08-17T14:19:54.509Z","6.0.12":"2020-08-17T14:38:13.684Z","6.0.13":"2020-08-19T09:09:51.696Z","6.0.14":"2020-08-20T08:12:40.146Z","6.0.15":"2020-08-20T10:52:53.304Z","6.0.16":"2020-08-20T14:14:30.958Z","6.0.17":"2020-08-25T00:05:51.461Z","6.0.18":"2020-08-25T16:40:17.128Z","5.3.20":"2020-08-26T17:00:47.004Z","6.0.19":"2020-08-26T17:23:02.608Z","5.3.21":"2020-08-28T00:13:21.348Z","6.0.20":"2020-08-28T00:44:49.474Z","6.0.21":"2020-08-31T12:13:58.145Z","6.1.0-alpha.0":"2020-08-31T12:56:31.278Z","6.1.0-alpha.1":"2020-08-31T14:27:45.176Z","6.1.0-alpha.3":"2020-09-03T14:04:09.812Z","6.1.0-alpha.4":"2020-09-08T10:52:26.535Z","6.1.0-alpha.6":"2020-09-10T00:33:12.287Z","6.1.0-alpha.7":"2020-09-10T15:41:32.036Z","6.1.0-alpha.8":"2020-09-11T16:46:47.991Z","6.1.0-alpha.9":"2020-09-12T17:44:26.150Z","6.1.0-alpha.10":"2020-09-16T04:56:39.229Z","6.1.0-alpha.11":"2020-09-19T15:31:45.490Z","6.1.0-alpha.12":"2020-09-20T16:25:47.452Z","6.1.0-alpha.14":"2020-09-21T17:03:11.425Z","6.1.0-alpha.15":"2020-09-24T12:54:03.272Z","6.1.0-alpha.16":"2020-09-25T09:36:08.419Z","6.0.22":"2020-09-26T05:13:58.133Z","6.1.0-alpha.17":"2020-09-26T12:05:17.587Z","6.1.0-alpha.18":"2020-09-30T11:02:04.136Z","6.1.0-alpha.19":"2020-10-03T13:50:59.334Z","6.0.23":"2020-10-03T18:05:00.707Z","6.0.24":"2020-10-03T18:17:03.192Z","6.0.25":"2020-10-03T18:25:13.808Z","6.1.0-alpha.20":"2020-10-05T05:17:58.673Z","6.0.26":"2020-10-05T07:32:30.547Z","6.1.0-alpha.21":"2020-10-08T15:24:45.779Z","6.1.0-alpha.22":"2020-10-10T02:28:06.269Z","6.1.0-alpha.23":"2020-10-12T11:44:33.337Z","6.1.0-alpha.24":"2020-10-15T14:50:54.570Z","6.1.0-alpha.25":"2020-10-16T13:11:08.530Z","6.1.0-alpha.26":"2020-10-18T10:40:16.655Z","6.1.0-alpha.27":"2020-10-19T10:49:01.979Z","6.1.0-alpha.28":"2020-10-23T07:33:37.809Z","6.0.27":"2020-10-23T10:21:35.392Z","6.1.0-alpha.29":"2020-10-23T10:44:44.718Z","6.1.0-alpha.30":"2020-10-26T15:42:00.875Z","6.1.0-alpha.31":"2020-10-27T11:18:14.705Z","6.0.28-alpha.0":"2020-10-28T01:11:34.022Z","6.0.28-alpha.1":"2020-10-29T01:36:26.609Z","6.0.28-alpha.2":"2020-10-29T01:58:14.086Z","6.0.28-alpha.3":"2020-10-29T02:29:38.946Z","6.1.0-alpha.32":"2020-10-30T04:17:52.846Z","6.0.28":"2020-10-30T11:13:42.118Z","6.1.0-alpha.33":"2020-10-30T15:52:17.189Z","6.1.0-alpha.34":"2020-11-01T07:14:51.222Z","6.1.0-alpha.35":"2020-11-02T06:46:30.201Z","6.1.0-beta.0":"2020-11-02T18:31:35.249Z","6.1.0-beta.1":"2020-11-03T07:30:29.275Z","6.1.0-beta.2":"2020-11-04T09:07:22.430Z","6.1.0-beta.3":"2020-11-06T01:08:04.817Z","6.1.0-beta.4":"2020-11-06T13:39:35.384Z","6.1.0-beta.5":"2020-11-07T16:31:39.613Z","6.1.0-beta.6":"2020-11-09T15:09:11.868Z","6.1.0-beta.7":"2020-11-10T23:43:18.677Z","6.1.0-rc.0":"2020-11-12T10:26:43.469Z","6.1.0-rc.1":"2020-11-13T00:35:41.409Z","6.1.0-rc.2":"2020-11-13T08:44:02.353Z","6.1.0-rc.3":"2020-11-16T09:13:30.785Z","6.1.0-rc.4":"2020-11-16T23:09:08.815Z","6.1.0-rc.5":"2020-11-18T19:18:46.782Z","6.1.0-rc.6":"2020-11-19T01:55:32.284Z","6.1.0":"2020-11-19T02:24:35.553Z","6.1.1":"2020-11-19T17:17:09.236Z","6.1.2":"2020-11-21T05:50:42.805Z","6.1.3":"2020-11-23T15:49:03.658Z","6.1.4":"2020-11-23T23:58:31.981Z","6.1.5":"2020-11-24T09:21:10.239Z","6.1.6":"2020-11-25T00:20:20.237Z","6.1.7":"2020-11-26T17:15:36.240Z","6.1.8":"2020-11-27T14:28:51.726Z","6.1.9":"2020-11-29T13:00:09.229Z","6.2.0-alpha.0":"2020-12-01T03:49:10.998Z","6.2.0-alpha.1":"2020-12-01T13:27:47.257Z","6.2.0-alpha.2":"2020-12-03T07:37:27.946Z","6.1.10":"2020-12-04T03:03:44.195Z","6.2.0-alpha.3":"2020-12-04T06:51:40.923Z","6.2.0-alpha.4":"2020-12-06T05:28:52.888Z","6.2.0-alpha.5":"2020-12-08T04:56:59.205Z","6.2.0-alpha.6":"2020-12-12T03:36:26.222Z","6.1.11":"2020-12-12T12:30:35.993Z","6.2.0-alpha.7":"2020-12-15T14:52:20.649Z","6.2.0-alpha.8":"2020-12-16T14:44:45.174Z","6.2.0-alpha.9":"2020-12-20T12:01:39.560Z","6.2.0-alpha.10":"2020-12-28T03:54:36.055Z","6.2.0-alpha.11":"2021-01-11T10:52:13.376Z","6.2.0-alpha.12":"2021-01-11T18:49:56.410Z","6.1.12":"2021-01-11T23:39:54.489Z","6.1.14":"2021-01-12T11:30:08.299Z","6.2.0-alpha.13":"2021-01-13T10:12:22.599Z","6.2.0-alpha.14":"2021-01-14T00:27:13.379Z","6.2.0-alpha.15":"2021-01-15T06:27:56.386Z","6.2.0-alpha.16":"2021-01-16T00:55:22.552Z","6.2.0-alpha.17":"2021-01-22T04:41:00.527Z","6.2.0-alpha.18":"2021-01-22T13:22:51.034Z","6.1.15":"2021-01-22T14:31:34.181Z","6.2.0-alpha.19":"2021-01-29T00:51:31.039Z","6.2.0-alpha.20":"2021-02-02T01:44:30.539Z","6.1.16":"2021-02-02T02:21:44.703Z","6.2.0-alpha.21":"2021-02-04T08:11:52.238Z","6.1.17":"2021-02-04T16:00:58.337Z","6.2.0-alpha.22":"2021-02-04T22:32:27.276Z","6.2.0-alpha.23":"2021-02-05T06:55:05.695Z","6.2.0-alpha.24":"2021-02-06T01:48:30.814Z","6.2.0-alpha.25":"2021-02-11T01:27:56.943Z","6.2.0-alpha.26":"2021-02-13T03:28:35.400Z","6.1.18":"2021-02-14T17:04:45.255Z","6.2.0-alpha.27":"2021-02-14T17:23:56.561Z","6.2.0-alpha.28":"2021-02-15T06:36:18.286Z","6.2.0-alpha.29":"2021-02-17T22:16:54.908Z","6.2.0-alpha.30":"2021-02-20T12:08:53.443Z","6.2.0-alpha.31":"2021-02-20T13:46:18.686Z","6.2.0-alpha.32":"2021-02-21T08:53:42.707Z","6.2.0-alpha.33":"2021-02-22T01:47:34.286Z","6.2.0-alpha.34":"2021-02-22T09:13:13.820Z","6.2.0-alpha.35":"2021-02-22T14:41:13.689Z","6.2.0-beta.0":"2021-02-22T15:44:22.124Z","6.1.19":"2021-02-23T03:20:40.626Z","6.2.0-beta.1":"2021-02-23T03:47:01.070Z","6.1.20":"2021-02-24T04:46:11.227Z","6.2.0-beta.2":"2021-02-24T05:04:45.504Z","6.2.0-beta.3":"2021-02-25T03:28:39.692Z","6.2.0-beta.4":"2021-02-26T13:08:26.816Z","6.2.0-beta.5":"2021-03-01T15:27:47.064Z","6.2.0-beta.6":"2021-03-03T11:04:47.324Z","6.1.21":"2021-03-03T11:37:53.012Z","6.2.0-beta.8":"2021-03-04T00:00:43.392Z","6.2.0-beta.9":"2021-03-04T11:07:46.644Z","6.2.0-beta.10":"2021-03-05T09:56:36.913Z","6.2.0-beta.11":"2021-03-08T16:50:17.466Z","6.2.0-beta.12":"2021-03-09T23:27:25.158Z","6.2.0-beta.13":"2021-03-10T22:34:08.789Z","6.2.0-beta.14":"2021-03-11T14:04:37.157Z","6.2.0-beta.15":"2021-03-15T11:22:57.153Z","6.2.0-rc.0":"2021-03-15T15:06:25.328Z","6.2.0-rc.1":"2021-03-16T14:54:16.160Z","6.2.0-rc.2":"2021-03-17T10:05:51.089Z","6.2.0-rc.3":"2021-03-18T14:07:13.713Z","6.2.0-rc.4":"2021-03-19T05:41:02.739Z","6.2.0-rc.5":"2021-03-20T08:56:01.586Z","6.2.0-rc.6":"2021-03-20T16:27:14.771Z","6.2.0-rc.7":"2021-03-22T16:24:55.649Z","6.2.0-rc.8":"2021-03-23T02:11:11.271Z","6.2.0-rc.9":"2021-03-24T16:48:00.018Z","6.2.0-rc.10":"2021-03-26T08:01:03.492Z","6.2.0-rc.11":"2021-03-29T08:37:17.759Z","6.2.0-rc.12":"2021-03-30T02:52:00.062Z","6.2.0-rc.13":"2021-03-30T10:50:50.086Z","6.2.0":"2021-03-30T16:03:51.400Z","6.2.1":"2021-03-31T04:07:03.259Z","6.2.2":"2021-04-02T09:53:23.307Z","6.2.3":"2021-04-05T14:31:28.365Z","6.2.4":"2021-04-07T04:07:48.115Z","6.2.5":"2021-04-07T10:39:32.644Z","6.3.0-alpha.0":"2021-04-08T09:58:58.838Z","6.3.0-alpha.1":"2021-04-08T16:28:46.942Z","6.2.6":"2021-04-09T02:22:28.016Z","6.3.0-alpha.2":"2021-04-09T05:10:05.684Z","6.2.7":"2021-04-09T05:37:48.907Z","6.3.0-alpha.3":"2021-04-10T04:39:46.756Z","6.3.0-alpha.4":"2021-04-10T12:50:26.498Z","6.3.0-alpha.5":"2021-04-11T15:43:18.919Z","6.3.0-alpha.6":"2021-04-13T08:34:25.144Z","6.3.0-alpha.7":"2021-04-14T02:22:47.699Z","6.2.8":"2021-04-14T02:46:17.867Z","6.3.0-alpha.8":"2021-04-15T14:26:40.122Z","6.3.0-alpha.9":"2021-04-16T16:47:39.412Z","6.3.0-alpha.10":"2021-04-18T13:21:34.065Z","6.3.0-alpha.11":"2021-04-19T14:19:41.133Z","6.3.0-alpha.12":"2021-04-19T18:02:00.035Z","6.3.0-alpha.13":"2021-04-21T02:45:02.215Z","6.3.0-alpha.14":"2021-04-23T02:17:39.758Z","6.2.9":"2021-04-23T03:06:24.114Z","6.3.0-alpha.15":"2021-04-27T17:35:27.368Z","6.3.0-alpha.16":"2021-04-29T03:43:15.371Z","6.3.0-alpha.17":"2021-04-30T06:29:53.304Z","6.3.0-alpha.18":"2021-05-02T16:08:31.697Z","6.3.0-alpha.19":"2021-05-03T11:05:34.259Z","6.3.0-alpha.20":"2021-05-06T13:52:26.706Z","6.3.0-alpha.21":"2021-05-07T06:04:24.523Z","6.3.0-alpha.22":"2021-05-10T13:52:05.708Z","6.3.0-alpha.23":"2021-05-11T06:30:27.192Z","6.3.0-alpha.24":"2021-05-11T07:56:02.714Z","6.3.0-alpha.25":"2021-05-13T04:57:45.099Z","6.3.0-alpha.26":"2021-05-14T03:00:52.793Z","6.3.0-alpha.27":"2021-05-14T09:44:22.165Z","6.3.0-alpha.28":"2021-05-15T00:49:18.251Z","6.3.0-alpha.29":"2021-05-17T14:59:09.932Z","6.3.0-alpha.30":"2021-05-18T04:06:09.883Z","6.3.0-alpha.31":"2021-05-18T07:22:49.487Z","6.3.0-alpha.33":"2021-05-18T11:18:34.598Z","6.3.0-alpha.34":"2021-05-19T01:45:01.453Z","6.3.0-alpha.35":"2021-05-20T10:44:22.848Z","6.3.0-alpha.36":"2021-05-20T13:28:03.099Z","6.3.0-alpha.37":"2021-05-23T02:55:18.277Z","6.3.0-alpha.38":"2021-05-23T03:31:59.665Z","6.3.0-alpha.39":"2021-05-23T14:00:54.467Z","6.3.0-alpha.41":"2021-05-24T06:54:34.242Z","6.3.0-alpha.42":"2021-05-24T13:37:50.784Z","6.3.0-alpha.43":"2021-05-25T02:30:40.291Z","6.3.0-alpha.44":"2021-05-25T09:45:37.528Z","6.3.0-alpha.45":"2021-05-25T16:48:58.911Z","6.3.0-beta.0":"2021-05-26T02:54:56.027Z","6.3.0-beta.1":"2021-05-26T11:19:51.750Z","6.3.0-beta.2":"2021-05-27T12:18:19.424Z","6.3.0-beta.4":"2021-05-28T08:34:43.701Z","6.3.0-beta.5":"2021-05-30T05:08:38.689Z","6.3.0-beta.6":"2021-06-01T09:57:07.455Z","6.3.0-beta.7":"2021-06-01T16:37:54.236Z","6.3.0-beta.8":"2021-06-02T12:44:20.522Z","6.3.0-beta.9":"2021-06-02T19:32:12.581Z","6.3.0-beta.10":"2021-06-03T09:30:25.700Z","6.3.0-beta.11":"2021-06-04T14:24:09.945Z","6.3.0-beta.12":"2021-06-05T03:25:34.602Z","6.3.0-beta.13":"2021-06-06T05:30:12.167Z","6.3.0-beta.14":"2021-06-06T15:42:48.657Z","6.3.0-beta.15":"2021-06-07T11:46:28.702Z","6.3.0-beta.16":"2021-06-07T18:38:34.148Z","6.3.0-beta.17":"2021-06-08T04:35:49.151Z","6.3.0-beta.18":"2021-06-08T18:28:45.099Z","6.3.0-rc.0":"2021-06-09T03:41:29.109Z","6.3.0-rc.1":"2021-06-10T03:23:17.239Z","6.3.0-rc.2":"2021-06-10T12:41:20.394Z","6.3.0-rc.3":"2021-06-11T12:17:32.282Z","6.3.0-rc.4":"2021-06-11T17:27:25.142Z","6.3.0-rc.5":"2021-06-14T13:22:05.802Z","6.3.0-rc.6":"2021-06-15T04:40:57.330Z","6.3.0-rc.7":"2021-06-15T09:32:48.454Z","6.3.0-rc.8":"2021-06-16T15:51:29.151Z","6.3.0-rc.9":"2021-06-17T11:12:55.944Z","6.3.0-rc.10":"2021-06-17T13:28:04.098Z","6.3.0-rc.11":"2021-06-18T06:09:21.164Z","6.3.0-rc.12":"2021-06-23T05:45:26.235Z","6.3.0":"2021-06-23T09:07:35.090Z","6.4.0-alpha.0":"2021-06-24T06:45:54.837Z","6.4.0-alpha.1":"2021-06-25T01:26:32.276Z","6.4.0-alpha.2":"2021-06-25T15:34:51.257Z","6.4.0-alpha.3":"2021-06-26T08:39:30.369Z","6.4.0-alpha.4":"2021-06-28T07:44:02.631Z","6.3.1":"2021-06-28T08:54:54.282Z","6.4.0-alpha.5":"2021-06-28T18:31:53.670Z","6.4.0-alpha.6":"2021-06-29T08:42:58.069Z","6.4.0-alpha.7":"2021-06-29T16:04:36.618Z","6.4.0-alpha.8":"2021-06-30T08:26:56.868Z","6.4.0-alpha.9":"2021-06-30T09:23:20.180Z","6.3.2":"2021-06-30T11:41:58.434Z","6.4.0-alpha.10":"2021-07-02T11:44:47.130Z","6.4.0-alpha.11":"2021-07-02T19:41:59.422Z","6.4.0-alpha.12":"2021-07-07T10:14:17.188Z","6.3.3":"2021-07-07T15:26:34.339Z","6.3.4":"2021-07-08T14:57:28.068Z","6.4.0-alpha.13":"2021-07-09T07:36:06.977Z","6.4.0-alpha.14":"2021-07-10T19:13:14.914Z","6.4.0-alpha.15":"2021-07-13T02:27:45.799Z","6.4.0-alpha.16":"2021-07-13T15:37:11.687Z","6.4.0-alpha.17":"2021-07-15T12:59:02.277Z","6.4.0-alpha.18":"2021-07-16T07:04:17.783Z","6.4.0-alpha.19":"2021-07-22T13:22:21.944Z","6.3.5":"2021-07-22T13:49:23.954Z","6.4.0-alpha.20":"2021-07-23T17:09:02.595Z","6.4.0-alpha.21":"2021-07-26T01:51:04.355Z","6.3.6":"2021-07-26T06:50:33.855Z","6.4.0-alpha.22":"2021-07-28T02:39:40.480Z","6.4.0-alpha.23":"2021-08-03T13:57:39.681Z","6.4.0-alpha.24":"2021-08-04T14:24:35.308Z","6.4.0-alpha.25":"2021-08-07T16:47:11.688Z","6.4.0-alpha.26":"2021-08-09T11:12:32.983Z","6.4.0-alpha.27":"2021-08-09T16:53:55.636Z","6.3.7":"2021-08-09T17:30:26.089Z","6.4.0-alpha.28":"2021-08-09T17:56:47.881Z","6.4.0-alpha.29":"2021-08-10T14:14:26.666Z","6.4.0-alpha.30":"2021-08-14T05:15:57.828Z","6.4.0-alpha.31":"2021-08-23T03:14:55.488Z","6.4.0-alpha.32":"2021-08-24T00:59:52.683Z","6.4.0-alpha.33":"2021-08-31T17:06:47.667Z","6.3.8":"2021-09-03T17:25:08.680Z","6.4.0-alpha.34":"2021-09-07T10:44:34.612Z","6.4.0-alpha.35":"2021-09-14T09:27:36.509Z","6.4.0-alpha.36":"2021-09-15T00:43:10.226Z","6.4.0-alpha.37":"2021-09-16T01:14:56.580Z","6.4.0-alpha.38":"2021-09-16T14:07:59.243Z","6.4.0-alpha.39":"2021-09-18T09:28:38.710Z","6.4.0-alpha.40":"2021-09-20T12:12:33.959Z","6.4.0-alpha.41":"2021-09-21T17:08:30.286Z","6.4.0-beta.0":"2021-09-21T23:39:19.373Z","6.4.0-beta.1":"2021-09-25T22:08:12.201Z","6.4.0-beta.2":"2021-10-01T02:06:16.883Z","6.4.0-beta.3":"2021-10-01T15:23:37.065Z","6.3.9":"2021-10-01T16:09:09.493Z","6.4.0-beta.4":"2021-10-04T17:27:48.011Z","6.4.0-beta.5":"2021-10-06T14:09:13.457Z","6.3.10":"2021-10-06T16:01:19.577Z","6.4.0-beta.6":"2021-10-07T06:23:13.242Z","6.4.0-beta.7":"2021-10-08T09:37:13.519Z","6.4.0-beta.8":"2021-10-11T14:52:24.675Z","6.4.0-beta.9":"2021-10-12T07:40:17.289Z","6.3.11":"2021-10-12T14:55:02.003Z","6.4.0-beta.10":"2021-10-13T05:36:55.645Z","6.4.0-beta.11":"2021-10-14T03:43:26.301Z","6.3.12":"2021-10-14T07:10:00.697Z","6.4.0-beta.12":"2021-10-15T08:51:13.622Z","6.4.0-beta.13":"2021-10-18T06:13:40.133Z","6.4.0-beta.14":"2021-10-18T17:16:06.962Z","6.4.0-beta.15":"2021-10-19T14:26:18.420Z","6.4.0-beta.16":"2021-10-20T15:59:03.785Z","6.4.0-beta.17":"2021-10-21T05:42:10.893Z","6.4.0-beta.18":"2021-10-21T11:00:06.018Z","6.4.0-beta.19":"2021-10-22T06:34:59.719Z","6.4.0-beta.20":"2021-10-25T19:01:00.217Z","6.4.0-beta.21":"2021-10-27T17:20:49.366Z","6.4.0-beta.22":"2021-10-28T16:09:28.540Z","6.4.0-beta.23":"2021-10-29T14:57:25.728Z","6.4.0-beta.24":"2021-11-02T03:56:17.513Z","6.4.0-beta.25":"2021-11-02T06:23:46.288Z","6.4.0-beta.26":"2021-11-02T14:00:13.426Z","6.4.0-beta.27":"2021-11-04T10:36:04.642Z","6.4.0-beta.28":"2021-11-04T17:41:51.886Z","6.4.0-beta.29":"2021-11-05T18:18:04.979Z","6.4.0-beta.30":"2021-11-08T15:37:26.283Z","6.4.0-beta.31":"2021-11-09T18:56:41.140Z","6.4.0-beta.32":"2021-11-11T17:16:22.191Z","6.4.0-beta.33":"2021-11-12T14:01:39.385Z","6.4.0-rc.0":"2021-11-12T15:34:41.962Z","6.4.0-rc.1":"2021-11-12T19:29:10.422Z","6.4.0-rc.2":"2021-11-15T17:29:42.032Z","6.4.0-rc.3":"2021-11-16T14:12:37.390Z","6.4.0-rc.4":"2021-11-19T07:39:36.765Z","6.4.0-rc.5":"2021-11-19T13:00:30.759Z","6.4.0-rc.6":"2021-11-22T07:59:47.344Z","6.4.0-rc.7":"2021-11-24T00:24:19.446Z","6.4.0-rc.8":"2021-11-25T09:34:02.999Z","6.4.0-rc.9":"2021-11-26T02:51:31.310Z","6.4.0-rc.10":"2021-11-26T07:32:10.094Z","6.4.0-rc.11":"2021-11-26T09:26:56.211Z","6.4.0":"2021-11-26T16:18:42.617Z","6.4.1":"2021-11-30T00:35:58.301Z","6.4.2":"2021-12-01T04:26:27.281Z","6.4.3":"2021-12-01T06:43:36.822Z","6.4.4":"2021-12-01T23:31:05.787Z","6.5.0-alpha.1":"2021-12-02T17:33:09.104Z","6.4.5":"2021-12-03T08:11:49.271Z","6.4.7":"2021-12-03T15:29:26.770Z","6.4.8":"2021-12-06T06:27:11.994Z","6.4.9":"2021-12-09T02:19:18.828Z","6.5.0-alpha.2":"2021-12-09T02:42:19.641Z","6.5.0-alpha.3":"2021-12-09T06:33:17.292Z","6.5.0-alpha.4":"2021-12-18T04:16:22.036Z","6.5.0-alpha.5":"2021-12-23T08:58:03.568Z","6.5.0-alpha.6":"2022-01-03T16:05:00.356Z","6.5.0-alpha.7":"2022-01-04T12:21:44.832Z","6.5.0-alpha.9":"2022-01-05T17:51:12.867Z","6.5.0-alpha.10":"2022-01-06T15:38:37.303Z","6.5.0-alpha.11":"2022-01-08T08:21:43.841Z","6.5.0-alpha.12":"2022-01-10T01:42:35.834Z","6.4.10":"2022-01-10T02:51:42.644Z","6.3.13":"2022-01-10T04:39:22.792Z","6.5.0-alpha.13":"2022-01-10T17:23:06.054Z","6.5.0-alpha.14":"2022-01-11T15:38:23.654Z","6.4.12":"2022-01-11T16:18:22.038Z","6.5.0-alpha.15":"2022-01-12T11:01:18.509Z","6.5.0-alpha.16":"2022-01-13T11:52:35.694Z","6.5.0-alpha.17":"2022-01-14T11:39:42.632Z","6.4.13":"2022-01-15T04:12:38.199Z","6.5.0-alpha.18":"2022-01-16T16:06:08.036Z","6.5.0-alpha.19":"2022-01-17T12:01:14.663Z","6.5.0-alpha.20":"2022-01-18T15:29:17.314Z","6.5.0-alpha.21":"2022-01-18T15:50:21.306Z","6.5.0-alpha.22":"2022-01-20T10:42:04.740Z","6.4.14":"2022-01-21T09:57:27.842Z","6.5.0-alpha.23":"2022-01-24T16:25:40.595Z","6.5.0-alpha.24":"2022-01-28T03:31:22.560Z","6.4.15":"2022-01-28T05:53:33.276Z","6.5.0-alpha.25":"2022-01-28T11:08:12.994Z","6.5.0-alpha.26":"2022-01-28T12:19:35.102Z","6.5.0-alpha.27":"2022-01-29T07:05:10.432Z","6.4.16":"2022-01-29T07:31:15.230Z","6.5.0-alpha.28":"2022-01-29T15:37:31.134Z","6.4.17":"2022-01-31T02:13:19.871Z","6.5.0-alpha.29":"2022-01-31T02:35:20.356Z","6.5.0-alpha.30":"2022-01-31T07:48:26.518Z","6.5.0-alpha.31":"2022-02-01T13:27:39.920Z","6.5.0-alpha.32":"2022-02-01T14:47:05.039Z","6.5.0-alpha.33":"2022-02-01T15:45:53.734Z","6.5.0-alpha.34":"2022-02-02T11:49:14.770Z","6.4.18":"2022-02-02T12:40:27.892Z","6.5.0-alpha.35":"2022-02-04T13:52:35.718Z","6.5.0-alpha.36":"2022-02-04T15:08:57.890Z","6.5.0-alpha.38":"2022-02-08T08:57:16.259Z","6.5.0-alpha.39":"2022-02-11T05:05:22.922Z","6.4.19":"2022-02-12T10:07:15.219Z","6.5.0-alpha.40":"2022-02-19T01:34:40.120Z","6.5.0-alpha.41":"2022-02-22T09:17:02.997Z","6.5.0-alpha.42":"2022-02-24T18:38:15.986Z","6.5.0-alpha.43":"2022-02-28T09:32:27.644Z","6.5.0-alpha.44":"2022-02-28T12:30:41.441Z","6.5.0-alpha.45":"2022-03-01T17:59:36.979Z","6.5.0-alpha.46":"2022-03-05T16:11:38.383Z","6.5.0-alpha.47":"2022-03-09T16:35:57.233Z","6.5.0-alpha.48":"2022-03-14T03:38:33.017Z","6.5.0-alpha.49":"2022-03-17T08:27:03.544Z","6.5.0-alpha.50":"2022-03-23T07:37:16.720Z","6.5.0-alpha.51":"2022-03-25T16:11:58.783Z","6.5.0-alpha.52":"2022-03-31T05:36:03.511Z","6.5.0-alpha.53":"2022-04-01T03:28:47.399Z","6.4.20":"2022-04-01T06:44:38.054Z","6.5.0-alpha.54":"2022-04-01T13:01:43.999Z","6.5.0-alpha.55":"2022-04-03T04:10:03.252Z","6.5.0-alpha.56":"2022-04-05T16:18:01.948Z","6.5.0-alpha.57":"2022-04-06T02:29:14.607Z","6.5.0-alpha.58":"2022-04-07T03:35:25.902Z","6.5.0-alpha.59":"2022-04-07T09:08:09.961Z","6.5.0-alpha.60":"2022-04-08T18:32:17.202Z","6.4.21":"2022-04-09T02:10:20.879Z","6.5.0-alpha.61":"2022-04-11T16:16:14.778Z","6.5.0-alpha.62":"2022-04-13T01:25:39.763Z","6.4.22":"2022-04-14T04:47:31.865Z","6.5.0-alpha.63":"2022-04-14T08:53:50.765Z","6.5.0-alpha.64":"2022-04-18T02:27:07.258Z","6.5.0-beta.0":"2022-04-24T06:18:11.423Z","6.5.0-beta.1":"2022-04-28T02:57:22.369Z","6.5.0-beta.2":"2022-05-03T11:18:04.774Z","6.5.0-beta.3":"2022-05-03T17:50:01.584Z","6.5.0-beta.4":"2022-05-04T02:16:57.744Z","6.5.0-beta.5":"2022-05-04T12:11:40.799Z","6.5.0-beta.6":"2022-05-05T17:29:41.375Z","6.5.0-beta.7":"2022-05-09T02:52:50.552Z","6.5.0-beta.8":"2022-05-10T18:54:15.988Z","6.5.0-rc.0":"2022-05-17T09:56:14.906Z","6.5.0-rc.1":"2022-05-18T14:53:36.353Z","6.5.0":"2022-05-18T16:28:42.924Z","6.5.2":"2022-05-19T13:13:47.363Z","6.5.3":"2022-05-19T15:24:32.121Z","6.5.4-alpha.0":"2022-05-20T10:57:43.573Z","6.5.4":"2022-05-23T01:37:18.964Z","6.5.5-alpha.0":"2022-05-23T17:42:15.085Z","6.5.5-alpha.2":"2022-05-23T18:29:06.026Z","6.5.5-alpha.3":"2022-05-24T11:22:08.474Z","6.5.5":"2022-05-24T14:41:35.072Z","6.5.6-alpha.0":"2022-05-27T18:25:31.807Z","6.5.6":"2022-05-30T00:08:17.885Z","6.5.7-alpha.0":"2022-06-03T18:11:09.097Z","6.5.7":"2022-06-06T02:20:33.363Z","7.0.0-alpha.0":"2022-06-06T17:01:35.171Z","7.0.0-alpha.1":"2022-06-06T18:07:33.924Z","6.5.8-alpha.0":"2022-06-07T07:10:10.980Z","6.5.8":"2022-06-08T18:06:51.359Z","6.5.9-alpha.0":"2022-06-12T06:45:26.989Z","6.5.9-alpha.1":"2022-06-12T23:11:48.063Z","6.5.9-alpha.2":"2022-06-13T17:49:10.619Z","6.5.9":"2022-06-13T18:46:08.786Z","7.0.0-alpha.2":"2022-06-15T01:13:20.463Z","7.0.0-alpha.3":"2022-06-16T16:39:19.195Z","7.0.0-alpha.4":"2022-06-19T10:05:07.468Z","7.0.0-alpha.5":"2022-06-20T13:46:17.788Z","7.0.0-alpha.6":"2022-06-21T15:32:03.957Z","7.0.0-alpha.7":"2022-06-29T11:31:27.908Z","7.0.0-alpha.8":"2022-06-29T15:57:18.962Z","7.0.0-alpha.10":"2022-07-02T17:57:13.016Z","7.0.0-alpha.11":"2022-07-06T16:06:01.011Z","7.0.0-alpha.12":"2022-07-08T15:44:06.314Z","7.0.0-alpha.13":"2022-07-12T06:25:39.370Z","7.0.0-alpha.16":"2022-07-25T12:40:18.461Z","6.5.10-alpha.0":"2022-07-26T17:55:57.147Z","7.0.0-alpha.17":"2022-07-27T17:52:33.577Z","7.0.0-alpha.18":"2022-08-02T22:19:50.716Z","6.5.10-alpha.1":"2022-08-02T23:18:23.767Z","6.5.10":"2022-08-03T23:55:24.200Z","7.0.0-alpha.19":"2022-08-12T04:11:46.084Z","7.0.0-alpha.20":"2022-08-15T19:39:10.865Z","7.0.0-alpha.21":"2022-08-17T02:26:42.013Z","6.5.11-alpha.0":"2022-08-17T14:38:32.220Z","7.0.0-alpha.22":"2022-08-18T11:49:40.129Z","7.0.0-alpha.23":"2022-08-18T12:32:06.338Z","6.5.11-alpha.1":"2022-08-22T23:41:29.335Z","7.0.0-alpha.24":"2022-08-24T03:53:48.552Z","7.0.0-alpha.25":"2022-08-25T14:46:17.452Z","7.0.0-alpha.26":"2022-08-26T11:13:13.373Z","7.0.0-alpha.27":"2022-08-31T02:59:28.475Z","7.0.0-alpha.28":"2022-09-01T16:52:40.564Z","7.0.0-alpha.29":"2022-09-02T16:05:27.600Z","7.0.0-alpha.30":"2022-09-05T16:56:16.200Z","6.5.11-alpha.2":"2022-09-07T02:52:34.191Z","7.0.0-alpha.31":"2022-09-07T03:17:11.124Z","6.5.11":"2022-09-13T01:25:59.124Z","7.0.0-alpha.33":"2022-09-13T11:05:06.687Z","6.5.12":"2022-09-14T00:56:15.147Z","7.0.0-alpha.34":"2022-09-27T03:26:21.874Z","6.5.13-alpha.0":"2022-09-28T12:21:36.830Z","7.0.0-alpha.35":"2022-10-05T16:19:48.251Z","7.0.0-alpha.36":"2022-10-12T19:17:38.465Z","7.0.0-alpha.37":"2022-10-12T19:34:28.326Z","7.0.0-alpha.38":"2022-10-15T02:51:21.761Z","7.0.0-alpha.39":"2022-10-18T16:12:40.587Z","7.0.0-alpha.40":"2022-10-19T18:24:10.872Z","7.0.0-alpha.41":"2022-10-21T15:42:27.329Z","6.5.13-alpha.1":"2022-10-24T03:42:00.255Z","6.5.13":"2022-10-24T04:03:24.484Z","7.0.0-alpha.42":"2022-10-24T04:19:07.070Z","7.0.0-alpha.43":"2022-10-25T12:10:45.174Z","6.5.14-alpha.0":"2022-11-19T04:15:57.375Z","6.5.14-alpha.1":"2022-11-27T14:59:03.306Z","6.5.14-alpha.2":"2022-12-01T16:30:58.354Z","6.5.14":"2022-12-02T00:07:26.378Z","6.5.15-alpha.0":"2022-12-12T11:53:58.828Z","6.5.15-alpha.1":"2022-12-20T14:00:43.043Z","6.5.15":"2022-12-20T15:01:54.084Z","6.5.16-alpha.0":"2023-01-11T16:19:20.842Z","6.5.16":"2023-01-26T11:33:12.349Z","6.5.17-alpha.0":"2023-03-23T03:13:14.411Z"},"readmeFilename":"","homepage":"https://github.com/storybookjs/storybook/tree/main/lib/ui"}